diff --git a/.circleci/config.yml b/.circleci/config.yml index 5fc186a4143a..60a1e8211e60 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,26 +42,26 @@ commands: - run: name: Install apt packages command: | - sudo apt -qq update - sudo apt install -y \ - inkscape \ - ffmpeg \ + sudo apt-get -qq update + sudo apt-get install -yy --no-install-recommends \ + cm-super \ dvipng \ + ffmpeg \ + fonts-crosextra-carlito \ + fonts-freefont-otf \ + fonts-humor-sans \ + fonts-noto-cjk \ + fonts-wqy-zenhei \ + graphviz \ + inkscape \ lmodern \ - cm-super \ + optipng \ + texlive-fonts-recommended \ texlive-latex-base \ texlive-latex-extra \ - texlive-fonts-recommended \ texlive-latex-recommended \ texlive-pictures \ - texlive-xetex \ - ttf-wqy-zenhei \ - graphviz \ - fonts-crosextra-carlito \ - fonts-freefont-otf \ - fonts-humor-sans \ - fonts-noto-cjk \ - optipng + texlive-xetex fonts-install: steps: diff --git a/doc/api/next_api_changes/removals/26871-PS.rst b/doc/api/next_api_changes/removals/26871-PS.rst new file mode 100644 index 000000000000..a5d06a482335 --- /dev/null +++ b/doc/api/next_api_changes/removals/26871-PS.rst @@ -0,0 +1,3 @@ +Remove Deprecated API +~~~~~~~~~~~~~~~~~~~~~~~ +``matplotlib.patches.ConnectionStyle._Base.SimpleEvent`` diff --git a/lib/matplotlib/patches.py b/lib/matplotlib/patches.py index f80df92c62fc..ba9fee2bc7e4 100644 --- a/lib/matplotlib/patches.py +++ b/lib/matplotlib/patches.py @@ -2708,11 +2708,6 @@ class _Base: helper methods. """ - @_api.deprecated("3.7") - class SimpleEvent: - def __init__(self, xy): - self.x, self.y = xy - def _in_patch(self, patch): """ Return a predicate function testing whether a point *xy* is diff --git a/lib/matplotlib/patches.pyi b/lib/matplotlib/patches.pyi index 29fe36aa6c6b..6a738c7cb779 100644 --- a/lib/matplotlib/patches.pyi +++ b/lib/matplotlib/patches.pyi @@ -455,8 +455,6 @@ class BoxStyle(_Style): class ConnectionStyle(_Style): class _Base(ConnectionStyle): - class SimpleEvent: - def __init__(self, xy: tuple[float, float]) -> None: ... def __call__( self, diff --git a/lib/matplotlib/tests/test_datetime.py b/lib/matplotlib/tests/test_datetime.py new file mode 100644 index 000000000000..53958229f174 --- /dev/null +++ b/lib/matplotlib/tests/test_datetime.py @@ -0,0 +1,397 @@ +import datetime +import numpy as np + +import pytest + +import matplotlib.pyplot as plt +import matplotlib as mpl + + +class TestDatetimePlotting: + @pytest.mark.xfail(reason="Test for acorr not written yet") + @mpl.style.context("default") + def test_acorr(self): + fig, ax = plt.subplots() + ax.acorr(...) + + @pytest.mark.xfail(reason="Test for angle_spectrum not written yet") + @mpl.style.context("default") + def test_angle_spectrum(self): + fig, ax = plt.subplots() + ax.angle_spectrum(...) + + @pytest.mark.xfail(reason="Test for annotate not written yet") + @mpl.style.context("default") + def test_annotate(self): + fig, ax = plt.subplots() + ax.annotate(...) + + @pytest.mark.xfail(reason="Test for arrow not written yet") + @mpl.style.context("default") + def test_arrow(self): + fig, ax = plt.subplots() + ax.arrow(...) + + @pytest.mark.xfail(reason="Test for axhline not written yet") + @mpl.style.context("default") + def test_axhline(self): + fig, ax = plt.subplots() + ax.axhline(...) + + @pytest.mark.xfail(reason="Test for axhspan not written yet") + @mpl.style.context("default") + def test_axhspan(self): + fig, ax = plt.subplots() + ax.axhspan(...) + + @pytest.mark.xfail(reason="Test for axline not written yet") + @mpl.style.context("default") + def test_axline(self): + fig, ax = plt.subplots() + ax.axline(...) + + @pytest.mark.xfail(reason="Test for axvline not written yet") + @mpl.style.context("default") + def test_axvline(self): + fig, ax = plt.subplots() + ax.axvline(...) + + @pytest.mark.xfail(reason="Test for axvspan not written yet") + @mpl.style.context("default") + def test_axvspan(self): + fig, ax = plt.subplots() + ax.axvspan(...) + + @pytest.mark.xfail(reason="Test for bar not written yet") + @mpl.style.context("default") + def test_bar(self): + fig, ax = plt.subplots() + ax.bar(...) + + @pytest.mark.xfail(reason="Test for bar_label not written yet") + @mpl.style.context("default") + def test_bar_label(self): + fig, ax = plt.subplots() + ax.bar_label(...) + + @pytest.mark.xfail(reason="Test for barbs not written yet") + @mpl.style.context("default") + def test_barbs(self): + fig, ax = plt.subplots() + ax.barbs(...) + + @pytest.mark.xfail(reason="Test for barh not written yet") + @mpl.style.context("default") + def test_barh(self): + fig, ax = plt.subplots() + ax.barh(...) + + @pytest.mark.xfail(reason="Test for boxplot not written yet") + @mpl.style.context("default") + def test_boxplot(self): + fig, ax = plt.subplots() + ax.boxplot(...) + + @pytest.mark.xfail(reason="Test for broken_barh not written yet") + @mpl.style.context("default") + def test_broken_barh(self): + fig, ax = plt.subplots() + ax.broken_barh(...) + + @pytest.mark.xfail(reason="Test for bxp not written yet") + @mpl.style.context("default") + def test_bxp(self): + fig, ax = plt.subplots() + ax.bxp(...) + + @pytest.mark.xfail(reason="Test for clabel not written yet") + @mpl.style.context("default") + def test_clabel(self): + fig, ax = plt.subplots() + ax.clabel(...) + + @pytest.mark.xfail(reason="Test for cohere not written yet") + @mpl.style.context("default") + def test_cohere(self): + fig, ax = plt.subplots() + ax.cohere(...) + + @pytest.mark.xfail(reason="Test for contour not written yet") + @mpl.style.context("default") + def test_contour(self): + fig, ax = plt.subplots() + ax.contour(...) + + @pytest.mark.xfail(reason="Test for contourf not written yet") + @mpl.style.context("default") + def test_contourf(self): + fig, ax = plt.subplots() + ax.contourf(...) + + @pytest.mark.xfail(reason="Test for csd not written yet") + @mpl.style.context("default") + def test_csd(self): + fig, ax = plt.subplots() + ax.csd(...) + + @pytest.mark.xfail(reason="Test for errorbar not written yet") + @mpl.style.context("default") + def test_errorbar(self): + fig, ax = plt.subplots() + ax.errorbar(...) + + @pytest.mark.xfail(reason="Test for eventplot not written yet") + @mpl.style.context("default") + def test_eventplot(self): + fig, ax = plt.subplots() + ax.eventplot(...) + + @pytest.mark.xfail(reason="Test for fill not written yet") + @mpl.style.context("default") + def test_fill(self): + fig, ax = plt.subplots() + ax.fill(...) + + @pytest.mark.xfail(reason="Test for fill_between not written yet") + @mpl.style.context("default") + def test_fill_between(self): + fig, ax = plt.subplots() + ax.fill_between(...) + + @pytest.mark.xfail(reason="Test for fill_betweenx not written yet") + @mpl.style.context("default") + def test_fill_betweenx(self): + fig, ax = plt.subplots() + ax.fill_betweenx(...) + + @pytest.mark.xfail(reason="Test for hexbin not written yet") + @mpl.style.context("default") + def test_hexbin(self): + fig, ax = plt.subplots() + ax.hexbin(...) + + @pytest.mark.xfail(reason="Test for hist not written yet") + @mpl.style.context("default") + def test_hist(self): + fig, ax = plt.subplots() + ax.hist(...) + + @pytest.mark.xfail(reason="Test for hist2d not written yet") + @mpl.style.context("default") + def test_hist2d(self): + fig, ax = plt.subplots() + ax.hist2d(...) + + @pytest.mark.xfail(reason="Test for hlines not written yet") + @mpl.style.context("default") + def test_hlines(self): + fig, ax = plt.subplots() + ax.hlines(...) + + @pytest.mark.xfail(reason="Test for imshow not written yet") + @mpl.style.context("default") + def test_imshow(self): + fig, ax = plt.subplots() + ax.imshow(...) + + @pytest.mark.xfail(reason="Test for loglog not written yet") + @mpl.style.context("default") + def test_loglog(self): + fig, ax = plt.subplots() + ax.loglog(...) + + @pytest.mark.xfail(reason="Test for magnitude_spectrum not written yet") + @mpl.style.context("default") + def test_magnitude_spectrum(self): + fig, ax = plt.subplots() + ax.magnitude_spectrum(...) + + @pytest.mark.xfail(reason="Test for matshow not written yet") + @mpl.style.context("default") + def test_matshow(self): + fig, ax = plt.subplots() + ax.matshow(...) + + @pytest.mark.xfail(reason="Test for pie not written yet") + @mpl.style.context("default") + def test_pie(self): + fig, ax = plt.subplots() + ax.pcolor(...) + + @pytest.mark.xfail(reason="Test for pcolor not written yet") + @mpl.style.context("default") + def test_pcolor(self): + fig, ax = plt.subplots() + ax.pcolor(...) + + @pytest.mark.xfail(reason="Test for pcolorfast not written yet") + @mpl.style.context("default") + def test_pcolorfast(self): + fig, ax = plt.subplots() + ax.pcolorfast(...) + + @pytest.mark.xfail(reason="Test for pcolormesh not written yet") + @mpl.style.context("default") + def test_pcolormesh(self): + fig, ax = plt.subplots() + ax.pcolormesh(...) + + @pytest.mark.xfail(reason="Test for phase_spectrum not written yet") + @mpl.style.context("default") + def test_phase_spectrum(self): + fig, ax = plt.subplots() + ax.phase_spectrum(...) + + @mpl.style.context("default") + def test_plot(self): + mpl.rcParams["date.converter"] = 'concise' + N = 6 + fig, (ax1, ax2, ax3) = plt.subplots(3, 1, layout='constrained') + x = np.array([datetime.datetime(2023, 9, n) for n in range(1, N)]) + ax1.plot(x, range(1, N)) + ax2.plot(range(1, N), x) + ax3.plot(x, x) + + @pytest.mark.xfail(reason="Test for plot_date not written yet") + @mpl.style.context("default") + def test_plot_date(self): + fig, ax = plt.subplots() + ax.plot_date(...) + + @pytest.mark.xfail(reason="Test for psd not written yet") + @mpl.style.context("default") + def test_psd(self): + fig, ax = plt.subplots() + ax.psd(...) + + @pytest.mark.xfail(reason="Test for quiver not written yet") + @mpl.style.context("default") + def test_quiver(self): + fig, ax = plt.subplots() + ax.quiver(...) + + @pytest.mark.xfail(reason="Test for quiverkey not written yet") + @mpl.style.context("default") + def test_quiverkey(self): + fig, ax = plt.subplots() + ax.quiverkey(...) + + @pytest.mark.xfail(reason="Test for scatter not written yet") + @mpl.style.context("default") + def test_scatter(self): + fig, ax = plt.subplots() + ax.scatter(...) + + @pytest.mark.xfail(reason="Test for semilogx not written yet") + @mpl.style.context("default") + def test_semilogx(self): + fig, ax = plt.subplots() + ax.semilogx(...) + + @pytest.mark.xfail(reason="Test for semilogy not written yet") + @mpl.style.context("default") + def test_semilogy(self): + fig, ax = plt.subplots() + ax.semilogy(...) + + @pytest.mark.xfail(reason="Test for specgram not written yet") + @mpl.style.context("default") + def test_specgram(self): + fig, ax = plt.subplots() + ax.specgram(...) + + @pytest.mark.xfail(reason="Test for spy not written yet") + @mpl.style.context("default") + def test_spy(self): + fig, ax = plt.subplots() + ax.spy(...) + + @pytest.mark.xfail(reason="Test for stackplot not written yet") + @mpl.style.context("default") + def test_stackplot(self): + fig, ax = plt.subplots() + ax.stackplot(...) + + @pytest.mark.xfail(reason="Test for stairs not written yet") + @mpl.style.context("default") + def test_stairs(self): + fig, ax = plt.subplots() + ax.stairs(...) + + @pytest.mark.xfail(reason="Test for stem not written yet") + @mpl.style.context("default") + def test_stem(self): + fig, ax = plt.subplots() + ax.stem(...) + + @pytest.mark.xfail(reason="Test for step not written yet") + @mpl.style.context("default") + def test_step(self): + fig, ax = plt.subplots() + ax.step(...) + + @pytest.mark.xfail(reason="Test for streamplot not written yet") + @mpl.style.context("default") + def test_streamplot(self): + fig, ax = plt.subplots() + ax.streamplot(...) + + @pytest.mark.xfail(reason="Test for table not written yet") + @mpl.style.context("default") + def test_table(self): + fig, ax = plt.subplots() + ax.table(...) + + @pytest.mark.xfail(reason="Test for text not written yet") + @mpl.style.context("default") + def test_text(self): + fig, ax = plt.subplots() + ax.text(...) + + @pytest.mark.xfail(reason="Test for tricontour not written yet") + @mpl.style.context("default") + def test_tricontour(self): + fig, ax = plt.subplots() + ax.tricontour(...) + + @pytest.mark.xfail(reason="Test for tricontourf not written yet") + @mpl.style.context("default") + def test_tricontourf(self): + fig, ax = plt.subplots() + ax.tricontourf(...) + + @pytest.mark.xfail(reason="Test for tripcolor not written yet") + @mpl.style.context("default") + def test_tripcolor(self): + fig, ax = plt.subplots() + ax.tripcolor(...) + + @pytest.mark.xfail(reason="Test for triplot not written yet") + @mpl.style.context("default") + def test_triplot(self): + fig, ax = plt.subplots() + ax.triplot(...) + + @pytest.mark.xfail(reason="Test for violin not written yet") + @mpl.style.context("default") + def test_violin(self): + fig, ax = plt.subplots() + ax.violin(...) + + @pytest.mark.xfail(reason="Test for violinplot not written yet") + @mpl.style.context("default") + def test_violinplot(self): + fig, ax = plt.subplots() + ax.violinplot(...) + + @pytest.mark.xfail(reason="Test for vlines not written yet") + @mpl.style.context("default") + def test_vlines(self): + fig, ax = plt.subplots() + ax.vlines(...) + + @pytest.mark.xfail(reason="Test for xcorr not written yet") + @mpl.style.context("default") + def test_xcorr(self): + fig, ax = plt.subplots() + ax.xcorr(...)