Skip to content

Commit

Permalink
Bugfix: Plotting xlim / ylim
Browse files Browse the repository at this point in the history
  • Loading branch information
ptmerz committed Jan 30, 2018
1 parent ce0589d commit 28a1b2a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion physical_validation/util/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def plot(res, legend=None, title=None,
ax.axis('auto')
if xlim is not None:
ax.set_xlim(xlim)
else:
elif np.isfinite(xmin) and np.isfinite(xmax):
ax.set_xlim([xmin, xmax])
if ylim is not None:
ax.set_ylim(ylim)
Expand Down Expand Up @@ -127,3 +127,5 @@ def plot(res, legend=None, title=None,
fig.savefig(filename + '.pdf', dpi=300)
if screen:
fig.show()

plt.close(fig)

0 comments on commit 28a1b2a

Please sign in to comment.