# HG changeset patch # User Iannis # Date 1507202322 -10800 # Node ID 8ea07d18abc2f8e2d8078c57e42c4b3198547eb1 # Parent 6c06efef397c1dc5837dd1b955baa0a4bcfaa083 Figure size in plots diff -r 6c06efef397c -r 8ea07d18abc2 atmospheric_lidar/generic.py --- a/atmospheric_lidar/generic.py Sat Sep 09 11:25:42 2017 +0300 +++ b/atmospheric_lidar/generic.py Thu Oct 05 14:18:42 2017 +0300 @@ -592,13 +592,14 @@ prof = np.mean(self.matrix, axis=0) return prof - def plot(self, signal_type='rc', filename=None, zoom=[0, 12000, 0, -1], show_plot=True, cmap=plt.cm.jet, z0=None, + def plot(self, figsize=(8, 4), signal_type='rc', zoom=[0, 12000, 0, -1], show_plot=True, cmap=plt.cm.jet, z0=None, title=None, vmin=0, vmax=1.3 * 10 ** 7): # if filename is not None: # matplotlib.use('Agg') - fig = plt.figure() + fig = plt.figure(figsize=figsize) ax1 = fig.add_subplot(111) + self.draw_plot(ax1, cmap=cmap, signal_type=signal_type, zoom=zoom, z0=z0, vmin=vmin, vmax=vmax) if title: @@ -606,13 +607,8 @@ else: ax1.set_title("%s signal - %s" % (signal_type.upper(), self.name)) - if filename is not None: - pass - # plt.savefig(filename) - else: - if show_plot: - plt.show() - # plt.close() ??? + if show_plot: + plt.show() def draw_plot(self, ax1, cmap=plt.cm.jet, signal_type='rc', zoom=[0, 12000, 0, -1], z0=None,