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.

Describe the bug It seems the plot.Clear() does not remove a previously plotted PlotSignal

To Reproduce (1) Use plt.PlotSignal to plot a signal. (2) on the same form, use plt.Clear() to clear all Plottables. (3) add plot.Scatter (4) render the form (5) plot seems to switch between the Signal and Scatter plots.

The code below shows how the signal can be removed. However, I thought .Clear() should have done that. .Clear(Of did not seem to remove the signal either.

       With Me._ScottPlot.plt
            .Clear()
            Me._Signal = .PlotSignal(Me.OrdinateValues, Me.SamplingRate, markerSize:=0)
            .Title("'Sampled' Sine Wave")
            .YLabel("wave")
            .XLabel("Seconds")
            .Grid(Me._GridCheckBox.Checked)
            .AxisAuto(0)
        End With

        With Me._ScottPlot.plt
            .Clear()
            If Me.Signal IsNot Nothing Then .Remove(Signal)
            .PlotScatter(Me.AbscissaValues, Me.OrdinateValues)
            .PlotScatter(Me.AbscissaValues, Me.OrdinateCosineValues)
            .Title("Sine Wave Phase fixed size")
            .YLabel("signals")
            .XLabel("phase")
            .AxisAuto(0)
        End With

Screenshots If applicable, add screenshots to help explain your problem

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
StendProgcommented, Sep 11, 2020

It may well be that a @AteCoder does not want to make his project accessible to absolutely everyone. Just mail directly to @swharden or/and me (stendgit@gmail.com) if i guess right.

0reactions
swhardencommented, Sep 13, 2020

Instead of making a separate strip chart demo, I just updated the WinForms “live data” demo to show an ECG. There is an option to switch between “roll” and “scroll” behavior. I’ll do the same for the WPF demo.

Note that there are two timers: one for updating the simulated data, and a separate timer for rendering. This way slowness of one process will not affect the other 👍

ecg2

ecg3

https://github.com/swharden/ScottPlot/blob/096062f5dfde8fd5f1e2eb2e15e0e7ce9b17a54b/src/ScottPlot.Demo.WinForms/WinFormsDemos/LiveDataUpdate.cs#L14-L91

Read more comments on GitHub >

github_iconTop Results From Across the Web

R Strip Chart (with Examples)
A strip chart is a type of chart that displays numerical data along a single strip. A strip chart can be used to...
Read more >
Strip Chart Demo
Strip Chart Demo ... A data source is specified to which data is appended at regular intervals. When new data is added, the...
Read more >
Strip Plot
Strip Plot. Demo source ... This demo was created using amCharts 5. ... Create chart // https://www.amcharts.com/docs/v5/charts/xy-chart/ var chart ...
Read more >
R Strip Chart (With Examples)
Strip charts can be created using the stripchart() function in R programming language. This function takes in a numeric vector or a list...
Read more >
GLG Real-Time Strip Chart Web Demo (HTML5 & JavaScript)
This pure HTML5 and JavaScript strip chart example demonstrates features of the GLG ... The demo loads a GLG drawing containing a real-time...
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