-
Notifications
You must be signed in to change notification settings - Fork 127
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
Update mpl drawer backend to support unshared axes #1242
Update mpl drawer backend to support unshared axes #1242
Conversation
4596518
to
35fe340
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm approving because my comments don't have to block approval. For each of the comments, you are free to accept or reject it.
- Do you think "if there are multiple columns in the canvas" is clear enough?
- Instead of the lists
limit
,unit
, etc. it's better to have a single list where each item has data memberslimit
unit
etc. - Prefer
zip
overenumerate
. - Is there a reason that
scale
is excluded, i.e., always the same for all the sub-axes?
Thanks @yaelbh. I'll merge this PR.
I'm not sure if this is enough, but this is from the original documentation. I found a typo and fixed in 1217836. Thanks!
This is good idea. Probably we can introduce cleaner subplot mechanism in a follow up PR, i.e. introducing a dataclass that stores subplot configuration, and set multiple dataclass instances to write multi-axis figure. This PR aims at implementation of minimal functionality for Stark experiment.
Yes, this makes sense if we have such configuration dataclass. Writing zip for every configuration is bit lengthy.
I'm not sure if I understand. Current implementation doesn't support axis-wide scaling. This is because if we allow such setup we need to optimize the margin between axes to have tick labels otherwise we cannot stack axes with different scaling option. Implementation is not difficult but overkill for Stark experiment. I'll create a follow up PR based upon request. |
Thanks @nkanazawa1989, can be merged when green. |
…1242) ### Summary Experiment plotter can create a multi-sub canvas (axes) figure, but x and y plot range (xlim/ylim in matplotlib) must be shared among sub axes. This PR relaxes this limitation and allows a developer to write analysis class that can generate figure containing axes with different plot ranges. ### Details and comments Several figure options are updated to take a list of options for each axis. New options ``sharex`` and ``sharey`` are added to unlink the axis settings. These new options are True by default for backward compatibility.
Summary
Experiment plotter can create a multi-sub canvas (axes) figure, but x and y plot range (xlim/ylim in matplotlib) must be shared among sub axes. This PR relaxes this limitation and allows a developer to write analysis class that can generate figure containing axes with different plot ranges.
Details and comments
Several figure options are updated to take a list of options for each axis. New options
sharex
andsharey
are added to unlink the axis settings. These new options are True by default for backward compatibility.