Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Open
Description
Problem
Although we nominally support units through all of our plotting APIs, this is not through tested (unfortunately this is a case where code coverage is not super informative). The address this issue we would like to add a "smoke test" (does it run without smoke coming out?) of every plotting method using "unit-full" data. The most common "unit-full" data is likely datetime, thus we are going to use datetime and timedelta values as the vehicle to exhaustively test which of the methods correctly handle units.
This is the tracking issue for this work.
Process
- Fork Matplotlib and get set up for development. Seehttps://matplotlib.org/devdocs/devel/contribute.html#contribute-code for detailed instructions of setting up a local or codespaces development environment. For this work it is not strictly necessary to have a development version of Matplotlib installed, just an up-to-date installation (mpl 3.8.0) as the tested behaviorshould be stable.
- Select a method to work on (for GHC OSD we will use slack and zoom to make sure we de-conflict!)
- Develop a short example that exercises passing dates or time deltas into the plotting methods. Try to exercise as many of the inputs (and their combinations) as practical with the datetimes.
- If you have a working example open a Pull request adding the example as a body to the correct test method in
lib/matplotlib/tests/test_datetime.py. Please include an image of the generated plot in the description of the PR and cross reference this issue (by including#26864in the PR description body). This is modeled forax.plot(I took the easiest one ;) ) inAdd datetime testing skeleton #26859. - If you find a method thatshould support datetime input but does not, open a new bug with the broken code and similarly reference this issue.
- If passing datetime / united data to the method does not make any sense or it should not work open a PR removing that test method and similarly reference this issue.
- If you have a working example open a Pull request adding the example as a body to the correct test method in
Task list
Axes.acorrMNT/TST: remove xcorr and acorr from test_datetime #27427Axes.angle_spectrumAxes.annotate[TST] Added test_annotate in test_datetime.py #27222Axes.arrow[TST] Added test_arrow in test_datetime.py #27372Axes.axhlineAdd test_axhline in test_datetime.py #27177Axes.axhspanadded test_axhspan in test_datetime.py #27139Axes.axline[TST] Added test_axlines in test_datetime.py #27326Axes.axvlineAdd test_axvline to test_datetime.py #27208Axes.axvspanadded test_axvspan in test.datetime.py #27130Axes.barAdd test_bar in test_datetime #27033Axes.bar_labelAdded test for Axes.bar_label #27431Axes.barbsAdded smoke test for Axes.barbs in test_datetime.py #27331Axes.barhAdd test_barh to test_datetime.py #27084Axes.boxplotAdd datetime testing for boxplot #27038Axes.broken_barhAdded test for broken_barh to test_datetime.py #27428Axes.bxpAdd test_bxp in test_datetime.py #27390Axes.clabelDefined the test_clabel function in the test_datetime file #27490Axes.cohereAxes.contourAdd test_contour under test_datetime.py #27013Axes.contourfAdd test_contourf in test_datetime.py #27024Axes.csdAxes.errorbarAdded smoke tests for Axes.errorbar in test_datetime.py #27185Axes.eventplotAdd test_eventplot to test_datetime.py #27466Axes.fillAdd test_fill in test_datetime.py #27401Axes.fill_betweenAdd test for fill_between in test_datetime.py #27423Axes.fill_betweenxAdded test_fill_betweenx in test_datetime.py #27425Axes.hexbinAdded datetime smoke test for Axes.hexbin #27475Axes.histAdded test_hist in test_datetime.py #27028Axes.hist2dAdded test_hist2d #27418Axes.hlinesAdd test_hlines to test_datetimes.py #27211Axes.imshowAdded smoke test for Axes.imshow to test_datetime.py #27476Axes.loglogAdded test_loglog in test_datetime.py #27435Axes.magnitude_spectrumAxes.matshowAdded smoke test for Axes.matshow to test_datetime.py #27474Axes.pcolorAdded test_pcolor in test_datetime.py #27391Axes.pcolorfastAttempted to add test_pcolorfast in test_datetime.py #27450Axes.pcolormeshAdded test_pcolormesh in test_datetime.py #27433Axes.phase_spectrumAxes.pieRemove datetime test for axes.pie #27117Axes.plotAxes.plot_dateadd test_plot_date in test_datetime.py #27037Axes.psdAxes.quiverAdd test_quiver in test_datetime.py #27407Axes.quiverkeyRemove test_quiverkey from test_datetime.py #27449Axes.scatterAdd scatter test for datetime units #26882Axes.semilogxAdd test_semilogx and test_semilogy tests to test_datetime #27320Axes.semilogyAdd test_semilogx and test_semilogy tests to test_datetime #27320Axes.specgramRemove test_spy from test_datetime.py #27392Axes.spyAxes.stackplotadd test_stackplot in test_datetime.py #27114Axes.stairsAdded Axes.stairs test in test_datetime.py #27424Axes.stemAdded smoke test for Axes.stem #27135Axes.stepAdd test_step to test_datetime.py #27091Axes.streamplotAdding test for axes.streamplot using datetime #27489Axes.tableAxes.textAdded smoke test for Axes.text in test_datetime.py #27142Axes.tricontourAdded test for tricontour in test_datetime.py #27494Axes.tricontourfAdded Axes.tricontourf Datetime Test #27487Axes.tripcolortest_tripcolor (Issue #26864) plots with datetime on x-axis only , y-axis only, and both x- and y-axis #27491Axes.triplotAdded DateTime Test for triplot #27488Axes.violinAdd datetime test for ax.violin #30384Axes.violinplotAdd axes.violinplot test from test_datetime.py #27521Axes.vlinesAdd test_vlines to test_datetime.py #27410Axes.xcorrMNT/TST: remove xcorr and acorr from test_datetime #27427