SharpPlot Reference > SharpPlot Methods > AddComment Method

SharpPlot.AddComment Method

Inserts a text annotation into any of the vector output formats, typically EPS.

Example

sp.AddComment("!!Company Logo here!!");

Overloads

This could be used as a marker for some post-processing job (e.g. to insert placeholders) or simply to aid debugging of a complex collection of charts. Note that plain text will appear in EPS output with ‘% ‘ on the front, unless the text begins with the ‘%’ character in which case it will be echoed exactly as it appears.

Comments can be marked with an id string and flagged for compression. In this case the text will appear as “yourid::” followed by ASCII85-encoded flate-compressed text. This may save space, but also prevent the comment from containing characters which could destroy XML or PostScript formats. Comments saved into XML-style output (typically SVG) have the disallowed characters ampersand-encoded after compression.

Comments saved with an id string may be retrieved from any textual format with ReadComment which reverses the encoding process if required. Note that comments are only saved in PDF output if you explicitly turn off compression of the PDF page content.

See also ...

SharpPlot.ReadComment Method | SharpPlot.SavePdf Method


Send comments on this topic
© Dyalog Ltd 2021