Applies To:
  • CitectSCADA 3.00

I use PlotGrid function to define the frame for the XY or line plots and put the scales using PlotScaleMarker marker. The scales are not drawn at the place I would expect them to be. The arguments used in PlotGrid function to define the coordinates seem to be inconsistent with the ones used in PlotScaleMarker function.  

Yes, you are right to say that there are some inconsistencies as regards the arguments of Plot functions. However, I believe that the explanation below and the accompanied example will clarify the usage of PlotGrid and PlotScaleMarker functions.


PlotScaleMarker(hPlot, X, Y, nMarker, PenWidth, PenCol, Mode)

When a frame is defined, using PlotGrid function, the coordinates are relative to the position of the AN point, that is, 0,0 is the AN point. X1,Y1 pair is the top-left corner of the frame and X2,Y2 pair is the bottom-right. The actual inner frame (grid if you like) coordinates are (X1 + FrameWidth, Y1 + FrameWidth) and (X2 - FrameWidth, Y2 - FrameWidth).

PlotScaleMarker uses the inner frame set by the PlotGrid function, in other words it knows the height of the scale line. The (X ,Y) pair in this function shows the bottom-left corner as opposed the (X1,Y1) pair used in PlotGrid function (remember X1,Y1 pair is the top-left corner). The X coordinate is normally a negative value, which is a bit left to the AN point and Y coordinate is (Y2 - FrameWidth), where Y2 is the coordinate used in the PlotGrid function.


INT FrameWidth=3;
INT X1 = 0;
INT Y1 = 0;
INT X2 = 410;
INT Y2 = 230;

PlotScaleMarker(hPlot,-3,Y2 - FrameWidth, 6, 1, Black, 1);