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

fix plot_2d color fill #187

Merged
merged 3 commits into from
Feb 7, 2022
Merged

fix plot_2d color fill #187

merged 3 commits into from
Feb 7, 2022

Conversation

patrick-reinhard
Copy link
Collaborator

@patrick-reinhard patrick-reinhard commented Jan 11, 2022

pytest for python versions 3.8, 3.9 3.10 are failing, fixes for this are in #193

This PR addresses issue #182

For curves with negative values the plot_2d(plot_curve=True) was not coming up correctly because the extent of then imshow ran from 0 to max(curve_data). Now the extent is:

extent = [min(curve_data) or 0, max(curve_data) or default, curve.stop, curve.start]

This allows for complete color fill of the curve.

Also enabled axis tick labels when plotting the curve because it has a dimension, unlike the plot_curve=False plot.

Previous output before changes:

image

Output with these changes:

image

@patrick-reinhard patrick-reinhard changed the title fix 2d plotting curve color mask + some small formatting and pep8 fixes fix plot_2d color fill Jan 11, 2022
@patrick-reinhard patrick-reinhard linked an issue Jan 11, 2022 that may be closed by this pull request
@kwinkunks kwinkunks merged commit b1f037b into develop Feb 7, 2022
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.

plot_2d is broken
2 participants