KDE 4.9 PyKDE API Reference

- KDE's Python API

# KPlotPoint Class Reference

`from PyKDE4.kdeui import *`

## Detailed Description

KPlotPoint Encapsulates a point in the plot. A KPlotPoint consists of X and Y coordinates (in Data units), an optional label string, and an optional bar-width, The bar-width is only used for plots of type KPlotObject.Bars, and it allows the width of each bar to be set manually. If bar-widths are omitted, then the widths will be set automatically, based on the halfway-mark between adjacent points.

## Methods

| __init__ (self)
| __init__ (self, float x, float y, QString label=QString(), float width=0.0)
| __init__ (self, QPointF p, QString label=QString(), float width=0.0)
| __init__ (self, KPlotPoint a0)
float | barWidth (self)
QString | label (self)
QPointF | position (self)
| setBarWidth (self, float w)
| setLabel (self, QString label)
| setPosition (self, QPointF pos)
| setX (self, float x)
| setY (self, float y)
float | x (self)
float | y (self)

## Method Documentation

__init__ | ( |  | self ) |

Default constructor.

__init__ | ( | self, |
|  | float | x,
|  | float | y,
|  | QString | label=QString(),
|  | float | width=0.0
| ) |  |  |

Constructor. Sets the KPlotPoint according to the given arguments

Parameters:

  | x | the X-position for the point, in Data units
  | y | the Y-position for the point, in Data units
  | label | the label string for the point. If the string is defined, the point will be labeled in the plot.
  | width | the bar width to use for this point (only used for plots of type KPlotObject.Bars)

__init__ | ( | self, |
|  | QPointF | p,
|  | QString | label=QString(),
|  | float | width=0.0
| ) |  |  |

Constructor. Sets the KPlotPoint according to the given arguments

Parameters:

  | p | the position for the point, in Data units
  | label | the label string for the point. If the string is defined, the point will be labeled in the plot.
  | width | the bar width to use for this point (only used for plots of type KPlotObject.Bars)

__init__ | ( | self, |
|  | KPlotPoint | a0
| ) |  |  |

Default constructor.

float barWidth | ( |  | self ) |

Returns:
  the bar-width for the point

QString label | ( |  | self ) |

Returns:
  the label for the point

QPointF position | ( |  | self ) |

Returns:
  the position of the point, in data units

setBarWidth | ( | self, |
|  | float | w
| ) |  |  |

Set the bar-width for the point

setLabel | ( | self, |
|  | QString | label
| ) |  |  |

Set the label for the point

setPosition | ( | self, |
|  | QPointF | pos
| ) |  |  |

Set the position of the point, in data units

Parameters:

  | pos | the new position for the point.

setX | ( | self, |
|  | float | x
| ) |  |  |

Set the X-position of the point, in Data units

setY | ( | self, |
|  | float | y
| ) |  |  |

Set the Y-position of the point, in Data units

float x | ( |  | self ) |

Returns:
  the X-position of the point, in data units

float y | ( |  | self ) |

Returns:
  the Y-position of the point, in data units