Skip to content
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

Add plot_only option in plot_data_model_comparison #155

Merged
merged 3 commits into from
Jun 10, 2024
Merged

Add plot_only option in plot_data_model_comparison #155

merged 3 commits into from
Jun 10, 2024

Conversation

0ctagon
Copy link
Collaborator

@0ctagon 0ctagon commented Jun 5, 2024

Only getting the main or comparison ax from plot_data_model_comparison() is not that trivial. Copying/moving axes to other figures is impossible to do in matplotlib. To redo the axes, the user could redo the plot by calling plot_model() and plot_error_hist(), or copy/pasting what we do for functions for the comparison ax, but this solution is complicated and the plot is already here in plot_data_model_comparison(). The user could use fig.delaxes(), but he needs to put the ticks and label back for ax_main, and the figzise will still be the 2 axes one, resizing the ax_comparison to a standard size is messy.`

This proposition is a small quality of life improvement to give the user the possibility to only keep one of the two axes on the fig, and remove the other, that works cleanly.

model_only_main
model_only_comp

@0ctagon 0ctagon requested a review from cyrraz June 5, 2024 04:05
Copy link
Owner

@cyrraz cyrraz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you for this PR.

@0ctagon 0ctagon requested a review from cyrraz June 10, 2024 03:18
@0ctagon
Copy link
Collaborator Author

0ctagon commented Jun 10, 2024

We could do a minor release after #154 and this PR are merged

@0ctagon 0ctagon merged commit 2a783ec into main Jun 10, 2024
5 checks passed
@0ctagon 0ctagon deleted the plot_only branch June 10, 2024 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants