Skip to content

Commit

Permalink
Merge pull request #235 from AdamTheisen/master
Browse files Browse the repository at this point in the history
ENH:  Adding argument to plot for explicitly setting yrange.  Also re…
  • Loading branch information
AdamTheisen authored Aug 6, 2020
2 parents f9a79cc + 350423c commit 811e632
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion act/io/mpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ def proc_sigma_mplv5_read(f, save_nc=False, out_nc_path=None, afterpulse=None,

call += ' ' + f

print(call)
# Specify the output, will use a temporary file if no output specified
if save_nc:
if out_nc_path is None:
Expand Down
7 changes: 6 additions & 1 deletion act/plotting/TimeSeriesDisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def plot(self, field, dsname=None, subplot_index=(0, ),
cmap=None, set_title=None,
add_nan=False, day_night_background=False,
invert_y_axis=False, abs_limits=(None, None), time_rng=None,
use_var_for_y=None,
y_rng=None, use_var_for_y=None,
assessment_overplot=False,
assessment_overplot_category={'Incorrect': ['Bad', 'Incorrect'],
'Suspect': ['Indeterminate', 'Suspect']},
Expand Down Expand Up @@ -319,6 +319,8 @@ def plot(self, field, dsname=None, subplot_index=(0, ),
time_rng : tuple or list
List or tuple with (min, max) values to set the x-axis range
limits.
y_rng : tuple or list
List or tuple with (min, max) values to set the y-axis range
use_var_for_y : str
Set this to the name of a data variable in the Dataset to use as
the y-axis variable instead of the default dimension. Useful for
Expand Down Expand Up @@ -494,6 +496,9 @@ def plot(self, field, dsname=None, subplot_index=(0, ),
self.set_xrng(self.time_rng, subplot_index)

# Set Y Limit
if y_rng is not None:
self.set_yrng(y_rng)

if hasattr(self, 'yrng'):
# Make sure that the yrng is not just the default
if ydata is None:
Expand Down

0 comments on commit 811e632

Please sign in to comment.