Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
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#26864
in 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.acorr
MNT/TST: remove xcorr and acorr from test_datetime #27427Axes.angle_spectrum
Axes.annotate
[TST] Added test_annotate in test_datetime.py #27222Axes.arrow
[TST] Added test_arrow in test_datetime.py #27372Axes.axhline
Add test_axhline in test_datetime.py #27177Axes.axhspan
added test_axhspan in test_datetime.py #27139Axes.axline
[TST] Added test_axlines in test_datetime.py #27326Axes.axvline
Add test_axvline to test_datetime.py #27208Axes.axvspan
added test_axvspan in test.datetime.py #27130Axes.bar
Add test_bar in test_datetime #27033Axes.bar_label
Added test for Axes.bar_label #27431Axes.barbs
Added smoke test for Axes.barbs in test_datetime.py #27331Axes.barh
Add test_barh to test_datetime.py #27084Axes.boxplot
Add datetime testing for boxplot #27038Axes.broken_barh
Added test for broken_barh to test_datetime.py #27428Axes.bxp
Add test_bxp in test_datetime.py #27390Axes.clabel
Defined the test_clabel function in the test_datetime file #27490Axes.cohere
Axes.contour
Add test_contour under test_datetime.py #27013Axes.contourf
Add test_contourf in test_datetime.py #27024Axes.csd
Axes.errorbar
Added smoke tests for Axes.errorbar in test_datetime.py #27185Axes.eventplot
Add test_eventplot to test_datetime.py #27466Axes.fill
Add test_fill in test_datetime.py #27401Axes.fill_between
Add test for fill_between in test_datetime.py #27423Axes.fill_betweenx
Added test_fill_betweenx in test_datetime.py #27425Axes.hexbin
Added datetime smoke test for Axes.hexbin #27475Axes.hist
Added test_hist in test_datetime.py #27028Axes.hist2d
Added test_hist2d #27418Axes.hlines
Add test_hlines to test_datetimes.py #27211Axes.imshow
Added smoke test for Axes.imshow to test_datetime.py #27476Axes.loglog
Added test_loglog in test_datetime.py #27435Axes.magnitude_spectrum
Axes.matshow
Added smoke test for Axes.matshow to test_datetime.py #27474Axes.pcolor
Added test_pcolor in test_datetime.py #27391Axes.pcolorfast
Attempted to add test_pcolorfast in test_datetime.py #27450Axes.pcolormesh
Added test_pcolormesh in test_datetime.py #27433Axes.phase_spectrum
Axes.pie
Remove datetime test for axes.pie #27117Axes.plot
Axes.plot_date
add test_plot_date in test_datetime.py #27037Axes.psd
Axes.quiver
Add test_quiver in test_datetime.py #27407Axes.quiverkey
Remove test_quiverkey from test_datetime.py #27449Axes.scatter
Add scatter test for datetime units #26882Axes.semilogx
Add test_semilogx and test_semilogy tests to test_datetime #27320Axes.semilogy
Add test_semilogx and test_semilogy tests to test_datetime #27320Axes.specgram
Remove test_spy from test_datetime.py #27392Axes.spy
Axes.stackplot
add test_stackplot in test_datetime.py #27114Axes.stairs
Added Axes.stairs test in test_datetime.py #27424Axes.stem
Added smoke test for Axes.stem #27135Axes.step
Add test_step to test_datetime.py #27091Axes.streamplot
Adding test for axes.streamplot using datetime #27489Axes.table
Axes.text
Added smoke test for Axes.text in test_datetime.py #27142Axes.tricontour
Added test for tricontour in test_datetime.py #27494Axes.tricontourf
Added Axes.tricontourf Datetime Test #27487Axes.tripcolor
test_tripcolor (Issue #26864) plots with datetime on x-axis only , y-axis only, and both x- and y-axis #27491Axes.triplot
Added DateTime Test for triplot #27488Axes.violin
Added test for ax.violin #27486Axes.violinplot
Add axes.violinplot test from test_datetime.py #27521Axes.vlines
Add test_vlines to test_datetime.py #27410Axes.xcorr
MNT/TST: remove xcorr and acorr from test_datetime #27427