vice.output.show

Show a plot of the given quantity referenced by a keyword argument.

Signature: x.show(key, xlim = None, ylim = None)

Parameters

xoutput

An instance of this class.

keystr [case-insensitive]

The keyword argument. If this is a quantity stored in the history attribute, it will be plotted against time by defult. Conversely, if it is stored in the mdf attribute, the corresponding stellar metallicity distribution function will be plotted.

Users can also specify an argument of the format “key1-key2” where key1 and key2 are elements of the history output. This will then plot key1 against key2.

xlimarray-like (contains real numbers) [defaultNone]

The x-limits to impose on the shown plot, if any.

ylimarray-like (contains real numbers) [defaultNone]

The y-limits to impose on the shown plot, if any.

Raises

  • KeyError
    • Key is not found in either history or mdf attributes

  • ModuleNotFoundError
    • Matplotlib version >= 2.0.x is not found in the user’s system.

      Note

      In python 3.5.x, this will be an ImportError.

Other errors may be raised by matplotlib.pyplot.show.

Notes

This function is NOT intended to generate publication quality plots for users. It is included purely as a convenience function to allow “quick and dirty” data visualization and inspection of simulation outputs immediately with only one line of code.

Example Code

>>> import vice
>>> out = vice.output("example")
>>> out.show("dn/d[o/fe]")
>>> out.show("sfr")
>>> out.show("[o/fe]-[fe/h]")