Plotting routines for a molecular cloud model

Routines to plot the output of a (time-dependent) molecular cloud (mc, 0D chemistry model) ProDiMo model.

Usage example

import prodimopy.read_mc as pread_mc
import prodimopy.plot_mc as pplot_mc

model=pread_mc.read_mc("MC_Results.out")

print("MAKE A PLOTTING EXAMPLE)

Source documentation

class prodimopy.plot_mc.PlotMcModel(pdf, colors=None, styles=None, markers=None, fs_legend=6, ncol_legend=0)[source]

Plot routines for a single molecular cloud ProDiMo model (0D chemistry).

TODO: Redesign this. it is not very usefull to have this dokwargs legend … etc. routines copied all the time

Parameters:
  • name (pdf) – a matplotlib.backends.backend_pdf.PdfPages object used to save the plot.

  • colors (list) – a list of matplotlib colors used for different models. (default: None)

  • styles (list) – a list of matplotlib styles used for different models. (default: None)

  • markers (list) – a list of matplotlib markers used for different models. (default: None)

plot_species(model, spnames, **kwargs)[source]

Plot the species abundances as function of age (time).

Parameters:
  • model (prodimopy.read_mc.Data_mc) – a prodimopy.read_mc.Data_mc object used to save the plot.

  • spnames (list or str) – The names of the species that should be plotted. Can also be a single string.

  • todo:: (..) – the x axis (ages) is always plotted in log-scale so the zero age ( initial abundance) is not shown. Needs more flexibility.

class prodimopy.plot_mc.PlotMcModels(pdf, colors=None, styles=None, markers=None, fs_legend=6, ncol_legend=0)[source]

Plot routines for a molecular cloud ProDiMo models (0D chemistry).

Parameters:
  • name (pdf) – a matplotlib.backends.backend_pdf.PdfPages object used to save the plot.

  • colors (list) – a list of matplotlib colors used for different models. (default: None)

  • styles (list) – a list of matplotlib styles used for different models. (default: None)

  • markers (list) – a list of matplotlib markers used for different models. (default: None)

plot_species(models, spname, ice=False, ax=None, **kwargs)[source]

Plot the given species (spname) for all the given models.

Parameters:
  • models (array_like(prodimopy.read_mc.Data_mc,ndim=1)) – list of molecular cloud models

  • spname (str) – The name fo the species to plot

plot_species_diff(models, spname, ax=None, **kwargs)[source]

Plot the difference of the species abundance relative to the last model. The relative diffferencie is definded as abs(modelval/modelrefval-1.0)

Parameters:
  • models (array_like(prodimopy.read_mc.Data_mc,ndim=1)) – list of molecular cloud models

  • spname (str) – The name fo the species to plot

plot_abunratio(models, spname1, spname2, **kwargs)[source]