diff --git a/modules/base/pymod/table.py b/modules/base/pymod/table.py index 81e5b5f46520037781272688fc9831d77f6e99ab..8af2ab6cc20f088401c9e80038d8bc98e31f8561 100644 --- a/modules/base/pymod/table.py +++ b/modules/base/pymod/table.py @@ -1143,7 +1143,7 @@ class Table(object): def PlotHistogram(self, col, x_range=None, num_bins=10, normed=False, histtype='stepfilled', align='mid', x_title=None, y_title=None, title=None, clear=True, save=False, - color=None): + color=None, y_range=None): """ Create a histogram of the data in col for the range *x_range*, split into *num_bins* bins and plot it using Matplotlib. @@ -1154,9 +1154,16 @@ class Table(object): :param x_range: start and end value for first dimension (e.g. [start_x, end_x]) :type x_range: :class:`list` of length two + :param y_range: start and end value for second dimension (e.g. [start_y, end_y]) + :type y_range: :class:`list` of length two + :param num_bins: number of bins in range :type num_bins: :class:`int` + :param color: Color to be used for the histogram. If not set, color will be + determined by matplotlib + :type color: :class:`str` + :param normed: normalize histogram :type normed: :class:`bool` @@ -1224,7 +1231,8 @@ class Table(object): else: nice_x=MakeTitle(col) plt.xlabel(nice_x, size='x-large') - + if y_range: + plt.ylim(y_range) if y_title!=None: nice_y=y_title else: