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.

How to store the signals objects for later manipulation

See original GitHub issue

Question Template

ScottPlot Version: 4.1.14

Operating System: W10

Application Type: WinForms

Question: I am a bit stuck…not sure how to solve this. I have 3 independent plots and I want to store in an array or list all the signals object so I can manipulate them later. For example change linewith. color or remove a particular signal with:

formsPlot1.Plot.Remove(signalObjectToRemove);

Until now, I used the line below to manipulate the signal immediately:

var sigPlot = plotDest.Plot.AddSignalConst(signals[idx].Values, 1 / Ts);
sigPlot.LineWidth = 3;

What I need is somethig like below (which I tried but it doesn’t work):

signalsObject.Add(plotDest.Plot.AddSignalConst(signals[idx].Values, 1 / Ts));
// .....
// and in another location
signalsObject[index].LineWidth = 3;
// or
plotDest.Plot.Remove(signalsObject[index]);   // to delete a specific signal from the Plot

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
breakwinzcommented, May 23, 2021

Try private List<SignalPlotConst<double>> signalsObject;

1reaction
EFerucommented, May 23, 2021

Perfect! Tested and works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Determine Where to Store Variables and Objects for Simulink ...
Signal objects. Value types defined by Simulink.ValueType objects. Data types. Model configuration sets. Simulation input and output data. You can store ...
Read more >
Not Science Fiction: A New Method To Move Objects ...
A team of researchers at the University of Minnesota Twin Cities has uncovered a way to manipulate objects using ultrasound waves, ...
Read more >
Drag–and–Drop: How to Design for Ease of Use
Clear signifiers and clear feedback at all stages of the interaction make drag–and–drop discoverable and easy to use.
Read more >
How to modify and manipulate a shiny reactive object/data ...
My question is how you modify the reactive object data()?, lets say I want to change the column X to a date column...
Read more >
Signals in Angular – How to Write More Reactive Code
Creating a signal metaphorically creates a box and puts the value inside of that box. The box glows when the value of the...
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