-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Broken Documentation] API change for figurefirst:mplmethods
?
#57
Comments
Glad you're finding the library useful!
Yes, the documentation is incorrect great catch! We should fix this! However I believe the correct hierarchy should have the
I love this idea, particularly if we can implement it without calling I'm a little on the fence regarding the idea of using the flatter hierarchy in the SVG - In general I think that flat is better than nested, and cognitively I can see how it might make sense to have the properties be attributes of the That said, the pattern we have for most of the other 'additional function tags' is to add them as their own node directly under the
Where In any case, if we add the function, we should probably also create an extension to decorate the SVG since the original motivation for the library was to create a UI for matplotlib layout design. It's been a while but part of the reason for adopting the above strategy might have related to the ease of writing the extensions. Curious what others think. A PR would be very welcome! |
Thanks for the prompt reply!
Indeed. I got the correct way now by using the inkscape extension. Interesting the code seems quite flexible so the nested node also works.
I think your proposal is cool, although I'm not 100% sure how to distinguish the
That's true. If adhering to the API of 0.0.6 the proof-of-concept approach can be to create a node |
I think this is the general organization I was trying to suggest - we haven't really specified the figurefirst grammar anywhere in particular -- so the hierarchy I indicated above was mostly an attempt to generalize what I think is the most common pattern. Perhaps just following how the extensions tag things is the best idea. |
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 thefigurefirst: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 withinfigurefirst:axis
except reserved names likefigurefirst:name
, as a property ofmpl.axes.Axes
, and set the value using the setter.For instance:
In the current version the hierarchy is:
While in the proposed implementation
In the current version the hierarchy is:
I may have several reasons for this:
mplmethods
set_
prefix can be omitted, as from my personal usage, most likely themplmethod
of an axis instance is to call a setter of theAxes
class, e.g.ax.set_yticks=[]
for a subplot.mplmethod
can 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.
The text was updated successfully, but these errors were encountered: