# HG changeset patch # User Iannis # Date 1575977042 -7200 # Node ID 44fabea9c60dfd7e66619e1ba04f88056cb4caaf # Parent 9cecc16e9a9bb598dead99de37fd8980d49aa3cd More flexible scan plots. diff -r 9cecc16e9a9b -r 44fabea9c60d atmospheric_lidar/raymetrics.py --- a/atmospheric_lidar/raymetrics.py Fri Nov 01 18:13:03 2019 +0200 +++ b/atmospheric_lidar/raymetrics.py Tue Dec 10 13:24:02 2019 +0200 @@ -315,7 +315,7 @@ def plot_scan(self, figsize=(8, 4), signal_type='rc', z_min=0., z_max=12000., show_plot=True, cmap=plt.cm.jet, vmin=0, vmax=1.3 * 10 ** 7, mask_noise=True, noise_threshold=1., cb_format='%.0e', - box=False): + box=False, grid=(1, 4), ax1_position=(0, 0), ax1_span=2, ax2_position=(0, 2), ax2_span=2): """ Plot data as RHI and PPI scans. @@ -347,8 +347,9 @@ Threshold to use in the noise masking routine. """ fig = plt.figure(figsize=figsize) - ax1 = fig.add_subplot(121) - ax2 = fig.add_subplot(122) + + ax1 = plt.subplot2grid(grid, ax1_position, colspan=ax1_span) + ax2 = plt.subplot2grid(grid, ax2_position, colspan=ax2_span) self.draw_ppi(ax1, cmap=cmap, signal_type=signal_type, z_min=z_min, z_max=z_max, vmin=vmin, vmax=vmax, mask_noise=mask_noise, noise_threshold=noise_threshold, add_colorbar=False, cb_format=cb_format,