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

waterfall plot y limits not working #1108

Closed
m-philipps opened this issue Aug 21, 2023 · 2 comments · Fixed by #1109
Closed

waterfall plot y limits not working #1108

m-philipps opened this issue Aug 21, 2023 · 2 comments · Fixed by #1109
Assignees
Labels
bug Something isn't working visualization Related to any visualization

Comments

@m-philipps
Copy link
Contributor

It is not always possible to set the y limits of a waterfall plot using the y_limits argument, because
this condition:

if ax.get_yscale() == 'log' and y_limits[0] <= 0.0:

needs to be fulfilled in order to reach this line:

ax.set_ylim(y_limits)

@m-philipps m-philipps added bug Something isn't working visualization Related to any visualization labels Aug 21, 2023
@m-philipps m-philipps self-assigned this Aug 21, 2023
@m-philipps
Copy link
Contributor Author

Does it make sense to set the same y limits for the zoomed-in starts?

if inset_axes is not None:
inset_axes = handle_options(
inset_axes, n_starts_to_zoom, refs, y_limits, offset_y
)

I would suggest to choose the y limits automatically here, i.e. use y_limits=None in the call above

@m-philipps m-philipps mentioned this issue Aug 22, 2023
@dweindl
Copy link
Member

dweindl commented Aug 22, 2023

It is not always possible to set the y limits of a waterfall plot using the y_limits argument, because

I'd say that's an identation bug at

# set limits
ax.set_ylim(y_limits)

Dedenting those lines solves the issue, right?

Does it make sense to set the same y limits for the zoomed-in starts?

Probably not. Letting matplotlib choose limits sounds plausible.

m-philipps added a commit that referenced this issue Aug 22, 2023
* enable setting the y limits of a waterfall plot by using the y_limits argument
* use default y limits for zoomed in starts
* fix #1108

Co-authored-by: Paul Jonas Jost <70631928+PaulJonasJost@users.noreply.github.com>
@plakrisenko plakrisenko linked a pull request Aug 28, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working visualization Related to any visualization
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants