# class KPlotAxis

###

Module | kdeui
Namespace |
Class | KPlotAxis
Inherits |

Axis for KPlotWidget

Contains all data for drawing an axis including format specification axis labels.

Author Andreas Nicolai Version: 1.0

### methods

- KPlotAxis (label)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  label | QString | QString()

  Constructor, constructs an axis with the label label.

- KPlotAxis (a0)

  returns ctor
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  a0 | KPlotAxis |

- KPlotAxis (a0)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QString | QString()

- areTickLabelsShown ( )

  returns bool

  Returns whether tick labels will be drawn for this axis

- isVisible ( )

  returns bool

  Returns whether the axis is visible or not

- label ( )

  returns QString

  Returns the label string for this axis

- majorTickMarks ( )

  returns QList<double>

  Returns the list of coordinates of the major tickmarks for this axis the positions of tickmarks are automatically computed by setTickMarks().

  See also setTickMarks()

  See also minorTickMarks()

- minorTickMarks ( )

  returns QList<double>

  Returns the list with the minor tickmarks the positions of tickmarks are automatically computed by setTickMarks().

  See also setTickMarks()

  See also majorTickMarks()

- setLabel (label)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  label | QString |

  Sets the axis label. Set the label to an empty string to omit the axis label.

  label - a string describing the data plotted on the axis.

- setTickLabelFormat (format, fieldWidth, precision)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  format | char | 'g'
  fieldWidth | int | 0
  precision | int | -1

  Set the display format for converting the double value of the tick's position to the QString for the tick label.

  Normally, the format character is one of 'e', 'E', 'f', 'g', or 'G' (see the documentation for QString.arg(double) for details).

  In addition, it is possible to set the format character to 't'; in this case the tickmark value is interpreted as a time in hours, and the ticklabel string will be in "hh:mm" clock format. Note that when the format character is 't', the fieldWidth and prec values are ignored.

  format - the format specification character

  fieldWidth - the number of characters in the output string. If set to 0, the string will be as wide as it needs to be to fully render the value.

  precision - the number of characters following the decimal point.

- setTickLabelsShown (b)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  b | bool |

  Determine whether tick labels will be drawn for this axis.

  b - if true, tick labels will be drawn.

- setTickMarks (x0, length)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  x0 | double |
  length | double |

  Determine the positions of major and minor tickmarks for this axis. this function is called by KPlotWidget whenever the plot's limits are modified.

  x0 - the minimum data coordinate of the axis.

  length - the range covered by the axis, in data units.

  See also majorTickMarks()

  See also minorTickMarks()

- setVisible (visible)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  visible | bool |

  Sets the "visible" property of the axis.

  visible - if true, this axis will be drawn on the KPlotWidget

- tickLabel (value)

  returns QString

  Argument | Type | Default
  --- | --- | ---
  value | double |

  Returns the ticklabel string for the given value, rendered according to the current format specification.

  the - value to be rendered as a tick label.

  See also setTickLabelFormat()

- tickLabelFormat ( )

  returns char

  Returns the number format of the tick labels

- tickLabelPrecision ( )

  returns int

  Returns the number precision of the tick labels

- tickLabelWidth ( )

  returns int

  Returns the field width of the tick labels