philsupertramp/game-math
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ImagePlot Class Reference

#include <Plot.h>

Inheritance diagram for ImagePlot:
Plot

Public Member Functions

 ImagePlot (const char *name)
 
void AddData (const Matrix< double > &mat, const std::string &name)
 
void operator() (const char *colorPalette="magma.pal")
 
- Public Member Functions inherited from Plot
 Plot (const std::string &title="")
 
void clear_file ()
 
void title (const std::string &title)
 
void xAxis (const std::string &name)
 
void yAxis (const std::string &name)
 
void pointSize (const int &size)
 
void lineWidth (const int &size)
 
void AddData (const Matrix< double > &x, const Matrix< double > &y, const std::string &name, DataTypes dataType=DataTypes::NONE, const char *character=nullptr)
 
void AddData (const Matrix< double > &mat, const std::string &name, DataTypes dataTypeName=DataTypes::NONE, const char *pointChar=nullptr, int dimensions=2)
 
virtual void operator() () const
 

Additional Inherited Members

- Protected Member Functions inherited from Plot
void writeAttributes (FILE *gnuplot) const
 
- Protected Attributes inherited from Plot
const char * dataFileName
 data storage file name More...
 
const char * plotTypeName
 representation of plot type More...
 
const char * plotType = "plot"
 representation of plot type More...
 
FILE * storageFile = nullptr
 data storage file More...
 
PlotAttributes attributes = {}
 attributes for plot More...
 
int numElements = 0
 number elements within the plot More...
 
PlotBoundary bY {}
 x-axis boundaries for the resulting plot More...
 
PlotBoundary bX {}
 y-axis boundaries for the resulting plot More...
 

Detailed Description

Plot to display a 2 dimensional image based on matrix-like data

Examples
numerics/TestFractals.cpp, and plot/TestPlot.cpp.

Constructor & Destructor Documentation

◆ ImagePlot()

ImagePlot::ImagePlot ( const char *  name)
inlineexplicit

Default constructor

Parameters
namePlot title

Member Function Documentation

◆ AddData()

void ImagePlot::AddData ( const Matrix< double > &  mat,
const std::string &  name 
)
inline

Helper to easily add matrix data to content file

Parameters
matdata matrix
namename of dataset
Examples
numerics/TestFractals.cpp, and plot/TestPlot.cpp.

◆ operator()()

void ImagePlot::operator() ( const char *  colorPalette = "magma.pal")
inline

overridden call operator.

interprets a file as surface plot and forwards whole content to gnuplot using "plot matrix with image"


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