``traceVisual`` =============================================== .. py:module:: optimeed.visualize.graphs.traceVisual Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: optimeed.visualize.graphs.traceVisual.TraceVisual Functions ~~~~~~~~~ .. autoapisummary:: optimeed.visualize.graphs.traceVisual._normalize_colors Attributes ~~~~~~~~~~ .. autoapisummary:: optimeed.visualize.graphs.traceVisual.default_colormap .. py:data:: default_colormap .. py:function:: _normalize_colors(z) .. py:class:: TraceVisual(theData, theWGPlot, highlight_last) Bases: :py:obj:`PyQt5.QtCore.QObject` Defines a trace in a graph. .. py:class:: _ModifiedPaintElem Hidden class to manage brushes or pens .. py:method:: add_modified_paintElem(index, newPaintElem) .. py:method:: modify_paintElems(paintElemsIn_List) Apply transformation to paintElemsIn_List. :param: paintElemsIn_List: list of brushes or pens to modify :return: False if nothing has been modified, True is something has been modified .. py:method:: reset_paintElem(index) Remove transformation of point index .. py:method:: reset() .. py:attribute:: signal_must_update .. py:method:: hide_points() Hide all the points .. py:method:: get_color() Get colour of the trace, return tuple (r,g,b) .. py:method:: set_color(color) Set colour of the trace, argument as tuple (r,g,b) .. py:method:: get_base_symbol_brush() Get symbol brush configured for this trace, return `pg.QBrush` .. py:method:: get_base_pen() Get pen configured for this trace, return `pg.QPen` .. py:method:: get_base_symbol_pen() Get symbol pen configured for this trace, return`pg.QPen` .. py:method:: get_base_symbol() Get base symbol configured for this trace, return str of the symbol (e.g. 'o') .. py:method:: get_symbol(size) 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() .. py:method:: updateTrace() Forces the trace to refresh. .. py:method:: get_length() Return number of data to plot .. py:method:: hide() Hides the trace .. py:method:: show() Shows the trace .. py:method:: toggle(boolean) Toggle the trace (hide/show) .. py:method:: get_data() Get data to plot :class:`~optimeed.visualize.graphs.Graphs.Data` .. py:method:: get_brushes(size) Get actual brushes for the trace (=symbol filling). return a list which maps each points to a symbol brush .. py:method:: set_brush(indexPoint, newbrush, update=True) Set the symbol brush for a specific point: :param indexPoint: Index of the point (in the graph) to modify :param newbrush: either QBrush or tuple (r, g, b) of the new brush :param update: if True, update the trace afterwards. This is slow operation. .. py:method:: set_symbol(indexPoint, newSymbol, update=True) Set the symbol shape for a specific point: :param indexPoint: Index of the point (in the graph) to modify :param newSymbol: string of the new symbol (e.g.: 'o') :param update: if True, update the trace afterwards. This is slow operation. .. py:method:: set_brushes(list_indexPoint, list_newbrush, update=True) Same as :meth:`~TraceVisual.set_brush` but by taking a list as input .. py:method:: reset_brush(indexPoint, update=True) Reset the brush of the point indexpoint .. py:method:: reset_brushes(list_indexPoint, update=True) Same as :meth:`~TraceVisual.reset_brush` but by taking a list as input .. py:method:: reset_all_brushes(update=True) Reset all the brushes .. py:method:: reset_symbol(indexPoint, update=True) Reset the symbol shape of the point indexpoint .. py:method:: get_symbolPens(size) Get actual symbol pens for the trace (=symbol outline). return a list which maps each points to a symbol pen .. py:method:: set_symbolPen(indexPoint, newPen, update=True) Set the symbol shape for a specific point: :param indexPoint: Index of the point (in the graph) to modify :param newPen: QPen item or tuple of the color (r,g,b) :param update: if True, update the trace afterwards. This is slow operation. .. py:method:: set_symbolPens(list_indexPoint, list_newpens, update=True) Same as :meth:`~TraceVisual.set_symbolPen` but by taking a list as input .. py:method:: reset_symbolPen(indexPoint, update=True) Reset the symbol pen of the point indexpoint .. py:method:: reset_symbolPens(list_indexPoint, update=True) Same as :meth:`~TraceVisual.reset_symbolPen` but by taking a list as input .. py:method:: reset_all_symbolPens(update=True) Reset all the symbol pens .. py:method:: set_pen_linestyle(thePen, linestyle) :staticmethod: Transform a pen for dashed lines: :param thePen: QPen item :param linestyle: str (e.g.: '.', '.-', '--', ...) .. py:method:: get_point(indexPoint) Return object pyqtgraph.SpotItem