diff --git a/plotter.py b/plotter.py index 92b2a31..262d572 100644 --- a/plotter.py +++ b/plotter.py @@ -958,6 +958,8 @@ class Plotter(Aggregator, BaseProcessor): yunit=None, xunit_coeff=1.0, yunit_coeff=1.0, + xscale="linear", + yscale="linear", fit=None, fitlabel=None, smooth=0, @@ -988,7 +990,7 @@ class Plotter(Aggregator, BaseProcessor): node_x = self.save.get_node(name_x) node_y = self.save.get_node(name_y) - # If the actual data is in a,other file, fetch it + # If the actual data is in another file, fetch it if subname_x: hdf5_x = tables.open_file(node_x.read()) node_x = hdf5_x.get_node(subname_x) @@ -1052,7 +1054,8 @@ class Plotter(Aggregator, BaseProcessor): yerr_max[mask], ) else: - x, y = node_x[run], node_y[run] + x = node_x[run].read() * xunit_old.express(xunit) + y = node_y[run].read() * yunit_old.express(yunit) mask = np.isfinite(x) & np.isfinite(y) x, y = x[mask], y[mask] @@ -1099,6 +1102,10 @@ class Plotter(Aggregator, BaseProcessor): if legend: plt.legend() + # Ax scale + plt.xscale(xscale) + plt.yscale(yscale) + if fit is not None: self._overlay_fit( x,