added function to check whether axis is linear

This commit is contained in:
jkriege2 2020-09-03 22:56:38 +02:00
parent 664861d031
commit c02ebf817b
2 changed files with 10 additions and 1 deletions

View File

@ -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

View File

@ -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
* *