10000 DOC: add units to user/explain [ci doc] · matplotlib/matplotlib@19cef4c · GitHub
[go: up one dir, main page]

Skip to content

Commit 19cef4c

Browse files
committed
DOC: add units to user/explain [ci doc]
1 parent 3625a74 commit 19cef4c

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

galleries/users_explain/axes/axes_units.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,19 @@
275275
# converter will be ``_SwitchableDateConverter``; if it has has strings in it,
276276
# it will be sent to the ``StrCategoryConverter``.
277277

278-
for k in munits.registry:
279-
print(f"type: {k};\n converter: {munits.registry[k]}")
278+
for k, v in munits.registry.items():
279+
print(f"type: {k};\n converter: {type(v)}")
280280

281281
# %%
282282
#
283-
# Downstream libraries like `pandas <https://pandas.pydata.org>`_,
284-
# `astropy <https://www.astropy.org>`_, `pint <https://pint.readthedocs.io>`_
285-
# and others supply their own converters that can be used with Matplotlib.
283+
# There are a number of downstream libraries that provide their own converters
284+
# with locators and formatters. Physical unit support is provided by
285+
# `astropy <https://www.astropy.org>`_, `pint <https://pint.readthedocs.io>`_, and
286+
# `unyt <https://unyt.readthedocs.io>`_, among others.
287+
#
288+
# High level libraries like `pandas <https://pandas.pydata.org>`_ and
289+
# `nc-time-axis <https://nc-time-axis.readthedocs.io>`_ (and thus
290+
# `xarray <https://docs.xarray.dev>`_) provide their own datetime support.
291+
# This support can sometimes be incompatible with Matplotlib native datetime
292+
# support, so care should be taken when using Matplotlib locators and
293+
# formatters if these libraries are being used.

galleries/users_explain/axes/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ annotations like x- and y-labels, titles, and legends.
2424
color='darkgrey')
2525
fig.suptitle('plt.subplots()')
2626

27-
2827
.. toctree::
2928
:maxdepth: 2
3029

0 commit comments

Comments
 (0)
0