Plot Workbench

From LabRPS Documentation
Revision as of 14:38, 13 November 2024 by LabRPS (talk | contribs) (Created page with "thumb|128px|Plot workbench icon {{TOCright}} == Introduction == LabRPS is able to perform plots using the [https://matplotlib.org/ matplotlib] Python library. A module is provided to this end, as a core component of LabRPS. The produced plots offer the standard [https://matplotlib.org/ matplotlib] tools to edit and save. On top of that, a 24px Plot Workbench is provided as an ext...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Plot workbench icon

Introduction

LabRPS is able to perform plots using the matplotlib Python library. A module is provided to this end, as a core component of LabRPS.

The produced plots offer the standard matplotlib tools to edit and save. On top of that, a Workbench Plot.svg Plot Workbench is provided as an external add-on offering more complete tools to edit the plot and save it.

Module

The module can be invoked in a Python console or in a macro. The first thing you must do is importing the module by typing:

from labrps.plot import Plot


from LabRPS.Plot import Plot

After that, you can plot a straight line from (0,0) to (1,2) just simply typing:

Plot.plot([0, 1], [0, 2])

You can find more complex examples in the Plot Basic tutorial and the Plot MultiAxes tutorial.

Workbench Tools

If you activate the Workbench Plot.svg Plot Workbench , you will have the following tools available to manage the plots created with the module:

  • Plot Save.svg Save plot: Saves the plot in several formats. You can select the output size and resolution too.
  • Plot Axes.svg Axes: Add, remove or edit plot axes.
  • Plot Series.svg Series: Edit series title and styling.
  • Plot Grid.svg Grid: Show/hide grid.
  • Plot Legend.svg Legend: Show/hide legend.
  • Plot Labels.svg Labels: Edit labels.
  • Plot Positions.svg Positions: Set elements positions.

Scripting

Since the Plot Workbench is a layer on top of matplotlib, you are free to use any function from this library on plot instances. See Scripting and macros for examples.

Tutorial