Skip to content

Commit

Permalink
BUGFIX: JKQTPCoordinateAxis::tickUnitName was not shown in some cases…
Browse files Browse the repository at this point in the history
…, when using fractions
  • Loading branch information
jkriege2 committed Dec 19, 2023
1 parent f4ac937 commit 61ca148
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file modified doc/images/axisstyle/axis_unit_scaling_pi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion lib/jkqtplotter/jkqtpcoordinateaxes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 61ca148

Please sign in to comment.