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.

AxesChanged - MatchAxis feature has shots and lags

See original GitHub issue

I 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:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
robokamrancommented, Jun 11, 2020

It seems that it does the trick! 😎 Thanks a lot @swharden 😉 🙏🏻

0reactions
swhardencommented, Jun 10, 2020

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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