traceVisual

Module Contents

Classes

Functions

Attributes

default_colormap
_normalize_colors(z)[source]
class TraceVisual(theData, theWGPlot, highlight_last)[source]

Bases: PyQt5.QtCore.QObject

Defines a trace in a graph.

class _ModifiedPaintElem[source]

Hidden class to manage brushes or pens

add_modified_paintElem(index, newPaintElem)[source]
modify_paintElems(paintElemsIn_List)[source]

Apply transformation to paintElemsIn_List.

Param:paintElemsIn_List: list of brushes or pens to modify
Returns:False if nothing has been modified, True is something has been modified
reset_paintElem(index)[source]

Remove transformation of point index

reset()[source]
signal_must_update
hide_points()[source]

Hide all the points

get_color()[source]

Get colour of the trace, return tuple (r,g,b)

set_color(color)[source]

Set colour of the trace, argument as tuple (r,g,b)

get_base_symbol_brush()[source]

Get symbol brush configured for this trace, return pg.QBrush

get_base_pen()[source]

Get pen configured for this trace, return pg.QPen

get_base_symbol_pen()[source]

Get symbol pen configured for this trace, return`pg.QPen`

get_base_symbol()[source]

Get base symbol configured for this trace, return str of the symbol (e.g. ‘o’)

get_symbol(size)[source]

Get actual symbols for the trace. If the symbols have been modified: return a list which maps each points to a symbol. Otherwise: return :meth:TraceVisual.get_base_symbol()

updateTrace()[source]

Forces the trace to refresh.

get_length()[source]

Return number of data to plot

hide()[source]

Hides the trace

show()[source]

Shows the trace

toggle(boolean)[source]

Toggle the trace (hide/show)

get_data()[source]

Get data to plot Data

get_brushes(size)[source]

Get actual brushes for the trace (=symbol filling). return a list which maps each points to a symbol brush

set_brush(indexPoint, newbrush, update=True)[source]

Set the symbol brush for a specific point:

Parameters:
  • indexPoint – Index of the point (in the graph) to modify
  • newbrush – either QBrush or tuple (r, g, b) of the new brush
  • update – if True, update the trace afterwards. This is slow operation.
set_symbol(indexPoint, newSymbol, update=True)[source]

Set the symbol shape for a specific point:

Parameters:
  • indexPoint – Index of the point (in the graph) to modify
  • newSymbol – string of the new symbol (e.g.: ‘o’)
  • update – if True, update the trace afterwards. This is slow operation.
set_brushes(list_indexPoint, list_newbrush, update=True)[source]

Same as set_brush() but by taking a list as input

reset_brush(indexPoint, update=True)[source]

Reset the brush of the point indexpoint

reset_brushes(list_indexPoint, update=True)[source]

Same as reset_brush() but by taking a list as input

reset_all_brushes(update=True)[source]

Reset all the brushes

reset_symbol(indexPoint, update=True)[source]

Reset the symbol shape of the point indexpoint

get_symbolPens(size)[source]

Get actual symbol pens for the trace (=symbol outline). return a list which maps each points to a symbol pen

set_symbolPen(indexPoint, newPen, update=True)[source]

Set the symbol shape for a specific point:

Parameters:
  • indexPoint – Index of the point (in the graph) to modify
  • newPen – QPen item or tuple of the color (r,g,b)
  • update – if True, update the trace afterwards. This is slow operation.
set_symbolPens(list_indexPoint, list_newpens, update=True)[source]

Same as set_symbolPen() but by taking a list as input

reset_symbolPen(indexPoint, update=True)[source]

Reset the symbol pen of the point indexpoint

reset_symbolPens(list_indexPoint, update=True)[source]

Same as reset_symbolPen() but by taking a list as input

reset_all_symbolPens(update=True)[source]

Reset all the symbol pens

get_point(indexPoint)[source]

Return object pyqtgraph.SpotItem