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

Allow passing of ax to Subarray.peek, do not always call tight_layout #2369

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

maxnoe
Copy link
Member

@maxnoe maxnoe commented Jun 26, 2023

No description provided.

@kosack
Copy link
Contributor

kosack commented Jun 26, 2023

What is the use case here? Really, you should just use an ArrayDisplay directly to do any more fancy plotting, the peek() function is for debugging or a quick look at what is there, not to make useful figures. One of the design considerations early on in ctapipe was to avoid having plotting functions inside classes (after lessons learned about deep circular dependencies), which I agree is sort of violated already with this and the atmosphere module...

@maxnoe
Copy link
Member Author

maxnoe commented Jun 27, 2023

The main thing I wanted to address was that I got a large warning from matplotlib from the .peek() methd in a notebook where I had constrained layout enabled by default for all figures.

Then, I am of the strong opinion that any matplotlib related function should allow overriding in which axes the thing is plotted, so I added that.

Copy link

codecov bot commented Nov 17, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (49ab82b) 60.60% compared to head (4ee3705) 60.60%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2369   +/-   ##
=======================================
  Coverage   60.60%   60.60%           
=======================================
  Files           3        3           
  Lines          33       33           
=======================================
  Hits           20       20           
  Misses         13       13           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@maxnoe maxnoe merged commit fbe8f05 into main Dec 1, 2023
14 checks passed
@maxnoe maxnoe deleted the peek_axes branch December 1, 2023 10:25
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.

3 participants