-
Notifications
You must be signed in to change notification settings - Fork 52
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
[MRG] GUI dipole plot bug. #695
[MRG] GUI dipole plot bug. #695
Conversation
…lib 8.x deprecation of ax._get_lines.prop_cycler.
Below is the code I used to run the gui to debug with an IDE. @ntolley @dylansdaniels Note that this is a much simpler way to do it without importing the underlying run function that I showed during our meeting.
|
@@ -150,7 +150,7 @@ def _update_ax(fig, ax, single_simulation, sim_name, plot_type, plot_config): | |||
|
|||
elif plot_type == 'PSD': | |||
if len(dpls_copied) > 0: | |||
color = next(ax._get_lines.prop_cycler)['color'] | |||
color = ax._get_lines.get_next_color() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this API change work for earlier versions of matplotlib as well? If so I'm definitely happy to merge as is!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I developed with 3.8.2 and tested it with matplotlib older versions 3.5.3 and 3.7.4. ">=3.5.3" is what is specified in the setup file.
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #695 +/- ##
=======================================
Coverage 91.34% 91.34%
=======================================
Files 25 25
Lines 4599 4599
=======================================
Hits 4201 4201
Misses 398 398 ☔ View full report in Codecov by Sentry. |
@gtdang any idea why was this problem not caught in the tests so far? |
From quickly looking at the tests... This error wouldn't have be caught by
Oh, also do we know which version(s) of matplotlib the automated tests are running? If they are running <3.8 then there would be no problem with the GUI... |
@jasmainak We should probably add checks for each type of figure that can be generated through the GUI in a follow-up PR. |
Beautiful, good to go once tests pass. @gtdang once it's ready on your end, please set the title to be [MRG]. We use WIP and MRG to indicate the state of the PR ... prevents us from merging a PR that's not ready yet |
@ntolley merge button is yours! |
assert gui.viz_manager.fig_idx['idx'] == 2 | ||
|
||
# Check default figs have data on their axis | ||
assert gui.viz_manager.figs[1].axes[0].has_data() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the has_data()
docstring:
This should not be used to determine whether the dataLim need to be updated, and may not actually be useful for anything.
Useful for us! 😄
ax._get_lines.prop_cycler
. Substituted withax._get_lines.get_next_color()
.closes #694 #688