ScottPlot/ScottPlot

VectorField: Add ScaleFactor

hnMel opened this issue · 1 comments

hnMel commented

Can Custom Scale Factor from ScottPlot 4 be added to ScottPlot 5?

Hi @hnMel, thanks for the question! Here's the ScottPlot 4 feature: https://scottplot.net/cookbook/4.1/recipes/vectorfield_scalefactor/

I like the idea of adding this to ScottPlot 5! I'll mark this "help wanted" in case someone else from the open source community is able to add this feature before I get to it. The lines of code which would need to be modified are probably these, and a good implementation would be to modify them to be like, "if a scale factor property is other than 1.0, create a copy of the data values, multiply them by the scale factor, and pass those values instead"

ArrowStyle.Render(dims, gfx, Xs, Ys, Vectors, VectorColors);

return new AxisLimits(Xs.Min() - 1, Xs.Max() + 1, Ys.Min() - 1, Ys.Max() + 1);