Loading...
Searching...
No Matches
MatplotlibPlotter Class Reference

Matplotlib-cpp implementation of the Plotter interface. More...

`#include <MatplotlibPlotter.h>`

Inheritance diagram for MatplotlibPlotter:
[legend]
Collaboration diagram for MatplotlibPlotter:
[legend]

## Public Member Functions

virtual | ~MatplotlibPlotter ()=default
void | plot2D (const std::vector< double > &xData, const std::vector< double > &yData, const std::string &title, const std::string &xLabel, const std::string &yLabel) override
| Plot a 2D line graph.
void | addMarker (double xValue, const std::string &label) override
| Add a vertical marker at a specific x-axis value.
void | plotPosVelAcc (const std::vector< double > &time, const std::vector< double > &altitude, const std::vector< double > &velocity, const std::vector< double > &acceleration) override
| Plot altitude, velocity, and acceleration together on a single canvas.
Public Member Functions inherited from Plotter
virtual | ~Plotter ()=default

## Private Attributes

std::vector< std::pair< double, std::string > > | markers_

## Detailed Description

Matplotlib-cpp implementation of the Plotter interface.

## Constructor & Destructor Documentation

## ~MatplotlibPlotter()

virtual MatplotlibPlotter::~MatplotlibPlotter | ( |  | ) |

virtualdefault

## Member Function Documentation

## addMarker()

void MatplotlibPlotter::addMarker | ( | double | xValue,
|  | const std::string & | label )

inlineoverridevirtual

Add a vertical marker at a specific x-axis value.

Parameters

  xValue | The x position (e.g., time in seconds)
  label | Text label to display near the marker

Implements Plotter.

Here is the caller graph for this function:

## plot2D()

void MatplotlibPlotter::plot2D | ( | const std::vector< double > & | xData,
|  | const std::vector< double > & | yData,
|  | const std::string & | title,
|  | const std::string & | xLabel,
|  | const std::string & | yLabel )

inlineoverridevirtual

Plot a 2D line graph.

Parameters

  xData | Vector of x-axis values (e.g., time)
  yData | Vector of y-axis values (e.g., altitude)
  title | Plot title
  xLabel | Label for x-axis
  yLabel | Label for y-axis

Implements Plotter.

Here is the call graph for this function:
Here is the caller graph for this function:

## plotPosVelAcc()

void MatplotlibPlotter::plotPosVelAcc | ( | const std::vector< double > & | time,
|  | const std::vector< double > & | altitude,
|  | const std::vector< double > & | velocity,
|  | const std::vector< double > & | acceleration )

inlineoverridevirtual

Plot altitude, velocity, and acceleration together on a single canvas.

Parameters

  time | Time points
  altitude | Altitude (Z position)
  velocity | Vertical velocity
  acceleration | Vertical acceleration

Implements Plotter.

Here is the call graph for this function:
Here is the caller graph for this function:

## Member Data Documentation

## markers_

std::vector<std::pair<double, std::string> > MatplotlibPlotter::markers_

private

The documentation for this class was generated from the following file:

- include/plotting/MatplotlibPlotter.h