plotfunction: Fix scaling of plots.

git-svn-id: trunk@56315 -
This commit is contained in:
wp 2017-11-06 12:37:15 +00:00
parent ed1da81b84
commit 2902415890

View File

@ -1029,18 +1029,20 @@ Var
begin
// X-origin in pixels.
// NOTE: this is not the location of "zero" but the left edge of the plot area.
POX:=FXAxis.LeftMargin;
// Width in pixels
PXW:=ACanvas.Width-FXAxis.RightMargin-POX+1;
PXW:= BoundsRect.Width - FXAxis.RightMargin - POX + 1;
// Y origin in pixels
POY:=ACanvas.Height-FYAxis.BottomMargin;
// NOTE: this is not the location of "zero" but the bottom edge of the plot area.
POY := BoundsRect.Height - FYAxis.BottomMargin;
// Height in pixels
PYH:=POY-FYAxis.TopMargin+1;
// Y top
YI:=PYH/FYAxis.Interval;
// Interval in plot units
XI:=FXAxis.Interval/PXW;
// Y plot Origin
// Y plot Origin, i.e. bottom edge of the plot area, in world coordinates
YO:=FYAxis.Origin;
// Y plot max value
PEY:=FYAxis.TopMargin;