23#include "../interval.hpp"
24#include "../utils/tools.hpp"
38 std::vector<std::pair<mglData, mglData>>
data;
52 void create(
PlotType _t,
size_t nDim,
size_t nAxes,
const std::vector<size_t>& samples,
size_t nLayers = 1);
59 mglData
norm(
size_t layer)
const;
60 mglData
arg(
size_t layer)
const;
78 create(_t, 1, 1, {nSamples}, datarows);
93 create(_t, 1, 0, {nSamples}, 3*datarows);
108 create(_t, 2, 2, samples, nLayers);
123 create(_t, 3, 3, samples, nLayers);
137 create(_t, 2, 2, samples, 2);
151 create(_t, 3, 3, samples, 3);
This class represents a single interval in code providing reading access functionality.
This class combines the plotassets into a single structure.
void weightedRange(int coord, Interval &ivl) const
This member function does the "undefined data point" magic, where the range of the plot is chosen so ...
IntervalSet getIntervalsOfType(PlotType t, int coord) const
Returns the intervals fitting to all selected data and type.
IntervalSet getFunctionAxes() const
Returns the axis intervals of function plots.
IntervalSet getDataIntervals(int coord=ALLRANGES) const
Returns the intervals fitting to all selected data.
IntervalSet getFunctionIntervals(int coord=ALLRANGES) const
Returns the intervals fitting to all selected data.
IntervalSet getDataAxes() const
Returns the axis intervals of data plots.
bool hasDataPlots() const
Returns true, if the manager contains some data plots.
void applyCoordSys(CoordinateSystem coords, size_t every=1)
Apply the necessary transformation for the selected coordinate system to the managed assets.
IntervalSet getWeightedFunctionIntervals(int coord=ALLRANGES, double dLowerPercentage=1.0, double dUpperPercentage=1.0) const
Returns the central function quantiles.
std::pair< double, double > m_maxnorm
void normalize(int t_animate)
Normalize the managed data to be below 1 (or the starting amplitude in an animation).
std::vector< PlotAsset > assets
IntervalSet getAxisIntervalsOfType(PlotType t) const
Returns the axis intervals of the selected type.
MUP_BASETYPE value_type
The numeric datatype used by the parser.
This class represents a set of intervals used together for calculations and simulations.
A single plot data asset to be plotted. Contains the data, its axes and its type.
size_t getDim() const
Return the internal data dimensions.
std::vector< mglData > axes
void create3DMesh(PlotType _t, const std::vector< size_t > &samples, size_t nLayers=1)
Convenience member function for 3D meshgrid-like plots.
void create2DVect(PlotType _t, const std::vector< size_t > &samples)
Convenience member function for 2D vectorfield plots.
void create2DMesh(PlotType _t, const std::vector< size_t > &samples, size_t nLayers=1)
Convenience member function for 2D meshgrid-like plots.
size_t getLayers() const
Return the internal data layers.
mglData norm(size_t layer) const
Get the absolute value of the complex value contained within this asset.
IntervalSet getWeightedRanges(size_t layer=0, double dLowerPercentage=1.0, double dUpperPercentage=1.0) const
Get the centralized data quantiles.
mglData arg(size_t layer) const
Get the phase angle of the complex value contained within this asset.
PlotAsset()
PlotAsset constructor. Creates an empty and invalid asset.
void duplicatePoints()
This function is a fix for the MathGL bug, which connects points outside of the data range.
void applyModulus(PlotCoords c, double mod)
Apply a modulus to a selected axis (e.g. for curvilinear coordinates).
std::vector< std::pair< mglData, mglData > > data
void create3DPlot(PlotType _t, size_t nSamples, size_t datarows=1)
Convenience member function for 3D plots.
IntervalSet getDataIntervals(size_t layer=0) const
Return the internal data arrays for real and imaginary values.
void writeData(const mu::value_type &val, size_t layer, size_t x, size_t y=0, size_t z=0)
Convenience function to write multi- dimensional data to the internal data object.
void create1DPlot(PlotType _t, size_t nSamples, size_t datarows=1)
Convenience member function for 1D plots.
bool isComplex(size_t layer=0) const
Return true, if the internal data is complex valued.
void removeNegativeValues(PlotCoords c)
This function is a fix for the MathGL bug to connect points, which are out of data range....
mglData vectorsToMatrix() const
Converts the vectors in multiple layers into a single matrix.
void writeAxis(double val, size_t pos, PlotCoords c=XCOORD)
Convenience function to write the axis values.
void create(PlotType _t, size_t nDim, size_t nAxes, const std::vector< size_t > &samples, size_t nLayers=1)
Prepares the internal memory to fit the desired elements.
Interval getAxisInterval(PlotCoords c=XCOORD) const
Return the interval, which is governed by the corresponding axis.
void create3DVect(PlotType _t, const std::vector< size_t > &samples)
Convenience member function for 3D vectorfield plots.