rootpy.plotting.utils.get_limits¶
-
rootpy.plotting.utils.
get_limits
(plottables, xpadding=0, ypadding=0.1, xerror_in_padding=True, yerror_in_padding=True, snap=True, logx=False, logy=False, logx_crop_value=1e-05, logy_crop_value=1e-05, logx_base=10, logy_base=10)[source]¶ Get the axes limits that should be used for a 1D histogram, graph, or stack of histograms.
Parameters: plottables : Hist, Graph, HistStack, or list of such objects
The object(s) for which visually pleasing plot boundaries are requested.
xpadding : float or 2-tuple, optional (default=0)
The horizontal padding as a fraction of the final plot width.
ypadding : float or 2-tuple, optional (default=0.1)
The vertical padding as a fraction of the final plot height.
xerror_in_padding : bool, optional (default=True)
If False then exclude the x error bars from the calculation of the plot width.
yerror_in_padding : bool, optional (default=True)
If False then exclude the y error bars from the calculation of the plot height.
snap : bool, optional (default=True)
Make the minimum or maximum of the vertical range the x-axis depending on if the plot maximum and minimum are above or below the x-axis. If the plot maximum is above the x-axis while the minimum is below the x-axis, then this option will have no effect.
logx : bool, optional (default=False)
If True, then the x-axis is log scale.
logy : bool, optional (default=False)
If True, then the y-axis is log scale.
logx_crop_value : float, optional (default=1E-5)
If an x-axis is using a logarithmic scale then crop all non-positive values with this value.
logy_crop_value : float, optional (default=1E-5)
If the y-axis is using a logarithmic scale then crop all non-positive values with this value.
logx_base : float, optional (default=10)
The base used for the logarithmic scale of the x-axis.
logy_base : float, optional (default=10)
The base used for the logarithmic scale of the y-axis.
Returns: xmin, xmax, ymin, ymax : tuple of plot boundaries
The computed x and y-axis ranges.