Plotcat Api

class plotcat.plotter(number_of_samples=100, total_plots=1, rows=1, cols=1, y_low_lim=0, y_high_lim=1024, plot_lines=1, names='serial-graph', time_interval=10, figure=1)[source]

plotter initiates a matplotlib plot.

This plot is used to plot the serial input.

Parameters:
  • number_of_samples (list of integers.) – number of samples to be plotted.
  • total_plots (integer) – total number of plots on figure.
  • rows (integer) – total number of rows of plots on a figure.
  • cols (intefer) – total number of columns of plots on a figure.
  • y_low_lim (list of integers.) – lower limit of y-axis.
  • y_high_lim (list of integers.) – higher limit of y-axis.
  • plot_lines (list of integers) – total number of lines to be plotted on each plot.
plot_self(func)[source]

define your callback function with the decorator @plotter.plot_self. in the callback function set the data of lines in the plot using self.lines[i][j].set_data(your data)

set_call_back(func)[source]

sets callback function for updating the plot. in the callback function implement the logic of reading of serial input also the further processing of the signal if necessary has to be done in this callbak function.

static show()[source]

This is a static method. After instantiating plotter this method shows the matplotlib figure on the screen.