diff --git a/doc/images/axisstyle/axis_unit_scaling_pi.png b/doc/images/axisstyle/axis_unit_scaling_pi.png index 2a667b3e11..36c4f5a578 100644 Binary files a/doc/images/axisstyle/axis_unit_scaling_pi.png and b/doc/images/axisstyle/axis_unit_scaling_pi.png differ diff --git a/lib/jkqtplotter/jkqtpcoordinateaxes.cpp b/lib/jkqtplotter/jkqtpcoordinateaxes.cpp index bfbc362a84..d4df7cfa3f 100644 --- a/lib/jkqtplotter/jkqtpcoordinateaxes.cpp +++ b/lib/jkqtplotter/jkqtpcoordinateaxes.cpp @@ -463,7 +463,7 @@ QString JKQTPCoordinateAxis::floattolabel(double data, int past_comma) const { if (sign<0) res+="-"; if (intpart!=0) res+=QString::number(intpart); if (num!=0) { - if (denom==1) res+=QString::number(num); + if (denom==1) res+=addTickUnit(QString::number(num)); else { if (axisStyle.tickLabelType==JKQTPCALTfrac || (axisStyle.tickLabelType==JKQTPCALTintfrac && intpart==0)) res+=QString("\\frac{%1}{%2}").arg(addTickUnit(QString::number(num))).arg(denom); else if (axisStyle.tickLabelType==JKQTPCALTintfrac) res=addTickUnit(res+QString("\\frac{%1}{%2}").arg(num).arg(denom));