yt.visualization.profile_plotter.ProfilePlot.set_ylim

ProfilePlot.set_ylim(*args, **kwargs)[source]

Sets the plot limits for the specified field we are binning.

Parameters:

field : string or field tuple

The field that we want to adjust the plot limits for. :

ymin : float or None

The new y minimum. Defaults to None, which leaves the ymin unchanged.

ymax : float or None

The new y maximum. Defaults to None, which leaves the ymax unchanged.

Examples

>>> import yt
>>> ds = yt.load('IsolatedGalaxy/galaxy0030/galaxy0030')
>>> pp = yt.ProfilePlot(ds.all_data(), 'density', ['temperature', 'x-velocity'])
>>> pp.set_ylim('temperature', 1e4, 1e6)
>>> pp.save()