Reference > Methods > SetKeyFrame Method

SharpPlot.SetKeyFrame Method

Key frame (tlhw in pts) to place the chart legend in a non-default location. The legend text will be wrapped into the frame width if necessary, and key-style ‘Autofit’ will force the key font to reduce until all the legend fits within the frame. The first legend is always written in the upper-left corner of the frame.

public void SetKeyFrame(
    double top,
    double left,
    double height,
    double width
);

Example

sp.SetKeyFrame(200,300,40,60);

The frame is relative to the entire chart area – the paper size less the gutter width (typically 4pts all round). If the key has style ‘Boxed’ the box will be drawn around the text by default, not the entire extent of the frame. To draw around the frame, use the BoxFrame keystyle.

See also ...

SharpPlot Members | KeyStyles Enumeration


Send comments on this topic
© Dyalog Ltd 2013