8000 [MRG+1] plot_date() after axhline() doesn't rescale axes by Yasaman-Mah · Pull Request #8205 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

[MRG+1] plot_date() after axhline() doesn't rescale axes #8205

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 12 commits into from
Prev Previous commit
Next Next commit
fix merge conflict (add both tests)
  • Loading branch information
Isa Hassen committed Mar 7, 2017
commit e083a81bb45d1b8981987175c8bc2cac4caa5c23
12 changes: 12 additions & 0 deletions lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4991,3 +4991,15 @@ def test_datetime_axhline_same_axes():
axs[1].plot(xvalues, yvalues)

assert (axs[0].get_xlim() == axs[1].get_xlim())


def test_invalid_axis_limits():
plt.plot([0, 1], [0, 1])
with pytest.raises(ValueError):
plt.xlim(np.nan)
with pytest.raises(ValueError):
plt.xlim(np.inf)
with pytest.raises(ValueError):
plt.ylim(np.nan)
with pytest.raises(ValueError):
plt.ylim(np.inf)
You are viewing a condensed version of this merge commit. You can view the full changes here.
0