-
Notifications
You must be signed in to change notification settings - Fork 981
Closed
Description
ScottPlot Version: 4.1.59
Operating System: W10
Application Type: WinForms
Question: Hi, is there a way to place annotation in the middle of the axes? So, top-middle, bottom-middle, left-middle, right-middle (see picture below in green). I show a Delta caluculation in my plot and it feels more natural to place it in the middle.
I already looked if there is a method to get the plot limits in pixels and caculate the middle myself, however couldn't find one. The closest I could get is to get the Axis limits in data coordinate, calculate middle and then convert it to pixel coordinate. However, I think I am over-doing it this way. Let me know what you think.
AxisLimits ax = formsPlot.Plot.GetAxisLimits();
double middleXPixel = formsPlot.Plot.GetPixelX(ax.XCenter);
formsPlot.Plot.AddAnnotation("Delta", middleXPixel, -10); // Position to Lower-middleReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
