Class: Legend
Prev
Next

Class: Legend

A plot legend.

Inherits: BorderedViewObject

Collection class: ViewObjectCollection

Constructors:

Methods:

Properties:

Legend ( ViewObject parent )

  • ViewObject parent - The parent to place the new legend in. May also be a string containing the name of an existing ViewObject.

Creates a new legend and places it in the ViewObject parent.

Legend ( Window window )

  • Window window - The window to place the new legend in. May also be a string containing the name of an existing Window.

Creates a new legend and places it in the Window window.

void addCurve ( string curve )

  • string curve - The curve to be added. This can be either the name of the curve or a reference to the curve.

Adds the curve to the legend.
  • Throws: TypeError - Throws this exception if the curve could not be found.

void removeCurve ( string curve )

  • string curve - The curve to be removed. This can be either the name of the curve or a reference to the curve.

Removes the curve from the legend.
  • Throws: TypeError - Throws this exception if the curve could not be found.

string font

Used to set or get the current font used for the legend.

number fontSize

Contains the size of the font used to draw the legend.

string textColor

Contains the color of the text used to draw the legend.

boolean vertical

True if the legend entries are stacked vertically.

CurveCollection curves [Read-Only]

The list of curves shown in the legend.

string title

The title of the legend.

number scaleLineWidth

Contains the scale factor for the width of the lines in the legend, relative to the width of the lines in the actual plot.

Prev
Next
Home


Would you like to make a comment or contribute an update to this page?
Send feedback to the KDE Docs Team