graphVisual

Module Contents

Classes

class GraphVisual(theWidgetGraphVisual)[source]

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

set_fontTicks(fontSize, fontname=None)[source]

Set font of the ticks

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

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(fontSize, color='#000', fontname=None)[source]

Set font of the axis labels

Parameters:
  • fontSize – font size
  • color – color in hexadecimal (str)
  • fontname – name of the font
get_legend() → optimeed.visualize.graphs.pyqtgraphRedefine.myLegend[source]

Get the legend

get_axis(axis) → optimeed.visualize.graphs.pyqtgraphRedefine.myAxis[source]

Get the axis

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

To add any pyqtgraph item to the graph

add_text(theStr, pos_x, pos_y, color=None, font=None)[source]

Convenient function to create and add a TextItem (see pyqtgraph doc) to the current graph

Parameters:
  • theStr – text as string
  • pos_x – x_coordinate as float
  • pos_y – y_coordinate as float
  • color – color of the text (tuple or hex)
  • font – QFont for the text
remove_feature(theFeature)[source]

To remove any pyqtgraph item from the graph

add_data(idGraph, theData)[source]
set_graph_properties(theTrace)[source]

This function is automatically called on creation of the graph

set_lims(xlim, ylim)[source]

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

add_trace(idTrace, theTrace)[source]

Add a TraceVisual to the graph, with index idTrace

set_legend()[source]

Set default legend options (color and font)

set_title(titleName, **kwargs)[source]

Set title of the graph

Parameters:titleName – title to set
get_trace(idTrace) → optimeed.visualize.graphs.traceVisual.TraceVisual[source]

Return the TraceVisual correspondong to the index idTrace

get_all_traces()[source]

Return a dictionary {idtrace: TraceVisual}.

delete_trace(idTrace)[source]

Delete the trace of index idTrace

delete()[source]

Delete the graph

linkXToGraph(graph)[source]

Link the axis of the current graph to an other GraphVisual

update()[source]

Update the traces contained in the graph

fast_update()[source]

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

axis_equal()[source]
log_mode(x=False, y=False)[source]
grid_off()[source]

Turn off grid