Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Description
Documentation Link
No response
Problem
It's documented in the tutorialhttps://matplotlib.org/stable/tutorials/advanced/transforms_tutorial.html#data-coordinates, but not very discoverable:
- People search for it on Github:
https://github.com/matplotlib/matplotlib/graphs/traffic - Search does not yield useful results:https://matplotlib.org/stable/search.html?q=transData
Problem:transData
and the likes are only attributes set in a [private function]/(
matplotlib/lib/matplotlib/axes/_base.py
Line 910 in39070ae
self.transData=self.transScale+ (self.transLimits+self.transAxes) |
As such, they do not have a docstring and do not appear in the API documentation.
Suggested improvement
Action: Find out, how to make this available in the API docs athttps://github.com/matplotlib/matplotlib/blob/main/doc/api/axes_api.rst
Worth checking:
- https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#directive-autoattribute
- or manually:https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#directive-py-attribute
Alternative: Turn thetrans*
attributes into properties. They can be documented properly and have the advantage of being read-only. This is a slight performance cost, but should be negligible compared to any action involving the transforms.