version 0.4.1
Ikarus::plot Namespace Reference

Functions

void draw_xy (const Eigen::VectorXd &x, const Eigen::VectorXd &y)
 Draw a 2D plot with given x and y vectors. More...
 
template<typename FunctionType >
void drawFunction (FunctionType &&f, std::pair< double, double > &&xRange, int eValuationPoints=100)
 Draw the plot of a mathematical function. More...
 

Function Documentation

◆ draw_xy()

void Ikarus::plot::draw_xy ( const Eigen::VectorXd &  x,
const Eigen::VectorXd &  y 
)

This function uses the Matplot library to create a 2D plot with the provided x and y vectors.

Parameters
xVector representing the x-axis values.
yVector representing the y-axis values.

◆ drawFunction()

template<typename FunctionType >
void Ikarus::plot::drawFunction ( FunctionType &&  f,
std::pair< double, double > &&  xRange,
int  eValuationPoints = 100 
)

This function uses the Matplot library to draw the plot of a mathematical function within the specified x-range.

Template Parameters
FunctionTypeThe type of the mathematical function.
Parameters
fThe mathematical function to be plotted.
xRangeA pair representing the range of x-axis values for plotting.
eValuationPointsThe number of points to evaluate the function within the given range.