graphVisual

Module Contents

class GraphVisual(theWidgetGraphVisual)

Provide an interface to a graph. A graph contains traces.

set_fontTicks(self, fontSize, fontname=None)

Set font of the ticks

Parameters:
  • fontSize – Size of the font
  • fontname – Name of the font
set_numberTicks(self, number, axis)

Set the number of ticks to be displayed

Parameters:
  • number – Number of ticks for the axis
  • axis – Axis (string, “bottom”, “left”, “right”, “top”)
Returns:

set_fontLabel(self, fontSize, color='#000', fontname=None)

Set font of the axis labels

Parameters:
  • fontSize – font size
  • color – color in hexadecimal (str)
  • fontname – name of the font
get_legend(self)

Get the legend

get_axis(self, axis)

Get the axis

Parameters:axis – Axis (string, “bottom”, “left”, “right”, “top”)
Returns:axis object
set_fontLegend(self, font_size, font_color, fontname=None)
set_label_pos(self, orientation, x_offset=0, y_offset=0)
set_color_palette(self, palette)
apply_palette(self)
hide_axes(self)
add_feature(self, theFeature)

To add any pyqtgraph item to the graph

remove_feature(self, theFeature)

To remove any pyqtgraph item from the graph

add_data(self, idGraph, theColor, theData)
set_graph_properties(self, theTrace)

This function is automatically called on creation of the graph

set_lims(self, xlim, ylim)

Set limits of the graphs, xlim or ylim = [val_low, val_high]. Or None.

add_trace(self, idTrace, theTrace)

Add a TraceVisual to the graph, with index idTrace

set_legend(self)

Set default legend options (color and font)

set_title(self, titleName, **kwargs)

Set title of the graph

Parameters:titleName – title to set
get_trace(self, idTrace)

Return the TraceVisual correspondong to the index idTrace

get_all_traces(self)

Return a dictionary {idtrace: TraceVisual}.

delete_trace(self, idTrace)

Delete the trace of index idTrace

delete(self)

Delete the graph

linkXToGraph(self, graph)

Link the axis of the current graph to an other GraphVisual

update(self)

Update the traces contained in the graph

fast_update(self)

Same as update() but faster. This is NOT thread safe (cannot be called a second time before finishing operation)

axis_equal(self)
grid_off(self)

Turn off grid