diff --git a/etc/plot-all-injections.py b/etc/plot-all-injections.py index d025748c18f74364175eec08561ff5be6ff37521..e7b7420281dca675df2044bdfd29bdac9922f475 100755 --- a/etc/plot-all-injections.py +++ b/etc/plot-all-injections.py @@ -82,8 +82,8 @@ for channel in channels: amb_min = 10 ** np.floor(np.log10(min(ambients))) if max(ambients) > amb_max: amb_max = 10 ** np.ceil(np.log10(max(ambients))) - ax.set_xscale('log', nonposx='clip') - ax.set_yscale('log', nonposx='clip') + ax.set_xscale('log', nonpositive='clip') + ax.set_yscale('log', nonpositive='clip') #ax.set_xticks(range(0, 200, 2)) ax.set_xlim(5, 3000) ax.set_ylim(1e-24, 1e-16) diff --git a/pemcoupling/coherence.py b/pemcoupling/coherence.py index 5827c32f151d6cb0454a83cb678a77f1521064a8..4cdcf1c6502d0484c6d0ce18a8bcce5d84597220 100644 --- a/pemcoupling/coherence.py +++ b/pemcoupling/coherence.py @@ -86,7 +86,7 @@ s plt.xlabel('Frequency [Hz]') plt.ylim([0, 1]) plt.xlim([10, max(freqs)]) - ax.set_xscale('log', nonposx='clip') + ax.set_xscale('log', nonpositive='clip') ax.autoscale(False) plt.grid( b=True, which='major', color='0.75', linestyle=':', zorder=1) diff --git a/pemcoupling/plot.py b/pemcoupling/plot.py index 9ba9c20861bbe25b7d26ffb75de14bb1973b080c..5ceb2a0cbd946e69b4b6d07f0f629a84adb139a5 100644 --- a/pemcoupling/plot.py +++ b/pemcoupling/plot.py @@ -173,8 +173,8 @@ def plot_cf(cf, filename, in_counts=False, timestamp=None, # CUSTOMIZE AXES plt.xlim([freq_min, freq_max]) plt.ylim([factor_min, factor_max]) - ax.set_xscale('log', nonposx='clip') - ax.set_yscale('log', nonposy='clip') + ax.set_xscale('log', nonpositive='clip') + ax.set_yscale('log', nonpositive='clip') ax.autoscale(False) plt.grid( b=True, which='major', color='0.0', linestyle=':', linewidth=1, @@ -307,8 +307,8 @@ def plot_injection( plt.xlim([freq_min, freq_max]) plt.ylim([spec_sens_min, spec_sens_max]) if ((freq_max / freq_min) > 5): - ax1.set_xscale('log', nonposx='clip') - ax1.set_yscale('log', nonposy='clip') + ax1.set_xscale('log', nonpositive='clip') + ax1.set_yscale('log', nonpositive='clip') ax1.autoscale(False) plt.grid( b=True, which='major', color='0.0', linestyle=':', linewidth=1, @@ -423,8 +423,8 @@ def plot_injection( plt.xlim([freq_min, freq_max]) plt.ylim([spec_min, spec_max]) if ((freq_max / freq_min) > 5): - ax2.set_xscale('log', nonposx='clip') - ax2.set_yscale('log', nonposy='clip') + ax2.set_xscale('log', nonpositive='clip') + ax2.set_yscale('log', nonpositive='clip') ax2.autoscale(False) plt.grid( b=True, which='major', color='0.0', linestyle=':', linewidth=1, diff --git a/pemcoupling/postprocess/composite_utils.py b/pemcoupling/postprocess/composite_utils.py index df22a6649dced7cf84ce1ba40c4f03a903846bd0..2d92d414580fe223413bc0c9b242c429454fd374 100644 --- a/pemcoupling/postprocess/composite_utils.py +++ b/pemcoupling/postprocess/composite_utils.py @@ -114,9 +114,9 @@ class CompositePlot(object): if y_min is not None and y_max is not None: self.ax.set_ylim([y_min, y_max]) if x_max / x_min > 100: - self.ax.set_xscale('log', nonposx='clip') + self.ax.set_xscale('log', nonpositive='clip') if y_max / y_min > 100: - self.ax.set_yscale('log', nonposy='clip') + self.ax.set_yscale('log', nonpositive='clip') self.ax.autoscale(False) # Grid lines and ticks self.ax.grid( diff --git a/pemcoupling/postprocess/sitewide_utils.py b/pemcoupling/postprocess/sitewide_utils.py index 48aaa1f8fe073831c0ae175c1e95fd1a6fd763b1..5ee03bf5da8f77422cc83052c2a577c6456bcda6 100644 --- a/pemcoupling/postprocess/sitewide_utils.py +++ b/pemcoupling/postprocess/sitewide_utils.py @@ -313,9 +313,9 @@ class SummaryPlot(object): self.ax.set_xlim(self.xlim) self.ax.set_ylim(self.ylim) if self.xlim[1] / self.xlim[0] > 100: - self.ax.set_xscale('log', nonposx='clip') + self.ax.set_xscale('log', nonpositive='clip') if self.ylim[1] / self.ylim[0] > 100: - self.ax.set_yscale('log', nonposy='clip') + self.ax.set_yscale('log', nonpositive='clip') self.ax.autoscale(False) self.ax.grid( b=True, which='major', color='0.0', linestyle=':', zorder=1) diff --git a/pemcoupling/ratioplots.py b/pemcoupling/ratioplots.py index 0f8bc7d91ed1677749f457d123b8b69fa071d34e..35fe77c1dba7c93d17202f5d5da79a6db65a5639 100644 --- a/pemcoupling/ratioplots.py +++ b/pemcoupling/ratioplots.py @@ -150,7 +150,7 @@ def ratio_plots( cmap=cmap, vmin=ratio_min, vmax=ratio_max, norm=norm) ax.set_yticks([], []) ax.set_xlim([freq_min, freq_max]) - ax.set_xscale('log', nonposy='clip') + ax.set_xscale('log', nonpositive='clip') ax.xaxis.set_tick_params(which='major', direction='out', width=3) ax.xaxis.set_tick_params(which='minor', direction='out', width=2) ax.xaxis.grid(which='both', color='white', alpha=0.4)