-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Hi
Thanks a lot for the wonderful package! I really enjoyed the workflow of FigureFirst and is gradually checking the examples.
I think the documentation for the axis methods is somehow broken (https://figurefirst.readthedocs.io/en/latest/examples.html#axis-methods), as the code in the example has no effect to draw an hspan.
From what I understand, in version 0.0.6 you need to add a node figurefirst:mplmethods inside the figurefirst:axis node. Is that correct?
Also there're some side thoughts, I propose to add another functionality FigureLayout.set_axis_props which parse the attributes within figurefirst:axis except reserved names like figurefirst:name, as a property of mpl.axes.Axes, and set the value using the setter.
For instance:
In the current version the hierarchy is:
figurefirst:axis node
figurefirst: mplmethods node
figurefirst:set_yticks="[]"
While in the proposed implementation
In the current version the hierarchy is:
figurefirst:axis node
figurefirst:yticks="[]"
I may have several reasons for this:
- The readability is better than the
mplmethods - Explicitly writing the
set_prefix can be omitted, as from my personal usage, most likely themplmethodof an axis instance is to call a setter of theAxesclass, e.g.ax.set_yticks=[]for a subplot. - In this case
mplmethodcan be some functions that solely does simple plotting / patching jobs.
I appreciate much your feedback / suggestions.Happy to contribute PRs if you find it reasonable.