Skip to content

Commit

Permalink
Fixed plot range bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ronniyjoseph committed Oct 29, 2019
1 parent c1bad80 commit 9c447b3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plottools.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ def plot_power_spectrum(u_bins, eta_bins, nu, data, norm = None, title=None, axe

if x_range is None:
axes.set_xlim(9e-3, 3e-1)
else:
axes.set_xlim(x_range[0], x_range[1])
if y_range is None:
axes.set_ylim(9e-3, 1.2e0)
else:
axes.set_ylim(y_range[0], y_range[1])

if diff:
pass
Expand All @@ -49,7 +53,6 @@ def plot_power_spectrum(u_bins, eta_bins, nu, data, norm = None, title=None, axe

if title is not None:
axes.set_title(title)

psplot = axes.pcolor(x_values, y_values, z_values.T, cmap=colormap, rasterized=True, norm=norm)
if colorbar_show:
cax = colorbar(psplot, extend=colorbar_limits)
Expand Down

0 comments on commit 9c447b3

Please sign in to comment.