Skip to content

ScottPlot 4.1#521

Closed
swharden wants to merge 60 commits intomasterfrom
4.1
Closed

ScottPlot 4.1#521
swharden wants to merge 60 commits intomasterfrom
4.1

Conversation

@swharden
Copy link
Member

@swharden swharden commented Aug 27, 2020

This branch/PR tracks development of ScottPlot 5 (#505)

  • Contents of /src will be moved into /src/ScottPlot4 and work will begin in /src/ScottPlot5

  • ScottPlot 4 will be preserved and maintained, with new releases that are free of breaking changes

  • ScottPlot 5 will have breaking API changes, and be distributed on NuGet as "pre-release" until it is stable

@swharden swharden mentioned this pull request Aug 29, 2020
SystemDrawingRenderer is now created and passed in.

IPlottable and IRenderable do not depend on System.Drawing.
@swharden
Copy link
Member Author

IRenderer now describes a rendering system, and IPlottable and IRenderable objects do not depend on System.Drawing at all anymore. Every drawing action is performed by calling a method of IRenderer.

By default a SystemDrawingRenderer is created and used, but there is a clear path forward to create controls which use custom renderers (e.g., SkiaSharpRenderer).

tick generation class is its own module and could easily be replaced with experimental tick systems
except for PlotInfo (required for click-drag mouse operations) and the List of Renderables, the Plot module is now stateless.
figure dimension state (Height and Width) was added back
adjustments to figure PADDING (triggered manually) are now distinct from adjustments to figure SIZE (triggered with every render)
@swharden
Copy link
Member Author

swharden commented Sep 4, 2020

@StendProg you may be interested to see there is now a working SkiaSharp control.

This project still needs a lot of improvement, but this early proof-of-concept is very encouraging!

@swharden swharden mentioned this pull request Sep 4, 2020
@swharden swharden changed the title ScottPlot 4.1 Version after ScottPlot 4.0 Sep 6, 2020
@swharden swharden changed the title Version after ScottPlot 4.0 Experimental ScottPlot 5 Sep 6, 2020
@swharden swharden changed the title Experimental ScottPlot 5 ScottPlot 5 Sep 6, 2020
axes are automatically added when plottables are seen indexing them

also removed the OnRender delegate because there were too many cases where it wouldn't work well (e.g., after changing color, or adding a plottable to the list manually). See discussion in #525
@StendProg
Copy link
Contributor

Hi Scott (@swharden ),

@StendProg you may be interested to see there is now a working SkiaSharp control.
This project still needs a lot of improvement, but this early proof-of-concept is very encouraging!

This works awesome! After some tunings (disable rounded corners, call signle Canvas.DrawPoints()) i get two 20_000 points Scatters work at acceptable 20-30 FPS.

I pereodically check your work on this branch. Of course, minor nitpicks arise, but I do not consider them significant enough to distract you from your main work. And now I will not.

The only thing that raises concerns is that you have started too large-scale changes. Wouldn't have stopped in the middle.

You can leave the implementation of the Skia Renderer for later. Maybe I can help when the architecture is finally settled.
The only thing to keep in mind is to avoid a lot of simple calls to the IRenderer, and instead try to make a single call with multiple data like Renderer.DrawPoints().

I fully agree that such changes deserve an major version increment. Good work!

@swharden
Copy link
Member Author

swharden commented Sep 6, 2020

Thank you for your feedback @StendProg!

I too am concerned about the scale of these changes and the breaking API, and it sounds like we are in agreement that a major version increment is the way to go here. Maintaining ScottPlot4 while developing ScottPlot5 in a separate folder seems like a good way to move forward, since I won't have to stop work on either one to support the other.

I learned a lot by working in this branch, especially about how to support multiple axes and improve the layout system. I think I can take much of what I have learned here and apply it to ScottPlot 4.0 in a way that is non-breaking. I'll probably stop work on this branch for a few days to work on ScottPlot 4, then return to this with fresh eyes.

Thank you again for your input along the way!

This was referenced Sep 6, 2020
@swharden
Copy link
Member Author

This is a great start, but there are many concepts here which can be applied to ScottPlot 4 to make it better (without throwing it away and starting over).

I'm going to close this PR and copy these files into a folder in the main repository so it can be used for experimentation.

@swharden swharden closed this Sep 20, 2020
swharden added a commit that referenced this pull request Sep 22, 2020
@swharden swharden deleted the 4.1 branch September 22, 2020 18:52
@NarasimhaKulkarni
Copy link

Hi Scott,

When will be the next stable (Scottplot 5) release. Does it supports more than 2 y-axis (additional/multiple y-axis for multiple plots) ?
We are in process of migrating ZED graph to Scottplot. Hence required multiple y-axis support.

@swharden
Copy link
Member Author

HI @NarasimhaKulkarni,

After a lot of work I was able to implement all these features while retaining the original ScottPlot 4 API (although some methods were marked obsolete). Because of this, plans outlined above eventually became ScottPlot 4.1, which is currently on NuGet as a pre-release package.

ScottPlot 4.1 indeed supports multiple axes and can be used now

Good luck with your migration!

@swharden swharden changed the title ScottPlot 5 ScottPlot 4.1 Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants