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

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

#include <MatplotlibPlotter.h>

Inheritance diagram for MatplotlibPlotter:
Collaboration diagram for MatplotlibPlotter:

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
xValueThe x position (e.g., time in seconds)
labelText 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
xDataVector of x-axis values (e.g., time)
yDataVector of y-axis values (e.g., altitude)
titlePlot title
xLabelLabel for x-axis
yLabelLabel 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
timeTime points
altitudeAltitude (Z position)
velocityVertical velocity
accelerationVertical 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: