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

Change IRF plotting from imshow to pcolormesh #933

Merged
merged 6 commits into from Mar 5, 2017

Conversation

Projects
None yet
2 participants
@adonath
Member

adonath commented Mar 4, 2017

In #823 we agreed it is a good solution to change the plotting of IRFs from ´plt.imshow()´ to plt.pcolormesh(), because is correctly handles log axes and calls to plt.xlim() etc.

Further changes:

  • changed the default colormap for this plots from afmhot to the more neutral GnBu
  • remove any resampling of data for the plotting. All IRFs are now plotted with the binning defined by the data.

Just for the record:
When saved to pdf the plot created with plt.pcolormesh() is rendered as set of rectangles. The behaviour can be changed by calling plt.pcolormesh(..., rasterized=True).

@adonath adonath self-assigned this Mar 4, 2017

@adonath adonath added this to the 0.6 milestone Mar 4, 2017

@cdeil

This comment has been minimized.

Show comment
Hide comment
@cdeil

cdeil Mar 4, 2017

Member

Wonderful, thank you!

Please merge today so that we can reprocess the notebooks tomorrow and all is shiny and well on Monday. :-)

Member

cdeil commented Mar 4, 2017

Wonderful, thank you!

Please merge today so that we can reprocess the notebooks tomorrow and all is shiny and well on Monday. :-)

@adonath adonath merged commit 3dc34b1 into gammapy:master Mar 5, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@cdeil

This comment has been minimized.

Show comment
Hide comment
@cdeil

cdeil Mar 5, 2017

Member

@adonath - Thanks!!!

Did you want to re-render the notebooks with the plots fixed?
Or should I do it now?

I wanted to review content and clean up anyways, so I could do all of them in the next few hours. Just wanted to avoid duplicating work / merge conflicts in case you're doing it already.

Member

cdeil commented Mar 5, 2017

@adonath - Thanks!!!

Did you want to re-render the notebooks with the plots fixed?
Or should I do it now?

I wanted to review content and clean up anyways, so I could do all of them in the next few hours. Just wanted to avoid duplicating work / merge conflicts in case you're doing it already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment