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

Fit intermittent plot blanking (#2267) #2300

Merged

Conversation

pbeaucage
Copy link
Contributor

Fixes #2267 by commenting out calls to matplotlib.pyplot.cla() which were already paired with the more specific alternative calls to self.ax.cla() (at best a duplicate, at worst it causes arbitrary plots to blank themselves as seen here.

It would be worth eyes from @rozyczko and @krzywon who wrote this originally to see if there's some reason I'm missing for the plt.cla() call. It seems to now work fine on my machine. The tell, even without a way to reproduce, is that when data is "Compute/Plot"'d on Main the plot briefly will flash to a white background with default axes from 0 to 1, linear, on both axes. That no longer happens on this branch, at least for me. Or see reproduction instructions in #2267.

@pbeaucage pbeaucage linked an issue Oct 27, 2022 that may be closed by this pull request
Copy link
Member

@rozyczko rozyczko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good.
All three places behave correctly:

  • on reset graph range
  • on hide/show error bars
  • on plot removal

I can't reproduce the original issue reliably, so can't comment on the applicability of the fix but it seems to be a step in the right direction.
A general improvement in chart responsiveness is also visible.

src/sas/qtgui/Plotting/Plotter.py Outdated Show resolved Hide resolved
@wpotrzebowski wpotrzebowski self-requested a review October 27, 2022 20:19
@wpotrzebowski wpotrzebowski merged commit 6d5a390 into main Oct 27, 2022
@wpotrzebowski wpotrzebowski deleted the 2267-plot-limits-intermittently-reset-to-01-on-all-axes branch October 27, 2022 20:20
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 limits intermittently reset to (0,1) on all axes
3 participants