Repository navigation
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. See https://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 behavior should 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 ;) ) in Add datetime testing skeleton #26859. - If you find a method that should 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 #27427 -
Axes.angle_spectrum -
Axes.annotate[TST] Added test_annotate in test_datetime.py #27222 -
Axes.arrow[TST] Added test_arrow in test_datetime.py #27372 -
Axes.axhlineAdd test_axhline in test_datetime.py #27177 -
Axes.axhspanadded test_axhspan in test_datetime.py #27139 -
Axes.axline[TST] Added test_axlines in test_datetime.py #27326 -
Axes.axvlineAdd test_axvline to test_datetime.py #27208 -
Axes.axvspanadded test_axvspan in test.datetime.py #27130 -
Axes.barAdd test_bar in test_datetime #27033 -
Axes.bar_labelAdded test for Axes.bar_label #27431 -
Axes.barbsAdded smoke test for Axes.barbs in test_datetime.py #27331 -
Axes.barhAdd test_barh to test_datetime.py #27084 -
Axes.boxplotAdd datetime testing for boxplot #27038 -
Axes.broken_barhAdded test for broken_barh to test_datetime.py #27428 -
Axes.bxpAdd test_bxp in test_datetime.py #27390 -
Axes.clabelDefined the test_clabel function in the test_datetime file #27490 -
Axes.cohere -
Axes.contourAdd test_contour under test_datetime.py #27013 -
Axes.contourfAdd test_contourf in test_datetime.py #27024 -
Axes.csd -
Axes.errorbarAdded smoke tests for Axes.errorbar in test_datetime.py #27185 -
Axes.eventplotAdd test_eventplot to test_datetime.py #27466 -
Axes.fillAdd test_fill in test_datetime.py #27401 -
Axes.fill_betweenAdd test for fill_between in test_datetime.py #27423 -
Axes.fill_betweenxAdded test_fill_betweenx in test_datetime.py #27425 -
Axes.hexbinAdded datetime smoke test for Axes.hexbin #27475 -
Axes.histAdded test_hist in test_datetime.py #27028 -
Axes.hist2dAdded test_hist2d #27418 -
Axes.hlinesAdd test_hlines to test_datetimes.py #27211 -
Axes.imshowAdded smoke test for Axes.imshow to test_datetime.py #27476 -
Axes.loglogAdded test_loglog in test_datetime.py #27435 -
Axes.magnitude_spectrum -
Axes.matshowAdded smoke test for Axes.matshow to test_datetime.py #27474 -
Axes.pcolorAdded test_pcolor in test_datetime.py #27391 -
Axes.pcolorfastAttempted to add test_pcolorfast in test_datetime.py #27450 -
Axes.pcolormeshAdded test_pcolormesh in test_datetime.py #27433 -
Axes.phase_spectrum -
Axes.pieRemove datetime test for axes.pie #27117 -
Axes.plot -
Axes.plot_dateadd test_plot_date in test_datetime.py #27037 -
Axes.psd -
Axes.quiverAdd test_quiver in test_datetime.py #27407 -
Axes.quiverkeyRemove test_quiverkey from test_datetime.py #27449 -
Axes.scatterAdd scatter test for datetime units #26882 -
Axes.semilogxAdd test_semilogx and test_semilogy tests to test_datetime #27320 -
Axes.semilogyAdd test_semilogx and test_semilogy tests to test_datetime #27320 -
Axes.specgram -
Remove test_spy from test_datetime.py #27392Axes.spy -
Axes.stackplotadd test_stackplot in test_datetime.py #27114 -
Axes.stairsAdded Axes.stairs test in test_datetime.py #27424 -
Axes.stemAdded smoke test for Axes.stem #27135 -
Axes.stepAdd test_step to test_datetime.py #27091 -
Axes.streamplotAdding test for axes.streamplot using datetime #27489 -
Axes.table -
Axes.textAdded smoke test for Axes.text in test_datetime.py #27142 -
Axes.tricontourAdded test for tricontour in test_datetime.py #27494 -
Axes.tricontourfAdded Axes.tricontourf Datetime Test #27487 -
Axes.tripcolortest_tripcolor (Issue #26864) plots with datetime on x-axis only , y-axis only, and both x- and y-axis #27491 -
Axes.triplotAdded DateTime Test for triplot #27488 -
Axes.violinAdd datetime test for ax.violin #30384 -
Axes.violinplotAdd axes.violinplot test from test_datetime.py #27521 -
Axes.vlinesAdd test_vlines to test_datetime.py #27410 -
Axes.xcorrMNT/TST: remove xcorr and acorr from test_datetime #27427
Activity
github-actions commentedon Sep 21, 2023
Good first issue - notes for new contributors
This issue is suited to new contributors because it does not require understanding of the Matplotlib internals. To get started, please see our contributing guide.
We do not assign issues. Check the Development section in the sidebar for linked pull requests (PRs). If there are none, feel free to start working on it. If there is an open PR, please collaborate on the work by reviewing it rather than duplicating it in a competing PR.
If something is unclear, please reach out on any of our communication channels.
seohyeonlee2020 commentedon Sep 22, 2023
Hello! I'll take Axes.scatter
tgmiller5 commentedon Oct 1, 2023
Hello, I will take the axes.bar
ayushrathore111 commentedon Oct 3, 2023
hii @tacaswell
I'll start working on Axes.boxplot.
thank you.
ksunden commentedon Oct 3, 2023
Note we are testing
matplotlibunit support here, so please use numpy/matplotlib/datetime only in these tests (e.g. not pandas)kots14 commentedon Oct 4, 2023
Hi @tacaswell
I'm starting to work on Axes.contour.
Quetzalcoatl29 commentedon Oct 5, 2023
Hi @tacaswell I'd like to be assigned on one or more tasks
rcomer commentedon Oct 5, 2023
Hi @Quetzalcoatl29, we do not assign tasks. Please work on whichever one you like. If you comment to say which you are starting on, as others have done, then that will help to prevent duplication of effort.
Add test_contour for matplotlib#26864
Add test_contour matplotlib#26864
58 remaining items
EthanZheng11 commentedon Dec 9, 2023
I will work on Axes.tricontourf.
jhimanish commentedon Dec 10, 2023
Hi, I'm new to Open-Source Contributions but I'd like to contribute towards this project. I can work on creating a test for axes.streamplot.
Thank you
Issue matplotlib#26864 test_hexbin added extent and marginals, modifi…
Issue matplotlib#26864 test_tripcolor plot with datetime on x-, y-, a…
ksunden commentedon Dec 11, 2023
I do believe we now have PRs (at least) opened for each of these.
Thank you to all of the first time contributors who helped get us this far.
Add test_contour under test_datetime.py (#27013)
Elllllllvin commentedon Dec 20, 2023
Hello , I would like to tackle the Axes.quiver if you don't mind, since i notice that it has not been solved yet.
ksunden commentedon Dec 20, 2023
Please note that we have an open PR for Quiver, and we generally prefer the earlier PR when possible. #27407
ksunden commentedon Dec 20, 2023
I'm removing the good first issue tag because we have PRs at least started for all points here.
Elllllllvin commentedon Dec 20, 2023
Thank you for your reply. I just noticed that the previous #27407 did not fully solve the problem. It only tested X and did not test Y, and the previous pull request has not been merged, so I thought I could continue to contribute to this issue.