question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Plot.Clear() doesn't clear everything

See original GitHub issue

This is a good example of a bad software pattern. Switch statements don’t get updated when new pottables are added.

This hack works to clear experimental plottables (relates to #249):

wpfPlot1.plt.GetPlottables().Clear();

Perhaps Clear should only have two simple overloads:

  • Clear() to clear all
  • Clear(Type) to clear just that plottable type

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
swhardencommented, Mar 24, 2020

I think this is happening for the new ErrorBarsPlottable that was added.

Thanks for bringing this to my attention! I’ll prioritize fixing this and getting it on NuGet.

Is there a quick fix?

Something like:

plt.GetPlottables().Clear()

(let me know if that does the trick)

0reactions
swhardencommented, Mar 28, 2020

released in 4.0.24

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Clear A Plot In Python (without closing the window)
The matplotlib.pyplot.cla() function clears the current Axes state without closing the Axes. The elements within the Axes are not dropped ...
Read more >
How to clear memory completely of all matplotlib plots
from matplotlib import pyplot as plt f = plt.figure() f.clear() ... that creates 100 figures then attempts to delete them all from memory:...
Read more >
Plot.Clear() doesn't clear everything · Issue #275 · ScottPlot ...
Switch statements don't get updated when new pottables are added. This hack works to clear experimental plottables (relates to #249):. wpfPlot1.
Read more >
How to clear the memory completely of all Matplotlib plots
How to clear the memory completely of all Matplotlib plots? · close() by itself closes the current figure · close(h), where h is...
Read more >
MATLAB clf - Clear figure
clf('reset') deletes all children of the current figure regardless of their handle visibility. It also resets the figure properties to their default values, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found