-
Notifications
You must be signed in to change notification settings - Fork 981
Closed
Description
Feature Suggestion
Feature description:
Possibility to add rectangles to a Plot.
It could be an interesting feature to highlight a specific area.
Code example:
var plt = new ScottPlot.Plot(600, 400);
plt.AddSignal(DataGen.Sin(51));
var rect = plt.AddRectangle(x, y, width, height); I'm using the AddPolygon to add a rectangle. I'll leave it here as an example.
/// <summary>
/// Displays a rectangle starting from the top-left X/Y coordinates.
/// </summary>
private Polygon AddRectangle(double x, double y, double width, double height, Color? fillColor = null, double lineWidth = 0, Color? lineColor = null)
{
double[] xs = { x, x + width, x + width, x };
double[] ys = { y, y, y - height, y - height };
return plt.AddPolygon(xs, ys, fillColor, lineWidth, lineColor);
}I think this feature doesn't exist. Let me know if it does.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels