-
Notifications
You must be signed in to change notification settings - Fork 13
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
enable passing of external Axes to plot on #802
Conversation
P.S.: "we" here is me and @cwmeijer :) |
6535e5a
to
3607930
Compare
Whoops, forgot to rebase on main, done now. |
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.
Looks good to me! 🚀🚀
Minor nitpick would be to also add types to the heatmap plot while you are at it 😅
Your nitpick is my command ;) I did not hint it completely. The matplotlib stuff is just too complex and bloaty and increases maintenance cost. I think the reference in the docstring to go look at mpl.Axes.imshow is best for those options. |
The CI failures are HTTP timeouts unrelated to this PR. |
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.
Top! Could you first accept my two other suggestions (same as in the other file)? Thanks for this addition!
Will you merge when you think it's done? |
Adds to the plot_image and plot_tabular functions an optional argument ax: plt.Axes. When given, this is the Axes that will be used to plot on and the internal plt.subplots call is skipped. This is useful for using these functions in custom multi-panel plots (we want to use this in a paper).
37483d9
to
4052032
Compare
Adds to the plot_image and plot_tabular functions an optional argument ax: plt.Axes. When given, this is the Axes that will be used to plot on and the internal plt.subplots call is skipped. This is useful for using these functions in custom multi-panel plots (we want to use this in a paper).
We actually only need this for the
plot_image
function, but I added it toplot_tabular
as a bonus ;) Theplot_timeseries
function is too complicated, I don't have time to add it there right now, but the principle will be similar (except now the ax has to be passed through three layers of helper functions).