28#include "jkqtplotter/jkqtptools.h"
29#include "jkqtplotter/jkqtplotter_imexport.h"
30#include "jkqtcommon/jkqtpdrawingtools.h"
31#include "jkqtplotter/jkqtpgraphsbase.h"
32#include "jkqtcommon/jkqtpenhancedpainter.h"
33#include "jkqtplotter/jkqtpgraphsbaseerrors.h"
34#include "jkqtplotter/graphs/jkqtprange.h"
35#include "jkqtplotter/graphs/jkqtplines.h"
36#include "jkqtplotter/jkqtpgraphsbasestylingmixins.h"
105 virtual bool getXMinMax(
double& minx,
double& maxx,
double& smallestGreaterZero)
override;
107 virtual bool getYMinMax(
double& miny,
double& maxy,
double& smallestGreaterZero)
override;
153 typedef std::function<double(
double x,
double y,
double widcolumn)>
FunctorToWidth;
155 typedef std::function<double(
double x,
double y,
double sizecolumn)>
FunctorToSize;
439 virtual bool getXMinMax(
double& minx,
double& maxx,
double& smallestGreaterZero)
override;
441 virtual bool getYMinMax(
double& miny,
double& maxy,
double& smallestGreaterZero)
override;
452 virtual bool intPlotXYErrorIndicatorsGetColor(
JKQTPEnhancedPainter& painter,
const JKQTBasePlotter* parent,
const JKQTPGraph* parentGraph,
int xColumn,
int yColumn,
int xErrorColumn,
int yErrorColumn,
JKQTPErrorPlotstyle xErrorStyle,
JKQTPErrorPlotstyle yErrorStyle,
int index, QColor& errorLineColor, QColor& errorFillColor)
const override;
base class for 2D plotter classes (used by the plotter widget JKQTPlotter)
Definition jkqtpbaseplotter.h:394
this virtual class is the base for any type of coordinate axis, to be drawn by JKQTBasePlotter.
Definition jkqtpcoordinateaxes.h:181
This class manages data columns (with entries of type double ), used by JKQTPlotter/JKQTBasePlotter t...
Definition jkqtpdatastorage.h:282
this class extends the QPainter
Definition jkqtpenhancedpainter.h:33
this virtual base class of the (data-column based) graphs, which are part of a JKQTPlotter plot and w...
Definition jkqtpgraphsbase.h:429
This Mix-In class provides setter/getter methods, storage and other facilities for the graph line sty...
Definition jkqtpgraphsbasestylingmixins.h:49
This Mix-In class provides setter/getter methods, storage and other facilities for the graph symbols ...
Definition jkqtpgraphsbasestylingmixins.h:379
This class is the base class for graphs that only display error indicators in x- and y-direction.
Definition jkqtpgraphsbaseerrors.h:349
This virtual JKQTPGraph descendent may be used as base for all graphs that use at least two columns t...
Definition jkqtpgraphsbase.h:586
This implements xy scatter plots (like JKQTPXYScatterGraph), but the color and size of the symbols ma...
Definition jkqtpscatter.h:431
virtual bool intPlotXYErrorIndicatorsGetColor(JKQTPEnhancedPainter &painter, const JKQTBasePlotter *parent, const JKQTPGraph *parentGraph, int xColumn, int yColumn, int xErrorColumn, int yErrorColumn, JKQTPErrorPlotstyle xErrorStyle, JKQTPErrorPlotstyle yErrorStyle, int index, QColor &errorLineColor, QColor &errorFillColor) const override
this function can be used to set the color of the error indicators automatically
JKQTPXYParametrizedErrorScatterGraph(JKQTPlotter *parent)
virtual bool getYMinMax(double &miny, double &maxy, double &smallestGreaterZero) override
get the maximum and minimum y-value of the graph
JKQTPXYParametrizedErrorScatterGraph(JKQTBasePlotter *parent=nullptr)
virtual bool getXMinMax(double &minx, double &maxx, double &smallestGreaterZero) override
get the maximum and minimum x-value of the graph
virtual void drawErrorsBefore(JKQTPEnhancedPainter &painter) override
this function is used to plot error inidcators before plotting the graphs.
virtual bool usesColumn(int c) const override
returns true if the given column is used by the graph
This implements xy scatter plots (like JKQTPXYScatterGraph), but the color and size of the symbols ma...
Definition jkqtpscatter.h:147
int sizeColumn
this column contains the symbol size in pt
Definition jkqtpscatter.h:355
bool drawLine
indicates whether to draw a line or not
Definition jkqtpscatter.h:351
virtual void getOutsideSize(JKQTPEnhancedPainter &painter, int &leftSpace, int &rightSpace, int &topSpace, int &bottomSpace) override
if the graph plots outside the actual plot field of view (e.g. color bars, scale bars,...
std::function< JKQTPGraphSymbols(double x, double y, double symcolumn)> FunctorToSymbol
functor, which converts the value of the symbol column (at a location x,y) into a JKQTPGraphSymbols
Definition jkqtpscatter.h:151
double gridSymbolFractionSize
if the gridModeForSymbolSize mode is actiavted (true), the plot assumes that the scatter symbols are ...
Definition jkqtpscatter.h:370
bool getDrawLine() const
indicates whether to draw a line or not
int symbolColumn
this column contains the symbol type
Definition jkqtpscatter.h:359
virtual QColor getKeyLabelColor() const override
returns the color to be used for the key label
void setSizeColumn(size_t __value)
this column contains the symbol size in pt
JKQTPColorDerivationMode symbolFillDerivationMode
specifies how to derive the symbol fill color from the symbol/line color
Definition jkqtpscatter.h:391
virtual void setParent(JKQTBasePlotter *parent) override
sets the parent painter class
double getGridDeltaY() const
if the gridModeForSymbolSize mode is actiavted (true), the plot assumes that the scatter symbols are ...
void setDrawLine(bool __value)
indicates whether to draw a line or not
virtual void drawKeyMarker(JKQTPEnhancedPainter &painter, const QRectF &rect) override
plots a key marker inside the specified rectangle rect
virtual void drawOutside(JKQTPEnhancedPainter &painter, QRect leftSpace, QRect rightSpace, QRect topSpace, QRect bottomSpace) override
plots outside the actual plot field of view (e.g. color bars, scale bars, ...)
virtual void cbGetDataMinMax(double &imin, double &imax) override
determine min/max data value of the image
void setLinewidthColumn(int __value)
this column contains the line width
void setDrawLineInForeground(bool __value)
indicates whether to draw the line behind or above the symbols
double getGridSymbolFractionSize() const
if the gridModeForSymbolSize mode is actiavted (true), the plot assumes that the scatter symbols are ...
double gridDeltaX
if the gridModeForSymbolSize mode is actiavted (true), the plot assumes that the scatter symbols are ...
Definition jkqtpscatter.h:366
FunctorToSize getSizeColumnFunctor()
returns the current functor, which converts a value from the sizeColumn into an actual symbol size in...
int getSizeColumn() const
this column contains the symbol size in pt
JKQTPColorDerivationMode getSymbolFillDerivationMode() const
specifies how to derive the symbol fill color from the symbol/line color
void setGridDeltaX(double __value)
if the gridModeForSymbolSize mode is actiavted (true), the plot assumes that the scatter symbols are ...
void setSymbolColumn(int __value)
this column contains the symbol type
QColor getLocalColor(int i) const
retrns the local color for the i-th datapoint
int linewidthColumn
this column contains the line width
Definition jkqtpscatter.h:361
void setSizeColumnFunctor(FunctorToSize ff)
defines a functor, which converts a value from the sizeColumn into an actual symbol size in pt
int colorColumn
this column contains the symbol color
Definition jkqtpscatter.h:357
double getLocalLineWidth(int i)
retrns the local line width for the i-th datapoint
void setColorColumnContainsRGB(bool __value)
if this is true, the value in the colorColumn is converted to an integer, representing a color in ARG...
void setGridModeForSymbolSize(bool __value)
if the gridModeForSymbolSize mode is actiavted (true), the plot assumes that the scatter symbols are ...
void setColor(QColor c)
set color of line and symbol
virtual void draw(JKQTPEnhancedPainter &painter) override
plots the graph to the plotter object specified as parent
double intColMax
internally used to store the range of the color column
Definition jkqtpscatter.h:388
FunctorToSize m_toSizePtFunctor
functor, which converts the value of the line size column (at a location x,y) into a symbol size (in ...
Definition jkqtpscatter.h:398
JKQTPGraphSymbols getLocalSymbolType(int i)
retrns the local symbol type for the i-th datapoint
void setColorColumn(size_t __value)
this column contains the symbol color
bool getColorColumnContainsRGB() const
if this is true, the value in the colorColumn is converted to an integer, representing a color in ARG...
std::function< double(double x, double y, double sizecolumn)> FunctorToSize
functor, which converts the value of the line size column (at a location x,y) into a symbol size (in ...
Definition jkqtpscatter.h:155
double gridDeltaY
if the gridModeForSymbolSize mode is actiavted (true), the plot assumes that the scatter symbols are ...
Definition jkqtpscatter.h:368
void setLinewidthColumn(size_t __value)
this column contains the line width
int getColorColumn() const
this column contains the symbol color
FunctorToSymbol getSymbolColumnFunctor()
returns the current functor, which converts a value from the symbolColumn into an actual symbol type
JKQTPXYParametrizedScatterGraph(JKQTPlotter *parent)
class constructor
bool gridModeForSymbolSize
if the gridModeForSymbolSize mode is actiavted (true), the plot assumes that the scatter symbols are ...
Definition jkqtpscatter.h:364
bool colorColumnContainsRGB
if this is true, the value in the colorColumn is converted to an integer, representing a color in ARG...
Definition jkqtpscatter.h:373
void setSymbolColumnFunctor(FunctorToSymbol ff)
defines a functor, which converts a value from the symbolColumn into an actual symbol type
bool getGridModeForSymbolSize() const
if the gridModeForSymbolSize mode is actiavted (true), the plot assumes that the scatter symbols are ...
double getLocalSymbolSize(int i)
retrns the local symbol size for the i-th datapoint
JKQTPXYParametrizedScatterGraph(JKQTBasePlotter *parent=nullptr)
class constructor
void setSymbolFillDerivationMode(JKQTPColorDerivationMode m)
specifies how to derive the symbol fill color from the symbol/line color
void setGridSymbolFractionSize(double __value)
if the gridModeForSymbolSize mode is actiavted (true), the plot assumes that the scatter symbols are ...
virtual bool usesColumn(int c) const override
returns true if the given column is used by the graph
FunctorToWidth m_toWidthPtFunctor
functor, which converts the value of the line width column (at a location x,y) into a line width (in ...
Definition jkqtpscatter.h:396
void setGridDeltaY(double __value)
if the gridModeForSymbolSize mode is actiavted (true), the plot assumes that the scatter symbols are ...
double getGridDeltaX() const
if the gridModeForSymbolSize mode is actiavted (true), the plot assumes that the scatter symbols are ...
void setSizeColumn(int __value)
this column contains the symbol size in pt
FunctorToSymbol m_toSymbolFunctor
functor, which converts the value of the symbol column (at a location x,y) into a JKQTPGraphSymbols
Definition jkqtpscatter.h:394
void clearSizeColumnFunctor()
defines a standard (1:1) functor, which converts a value from the sizeColumn into an actual symbol si...
void setSymbolColumn(size_t __value)
this column contains the symbol type
double intColMin
internally used to store the range of the color column
Definition jkqtpscatter.h:386
int getSymbolColumn() const
this column contains the symbol type
void clearLinewidthColumnFunctor()
defines a standard (1:1) functor, which converts a value from the symbolColumn into an actual line wi...
bool getDrawLineInForeground() const
indicates whether to draw the line behind or above the symbols
std::function< double(double x, double y, double widcolumn)> FunctorToWidth
functor, which converts the value of the line width column (at a location x,y) into a line width (in ...
Definition jkqtpscatter.h:153
FunctorToWidth getLinewidthColumnFunctor()
returns the current functor, which converts a value from the symbolColumn into an actual line width i...
void setMappedSymbolColumnFunctor(const QMap< double, JKQTPGraphSymbols > &symmap)
defines a special functor, which converts a value from the symbolColumn into an actual symbol type,...
void clearSymbolColumnFunctor()
defines a standard (1:1) functor, which converts a value from the symbolColumn into an actual symbol ...
void setColorColumn(int __value)
this column contains the symbol color
void setLinewidthColumnFunctor(FunctorToWidth ff)
defines a functor, which converts a value from the symbolColumn into an actual line width in pt
int getLinewidthColumn() const
this column contains the line width
bool drawLineInForeground
indicates whether to draw the line behind or above the symbols
Definition jkqtpscatter.h:353
This implements xy scatter plots with x and y error indicators.
Definition jkqtpscatter.h:96
JKQTPXYScatterErrorGraph(JKQTBasePlotter *parent=nullptr)
class constructor
virtual void drawErrorsBefore(JKQTPEnhancedPainter &painter) override
this function is used to plot error inidcators before plotting the graphs.
virtual bool usesColumn(int c) const override
returns true if the given column is used by the graph
virtual bool getXMinMax(double &minx, double &maxx, double &smallestGreaterZero) override
get the maximum and minimum x-value of the graph
virtual bool getYMinMax(double &miny, double &maxy, double &smallestGreaterZero) override
get the maximum and minimum y-value of the graph
JKQTPXYScatterErrorGraph(JKQTPlotter *parent)
class constructor
This implements xy scatter plots. This also alows to draw symbols at the data points.
Definition jkqtpscatter.h:59
void setColor(QColor c)
set color of line and symbol
JKQTPXYScatterGraph(JKQTBasePlotter *parent=nullptr)
class constructor
virtual void draw(JKQTPEnhancedPainter &painter) override
plots the graph to the plotter object specified as parent
virtual void drawKeyMarker(JKQTPEnhancedPainter &painter, const QRectF &rect) override
plots a key marker inside the specified rectangle rect
virtual QColor getKeyLabelColor() const override
returns the color to be used for the key label
JKQTPXYScatterGraph(JKQTPlotter *parent)
class constructor
plotter widget for scientific plots (uses JKQTBasePlotter to do the actual drawing)
Definition jkqtplotter.h:364
QFlags< JKQTPErrorPlotstyleElements > JKQTPErrorPlotstyle
specifies the plot styles for the error information, e.g. error bars, boxes, lines ....
Definition jkqtptools.h:728
JKQTPGraphSymbols type
Definition jkqtpscatter.h:412
QColor fillColor
Definition jkqtpscatter.h:415
QColor color
Definition jkqtpscatter.h:414
double size
Definition jkqtpscatter.h:413
double x
Definition jkqtpscatter.h:410
double y
Definition jkqtpscatter.h:411
helper struct, which describes a single symbol
Definition jkqtpscatter.h:409
#define JKQTPLOTTER_LIB_EXPORT
Definition jkqtplotter_imexport.h:89
Specifies how a fill-color is derived from a given color.
Definition jkqtptools.h:262
helper class for setMappedSymbolColumnFunctor()
Definition jkqtpscatter.h:401
JKQTPGraphSymbols operator()(double x, double y, double symcolumn) const
JKQTPXYParametrizedScatterGraph * parent
Definition jkqtpscatter.h:403
MappedSymbolFunctor(const QMap< double, JKQTPGraphSymbols > &mapping_, JKQTPXYParametrizedScatterGraph *graph)
QMap< double, JKQTPGraphSymbols > mapping
Definition jkqtpscatter.h:402