mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-12-25 10:01:38 +08:00
added function to check whether axis is linear
This commit is contained in:
parent
664861d031
commit
c02ebf817b
@ -20,6 +20,7 @@
|
|||||||
#include "jkqtplotter/jkqtpcoordinateaxes.h"
|
#include "jkqtplotter/jkqtpcoordinateaxes.h"
|
||||||
#include "jkqtplotter/jkqtpbaseplotter.h"
|
#include "jkqtplotter/jkqtpbaseplotter.h"
|
||||||
#include "jkqtcommon/jkqtpdrawingtools.h"
|
#include "jkqtcommon/jkqtpdrawingtools.h"
|
||||||
|
#include "jkqtcommon/jkqtpgeometrytools.h"
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <cfloat>
|
#include <cfloat>
|
||||||
@ -573,7 +574,12 @@ void JKQTPCoordinateAxis::calcPlotScaling(bool force) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool JKQTPCoordinateAxis::isLogAxis() const {
|
bool JKQTPCoordinateAxis::isLogAxis() const {
|
||||||
return logAxis || (axisStyle.tickMode==JKQTPLTMPower);
|
return logAxis;// || (axisStyle.tickMode==JKQTPLTMPower);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool JKQTPCoordinateAxis::isLinearAxis() const
|
||||||
|
{
|
||||||
|
return !logAxis;
|
||||||
}
|
}
|
||||||
|
|
||||||
const JKQTPCoordinateAxisStyle &JKQTPCoordinateAxis::getCurrentAxisStyle() const
|
const JKQTPCoordinateAxisStyle &JKQTPCoordinateAxis::getCurrentAxisStyle() const
|
||||||
|
@ -365,6 +365,9 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPCoordinateAxis: public QObject {
|
|||||||
/** \brief returns whether this axis uses logarithmic scaling */
|
/** \brief returns whether this axis uses logarithmic scaling */
|
||||||
bool isLogAxis() const;
|
bool isLogAxis() const;
|
||||||
|
|
||||||
|
/** \brief returns whether this axis uses linear scaling (is false e.g. for isLogAxis()==true) */
|
||||||
|
bool isLinearAxis() const;
|
||||||
|
|
||||||
|
|
||||||
/** \brief current style properties for this JKQTBasePlotter
|
/** \brief current style properties for this JKQTBasePlotter
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user