1086 Implement an update method in RadarPlot#1091
Conversation
Corrected some typos in the comments
|
It looks like you forgot to autoformat your code, we use dotnet-format: https://github.com/dotnet/format I don't have time to review your code now, but thanks for contributing! |
I've followed Scott's short and comprehensive guide in issue #1092 and hope formatting is now OK.
Thank you! |
|
Thanks for this PR @arthurits, it looks great! I added more XML docs to try to make this plot type and its options less confusing. I also pulled some of your code comments out of the code and am copying them here so they're easier to discuss: Normalize on every render?
Restating the suggestion, normalizing inside The drawback is that normalizing on every render could degrade performance, but there are probably a small number of values in these arrays so perhaps the hit is negligible. We may want to benchmark this so we can discuss it quantitatively rather than speculate about what the performance it is. @bclehmann do you have a preference here? |
|
This PR solves the #1086 issue so I'm going to go ahead and merge it, but if refactoring is desired related to #1091 (comment) we can make a new issue/PR to track progress on that front. Thanks again for your help here @arthurits, and congratulations on your successful pull request! 👍 🎉 🚀 |
I think any performance hit here is going to be inconsequential, we normalize heatmaps with more than a million times as many values as we expect to have here very quickly. In fact, for small heatmaps (100x100 ish) we could probably eschew precomputing and get away with it, not that I would recommend it. I think normalizing on render gives a better API and the performance impact is likely to be negligible. There is another option, make the |
Thanks for your input! Next time I work on this module I'll see about refactoring toward this.
This is possible, but I think Using properties users have to remember to change |
|
Just one more related issued. The new Not sure if it's a good idea to force the user to set the |
Good point! That argument has a default value in ScottPlot/src/ScottPlot/Plot/Plot.Add.cs Line 729 in a86a0ba but not in I'll modify |
made independentAxes default to false to be consistent with Plot.AddRadar() #1091
Purpose:
Pull request for issue #1086
New functionality:
Implements an
Update()method.The class initializer calls this
Update()method.Norm,NormMax, andNormMaxesare no longerreadonly.Added documentation.
Suggestions (as comments) for leaving out the
Array.Copyas well as for moving the normalization to theRender()method.