Skip to content

Strip Chart Demo #540

@ATECoder

Description

@ATECoder

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BUGunexpected behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions