3Depict
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Functions | Variables
plot.cpp File Reference
#include "plot.h"
#include "common/stringFuncs.h"
#include "common/translation.h"
#include <mgl2/canvas_wnd.h>
Include dependency graph for plot.cpp:

Functions

bool mglFloatTooClose (float a, float b)
 
std::wstring strToWStr (const std::string &s)
 
std::string wstrToStr (const std::wstring &s)
 
std::string mglColourCode (float r, float g, float b)
 
string plotString (unsigned int plotMode)
 Return a human readable string for a given plot type. More...
 
unsigned int plotID (const std::string &plotString)
 Return the plot type given a human readable string. More...
 
unsigned int plotErrmodeID (const std::string &s)
 Return the error mode type, given the human readable string. More...
 
string plotErrmodeString (unsigned int plotID)
 Return a human readable string for the plot error mode. More...
 

Variables

const char * errModeStrings []
 Plot error bar estimation strings. More...
 
const char * traceStyleStrings []
 
const float AXIS_MIN_TOLERANCE =10*sqrtf(std::numeric_limits<float>::epsilon())
 

Function Documentation

◆ mglColourCode()

std::string mglColourCode ( float  r,
float  g,
float  b 
)

◆ mglFloatTooClose()

bool mglFloatTooClose ( float  a,
float  b 
)

Referenced by PlotWrapper::getAppliedBounds().

Here is the caller graph for this function:

◆ plotErrmodeID()

unsigned int plotErrmodeID ( const std::string &  s)

Return the error mode type, given the human readable string.

References ASSERT, errModeStrings, and PLOT_ERROR_ENDOFENUM.

Referenced by ProfileFilter::setProperty().

Here is the caller graph for this function:

◆ plotErrmodeString()

string plotErrmodeString ( unsigned int  plotID)

Return a human readable string for the plot error mode.

References errModeStrings, and plotID().

Referenced by ProfileFilter::getProperties().

Here is the caller graph for this function:

◆ plotID()

unsigned int plotID ( const std::string &  plotString)

◆ plotString()

string plotString ( unsigned int  plotMode)

Return a human readable string for a given plot type.

References ASSERT, PLOT_TYPE_ENUM_END, traceStyleStrings, and TRANS.

Referenced by SpectrumPlotFilter::getProperties(), and ProfileFilter::getProperties().

Here is the caller graph for this function:

◆ strToWStr()

std::wstring strToWStr ( const std::string &  s)

◆ wstrToStr()

std::string wstrToStr ( const std::wstring &  s)

Variable Documentation

◆ AXIS_MIN_TOLERANCE

const float AXIS_MIN_TOLERANCE =10*sqrtf(std::numeric_limits<float>::epsilon())

Referenced by Plot1D::setData().

◆ errModeStrings

const char* errModeStrings[]
Initial value:
= {
NTRANS("None"),
}
#define NTRANS(x)
Gettext null-translation macro (mark for translation, but do nothing)
Definition: translation.h:33

Plot error bar estimation strings.

Referenced by plotErrmodeID(), and plotErrmodeString().

◆ traceStyleStrings

const char* traceStyleStrings[]
Initial value:
= {
NTRANS("Lines"),
NTRANS("Bars"),
NTRANS("Steps"),
NTRANS("Stem"),
NTRANS("Points"),
(""),
NTRANS("Density"),
NTRANS("Scatter"),
}
#define NTRANS(x)
Gettext null-translation macro (mark for translation, but do nothing)
Definition: translation.h:33

Referenced by plotID(), and plotString().