cls_Line - almarklein/visvis GitHub Wiki
Inherits from Wobject.
The line class represents a set of points (locations) in world coordinates. This class can draw lines between the points, markers at the point coordinates, or both.
Line objects can be created with the function vv.plot().
Performance tips
The s, o (and .) styles can be drawn using standard OpenGL points if alpha is 1 or if no markeredge is drawn.
Otherwise point sprites are used, which can be slower on some (older) cards (like ATI, Nvidia performs quite ok with with sprites).
Some video cards simply do not support sprites (seen on ATI).
The Line class implements the following properties:
alpha, lc, ls, lw, mc, mec, mew, ms, mw, points
The Line class implements the following methods:
SetPoints, SetXdata, SetYdata, SetZdata
Get/Set the alpha (transparancy) of the line and markers. When this is < 1, the line cannot be anti-aliased, and it is drawn on top of any other wobjects.
Get/Set the lineColor: the color of the line, as a 3-element tuple or as a single character string (shown in uppercase): Red, Green, Blue, Yellow, Cyan, Magenta, blacK, White.
Get/Set the lineStyle: the style of the line.
- Solid line: '-'
- Dotted line: ':'
- Dashed line: '--'
- Dash-dot line: '-.' or '.-'
- A line that is drawn between each pair of points: '+'
- No line: '' or None.
Get/Set the lineWidth: the width of the line in pixels. If zero, the line is not drawn.
Get/Set the markerColor: The color of the face of the marker If None, '', or False, the marker face is not drawn (but the edge is).
Get/Set the markerEdgeColor: the color of the edge of the marker.
Get/Set the markerEdgeWidth: the width of the edge of the marker. If zero, no edge is drawn.
Get/Set the markerStyle: the style of the marker.
- Plus: '+'
- Cross: 'x'
- Square: 's'
- Diamond: 'd'
- Triangle (pointing up, down, left, right): '^', 'v', '<', '>'
- Pentagram star: 'p' or '*'
- Hexgram: 'h'
- Point/cirle: 'o' or '.'
- No marker: '' or None
Get/Set the markerWidth: the width (bounding box) of the marker in (screen) pixels. If zero, no marker is drawn.
Get a reference to the internal Pointset used to draw the line object. Note that this pointset is always 3D. One can modify this pointset in place, but note that a call to Draw() may be required to update the screen. (New in version 1.7.)
Set x,y (and optionally z) data. The given argument can be anything that can be converted to a pointset. (From version 1.7 this method also works with 2D pointsets.)
The data is copied, so changes to original data will not affect the visualized points. If you do want this, use the points property.
Set the x coordinates of the points of the line.
Set the y coordinates of the points of the line.
Set the z coordinates of the points of the line.