SharpPlot Reference > SharpPlot Methods > DrawFrame Method

SharpPlot.DrawFrame Method

Draw current frame, with any fixed text such as headings and footnotes.

public void DrawFrame();

Example

sp.SetFrameBackground(Color.Bisque,FillStyle.Solid,1);
sp.FrameStyle = FrameStyles.Boxed|FrameStyles.Shadowed|FrameStyles.Filled;
sp.Heading = "My Frame\nis Here";
sp.Footnote = "Here is a sample footer";
sp.DrawFrame();

Description

This method is a convenient way of forcing SharpPlot to draw any headings or footers without actually drawing any charts. It may be used when your design requires a common heading (and possibly footer) which spans several smaller charts. In this case you would set up the text, call DrawFrame to create the ‘paper’ and then go on to use NewFrame as many times as required to add more charts to the same overall design.

It might also be used simply to create a region on which to add some text (written with DrawNote), so creating a title page for a series of charts to be saved (for example) as a multi-page PDF document.

See also ...

SharpPlot Members | SharpPlot.FrameStyle Property


Send comments on this topic
© Dyalog Ltd 2021