26#include "../datamanagement/memorymanager.hpp"
27#include "../ParserLib/muParser.h"
28#include "../settings.hpp"
29#include "../maths/define.hpp"
72 size_t createSubPlotSet(
bool& bAnimateVar, std::vector<std::string>& vPlotCompose,
size_t nSubPlotStart,
size_t nMultiplots[2],
size_t& nSubPlots,
size_t& nSubPlotMap);
74 bool createPlotOrAnimation(
size_t nPlotCompose,
size_t nPlotComposeSize,
bool bNewSubPlot,
bool bAnimateVar, std::vector<std::string>& vDrawVector,
const std::vector<std::string>& vDataPlots);
75 void create2dPlot(
size_t nPlotCompose,
size_t nPlotComposeSize);
76 bool plot2d(mglData& _mData, mglData& _mData2, mglData* _mAxisVals, mglData& _mContVec);
77 void createStdPlot(
size_t nPlotCompose,
size_t nPlotComposeSize);
78 bool plotstd(mglData& _mData, mglData& _mAxisVals, mglData _mData2[2],
const short nType);
85 bool plotstd3d(mglData _mData[3], mglData _mData2[3],
const short nType);
86 bool checkMultiPlotArray(
unsigned int nMultiPlot[2],
unsigned int& nSubPlotMap,
unsigned int nPlotPos,
unsigned int nCols,
unsigned int nLines);
87 long getNN(
const mglData& _mData);
88 void filename(
size_t nPlotComposeSize,
size_t nPlotCompose);
91 void evaluateSubplot(std::string& sCmd,
size_t nMultiplots[2],
size_t& nSubPlots,
size_t& nSubPlotMap);
100 void fillData(
double dt_max,
int t_animate);
108 mglPoint
createMglPoint(
int nCoords,
double r,
double phi,
double theta,
bool b3D =
false);
110 void directionalLight(
double dPhi,
double dTheta,
int nId,
char cColor =
'w',
double dBrightness = 0.5);
112 mglPoint
CalcCutBox(
double dPhi,
int nEdge = 0,
int nCoords = 0,
bool b3D =
false);
114 mglData
fmod(
const mglData& _mData,
double dDenominator);
116 std::string
CoordFunc(
const std::string& sFuncDef,
double dPhiScale = 1.0,
double dThetaScale = 1.0);
This class is defined to abstrahize the determination of the correct data object and the calculation ...
This class implements the function definition managing instance.
This class encapsulates the mglGraph object during transmission from the kernel to the GUI.
This class represents the central memory managing instance. It will handle all tables and clusters,...
This class combines the plotassets into a single structure.
This class contains all the plot settings usable by the plotting algorithm.
This class handles the complete plotting process.
void createStdPlot(size_t nPlotCompose, size_t nPlotComposeSize)
This member function wraps the creation of all one-dimensional plots (e.g. line or point plots).
double getProjBackground(double dPhi, int nEdge=0)
This member function determines the positions for the projected density and contour maps,...
void applyPlotSizeAndQualitySettings()
This member function determines output size and quality on the plotting target and the plotting param...
void determinePlottingDimensions(const std::string &sPlotCommand)
This member function determines the maximal plotting dimension of the passed command.
mglPoint CalcCutBox(double dPhi, int nEdge=0, int nCoords=0, bool b3D=false)
This member function calculates the two coordinates in space, which describe the cutting box....
void setStyles()
This member function prepares the line and point styles based upon the currently used parameters.
Plot(const Plot &)=delete
void create2dDrawing(std::vector< std::string > &vDrawVector)
This member function handles the creation of all two-dimensional drawings.
Plot & operator=(const Plot &)=delete
~Plot()
Plot class destructor.
IntervalSet secDataRanges
size_t createSubPlotSet(bool &bAnimateVar, std::vector< std::string > &vPlotCompose, size_t nSubPlotStart, size_t nMultiplots[2], size_t &nSubPlots, size_t &nSubPlotMap)
This member function handles the creation of a single subplot, which may be a single plot or part of ...
std::string constructDataLegendElement(std::string &sColumnIndices, const std::string &sTableName)
This member function is used to construct special legend elements.
std::string CoordFunc(const std::string &sFuncDef, double dPhiScale=1.0, double dThetaScale=1.0)
This member function is used to create a coordinate function for the coordinate system,...
FunctionDefinitionManager & _functions
void create3dPlot()
This member function handles the creation of all three-dimensional plots.
void filename(size_t nPlotComposeSize, size_t nPlotCompose)
This member function creates a default plot file name based upon the currently used plotting command.
std::vector< short > m_types
double getLabelPosition(int nCoord)
This member function determines the position of the axis label, which depends on whether a box surrou...
void applyLighting()
This member function applies the light effects to two- or three-dimensional plots....
void extractDataValues(const std::vector< std::string > &vDataPlots)
Creates the internal mglData objects and fills them with the data values from the MemoryManager class...
void displayMessage(bool bAnimateVar)
This member function writes a message to the terminal indicating that the algorithm is currently work...
PlotAssetManager m_manager
void fillData(double dt_max, int t_animate)
This member function calculates the plotting data points from usual expressions.
long getNN(const mglData &_mData)
This member function is a helper to return the number of data points located in the passed mglData ob...
std::string expandStyleForCurveArray(const std::string &sCurrentStyle, bool expand)
This protected member function expands a style string into 9 style string with different luminosities...
std::string getLegendStyle(const std::string &sLegend)
This member function prepares the legend strings to fit the selected legend style (only colours or on...
bool plotstd3d(mglData _mData[3], mglData _mData2[3], const short nType)
This member function creates an actual single three-dimensional trajectory.
void passRangesToGraph()
This member function informs the mglGraph object about the new plotting interval ranges.
void setLogScale(bool bzLogscale)
This member function handles the complex logscale logic applied to the coordinate system of the plot.
size_t countValidElements(const mglData &_mData)
This member function counts the valid data points in the passed mglData object.
void applyColorbar()
This member function applies the colour bar to the plot.
mglPoint createMglPoint(int nCoords, double r, double phi, double theta, bool b3D=false)
This member function creates a mglPoint instance depending on the chosen coordinate system.
void CoordSettings()
This member function applies axes and axis labels to the graph.
std::vector< std::string > separateFunctionsAndData()
This member function separates the functions from the data plots and returns a vector containing the ...
void directionalLight(double dPhi, double dTheta, int nId, char cColor='w', double dBrightness=0.5)
This member function calculates the light source depending on the orientation of the graph....
void create3dDrawing(std::vector< std::string > &vDrawVector)
This member function handles the creation of all three-dimensional drawings.
void defaultRanges(size_t nPlotCompose, bool bNewSubPlot)
This member function applies the default ranges to the plotting ranges.
void createStd3dPlot(size_t nPlotCompose, size_t nPlotComposeSize)
This member function wraps the creation of all trajectory-like plots (plots describing a series of po...
void clearData()
Clearing member function for allocated memory on the heap.
bool plot2d(mglData &_mData, mglData &_mData2, mglData *_mAxisVals, mglData &_mContVec)
This member function creates an actual single two-dimensional plot based upon the current plotting co...
void create2dPlot(size_t nPlotCompose, size_t nPlotComposeSize)
This member function wraps the creation of all all two-dimensional plots (e.g. surface or density plo...
void fitPlotRanges(size_t nPlotCompose, bool bNewSubPlot)
This member function fits the remaining plotting ranges for the calculated interval of data points.
std::string composeColoursForBarChart(long int nNum)
This member function creates a special colour string, which is used for bar charts,...
mglData fmod(const mglData &_mData, double dDenominator)
This member function applies a floating point modulo operator on the data set.
bool createPlotOrAnimation(size_t nPlotCompose, size_t nPlotComposeSize, bool bNewSubPlot, bool bAnimateVar, std::vector< std::string > &vDrawVector, const std::vector< std::string > &vDataPlots)
This member function creates the plot or animation selected by the plotting command.
GraphHelper * createGraphHelper()
void create3dVect()
This member function handles the creation of all three-dimensional vector fields.
void evaluateSubplot(std::string &sCmd, size_t nMultiplots[2], size_t &nSubPlots, size_t &nSubPlotMap)
This member function evaluates the subplot command in a plot composition and determines,...
void create2dVect()
This member function handles the creation of all two-dimensional vector fields.
void applyGrid()
This member function applies the grid with the selected styles to the plot.
bool checkMultiPlotArray(unsigned int nMultiPlot[2], unsigned int &nSubPlotMap, unsigned int nPlotPos, unsigned int nCols, unsigned int nLines)
This member function checks, whether the selected subplot position is still empty.
void prepareMemory()
This member function prepares the memory array in the PlotData class instance to fit the desired plot...
void createDataLegends()
This member function creates the legend strings for the data plots.
bool plotstd(mglData &_mData, mglData &_mAxisVals, mglData _mData2[2], const short nType)
This member function creates an actual single one-dimensional plot based upon the current plotting co...
This class manages the setting values of the internal (kernel) settings of this application.
Mathematical expressions parser.
void createPlot(std::string &sCmd, MemoryManager &_data, mu::Parser &_parser, Settings &_option, FunctionDefinitionManager &_functions, PlotData &_pData)
Wrapper function for creating plots. Will create an instance of the Plot class, which will handle the...
This class represents a set of intervals used together for calculations and simulations.
This structure governs the needed parameters for plotting.