You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using a DataLogger to log real time data thatt I obtain from a Server. ( I've started looking at the example provided in the demos)
I have two actions to perform on it, start that as the name suggests start the log and stop.
When i click stop the data acquisition stops and i'd like to be able to perform actions on the plot, such as ZoomIn and ZoomOut and move left and right.
I've called my variable Logger = formsPlot1.Plot.Add.DataLogger(); (So that you can know what I am referring to)
The problem is that when I per form the ZoomIn as long as the Logger remains within the plottable areea there are no problems, but as soon as it goes beyond it, the data gets automatically fully showed, "bouncing back" (see video)
Please nothe that the button I am clicking performs a formsPlot1.Plot.Axes.Zoom(1.2, 1); formsPlot1.Refresh();
PXL_20240507_083050811.mp4
For what is concerning the code i an using ViewSlide() for visualization and then when I stop the data collection i pass to ViewFull(), otherwise when I try to do just an easy autoscaleX orY the plot becomes blank.
Last note to successfully be able to visualize data I had to set formsPlot1.Plot.MoveToFront(Logger);
If I do not do it I obtain:
Moreover I've found some issues with formsPlot1.Refresh(); that does refresh the plot as it should, leading to situations as the pic above
ScottPlot Version: 5.0.34
.Net Framework 4.6.2
C# version
The text was updated successfully, but these errors were encountered:
cataclism
changed the title
Logger has a strange behaviour when visualizing data
DataLogger has a strange behaviour when visualizing data
May 7, 2024
I've managed to obtain a workaround to better visualize the data, which is that to insert all the data in a SignalXY, and toggle the visibility of the logger off. It works but i need to perform a formsPlot1.Plot.Clear().
When then I restart the data acquisition nothing shows up, even after Logger.IsVisible = true,SignalXY.IsVisible = false and formsPlot1.Plot.MoveToFront(Logger);
There is something that breaks when clearing out everything to show again the real time data.
Hi @cataclism, thanks for sharing this! I feel bad for closing this issue, but I can't reproduce the effect you show in your video (the datalogger example in the demo app works well for me), and you don't share the code of your app so I can't offer many suggestions.
I think the problem is this:
formsPlot1.Plot.Axes.Zoom(1.2,1);
Removing that line may solve your problem.
If you're using a data logger, you should either let it manage the axis limits, or you should manually manage the limits. I think what is happening is that you're both trying to manage the limits and you are "fighting" each other. If you wish to use custom scaling, you should disable automatic axis management:
Logger.ManageAxisLimits =false;
When i click stop the data acquisition stops and i'd like to be able to perform actions on the plot, such as ZoomIn and ZoomOut and move left and right.
Consider using commands like this to toggle user interactions so the user's mouse never "fights" with the data logger's automatic axis management
Question:
I'm using a DataLogger to log real time data thatt I obtain from a Server. ( I've started looking at the example provided in the demos)
I have two actions to perform on it, start that as the name suggests start the log and stop.
When i click stop the data acquisition stops and i'd like to be able to perform actions on the plot, such as ZoomIn and ZoomOut and move left and right.
I've called my variable
Logger = formsPlot1.Plot.Add.DataLogger();
(So that you can know what I am referring to)The problem is that when I per form the ZoomIn as long as the Logger remains within the plottable areea there are no problems, but as soon as it goes beyond it, the data gets automatically fully showed, "bouncing back" (see video)
Please nothe that the button I am clicking performs a
formsPlot1.Plot.Axes.Zoom(1.2, 1); formsPlot1.Refresh();
PXL_20240507_083050811.mp4
For what is concerning the code i an using ViewSlide() for visualization and then when I stop the data collection i pass to ViewFull(), otherwise when I try to do just an easy autoscaleX orY the plot becomes blank.
Last note to successfully be able to visualize data I had to set
formsPlot1.Plot.MoveToFront(Logger);
If I do not do it I obtain:
Moreover I've found some issues with
formsPlot1.Refresh();
that does refresh the plot as it should, leading to situations as the pic aboveScottPlot Version: 5.0.34
.Net Framework 4.6.2
C# version
The text was updated successfully, but these errors were encountered: