AxesChanged - MatchAxis feature has shots and lags
See original GitHub issueI synchronize 2 or more FormsPlots using AxesChanged and MatchAxis. When I zoom or pan, there is a noticeable shot/lag in synchronization. It is also detectable in the demos. This has happened since the version 4.0.20 (version 4.0.19 is OK). Consider the following code which synchronizes 4 "FormsPlot"s, in previous versions it was perfect for synchronizing 4 FormsPlots each include a 10000 points Signal. But now it has shot/lag. (currently I have to use V4.0.19)
private void FormsPlot_AxesChanged(object sender, EventArgs e)
{
foreach (var plot in PlotList)
{
plot.plt.MatchAxis((sender as FormsPlot).plt, vertical: false);
plot.Render();
}
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It seems that it does the trick! 😎 Thanks a lot @swharden 😉 🙏🏻
Hey @robokamran this should be pretty easy. Currently the demo application syncs axes any time the source axis changes. This code produces the real-time axis matching you described:
https://github.com/swharden/ScottPlot/blob/08d42d0447a2cf0097f86c19969f973b0a71fa44/src/ScottPlot.Demo.WinForms/WinFormsDemos/LinkedPlots.cs#L35-L45
To make the axis matching only occur on MouseUp events, put the code above in formsPlot’s OnMouseUp events. That way the axes will only be changed when you release the mouse.
Let me know if this doesn’t do the trick!