-
Notifications
You must be signed in to change notification settings - Fork 981
Description
What can we do to make ScottPlot better?
Bar charts are sometimes drawn with striped bars:

A good implementation would require support for stripes in the legend as well.
Does your proposed feature allow users to do new things in source code? If so, show us how you'd like to be able to use the new feature:
var barChart = plt.PlotBar(/* parameters */);
barChart.striped[2] = true;
//Conveniently, editing the stripiness this way (instead of through a lengthy `plt.PlotBar()` method means this approach needs no additional changes to work with bar charts created by `plt.PlotBarGroups()`You may prefer it support multiple patterns (striped one way, striped the other way, checkered, dotted, etc). This could be done with an enum like this:
enum BarPattern{
solid,
stripedUpwards,
stripedDownwards,
checkered
}And then barChart.striped[2] = true; becomes barChart.pattern[2] = Config.BarPattern.stripedUpwards. Conveniently, the HatchBrush and it's HatchStyle enum does this all for us. I may not be able to work on this until the weekend with uni but I'll put in a PR unless you want to.
Helpful documentation on hatchbrushes: https://docs.microsoft.com/en-us/dotnet/api/system.drawing.drawing2d.hatchbrush?view=dotnet-plat-ext-3.1
A picture of all the hatchstyles:

Check the ScottPlot Roadmap to see if your feature is already planned for an upcoming release:
https://github.com/swharden/ScottPlot/blob/master/dev/roadmap.md