Line module
- class lys.widgets.canvas.interface.Line.LineData(canvas, wave, axis)[source]
Bases:
WaveData
Interface to access line data in the canvas.
Instance of LineData is automatically generated by display or append methods.
Example:
from lys import display g = display([1,2,3]) g.getLines()[0].setColor('#ff0000')
- getErrorbar(direction='y')[source]
Set the errorbar.
- Parameters
direction ('x' or 'y') – The direction of the errorbar
- Returns
The errorbar
- Return type
list
- getLegendVisible()[source]
Get the visibility of the legend.
- Returns
The visibility.
- Return type
bool
- getMarker()[source]
Get the marker shape.
- Returns
String that indicate the marker shape. List of style strings can be seen from matplotlib.lines.Line2D.markers.values().
- Return type
str
- getMarkerSize()[source]
Get the size of the marker.
- Returns
The size of the marker.
- Return type
float
- getMarkerThick()[source]
Get the thickness of the marker edge.
- Returns
The thickness of the marker edge.
- Return type
float
- setCapSize(capsize)[source]
Set the cap size of the errorbar.
- Parameters
capsize (float) – The cap size.
- setColor(color)[source]
Set color of the line.
- Parameters
color (str) – rgb color string such as #ff0000.
- setErrorbar(error, direction='y')[source]
Set the errorbar.
If the error is float, the constant errorbar is set.
If the error is str, the errorbar is loaded from wave.note[error].
If the error is an array, the array is used as the errorbar.
- Parameters
error (float or str or array) – The error.
direction ('x' or 'y') – The direction of the errorbar
- setLegendVisible(visible)[source]
Set the visibility of the legend.
- Parameters
visible (bool) – The visibility.
- setMarker(marker)[source]
Set the marker shape.
- Parameters
marker (str) – String that indicate the marker shape. List of style strings can be seen from matplotlib.lines.Line2D.markers.values().
- setMarkerFilling(type)[source]
Set the filling of the marker.
- Parameters
type ('full', 'left', 'ritght', 'top', 'bottom', or 'none') – Style string.
- setMarkerSize(size)[source]
Set the size of the marker.
- Parameters
size (float) – The size of the marker.
- setMarkerThick(thick)[source]
Set the thickness of the marker edge.
- Parameters
thick (float) – The thickness of the marker edge.