mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-12-25 10:01:38 +08:00
BUGFIX: JKQTPCoordinateAxis::tickUnitName was not shown in some cases, when using fractions
This commit is contained in:
parent
f4ac9374d4
commit
61ca14863f
Binary file not shown.
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
@ -463,7 +463,7 @@ QString JKQTPCoordinateAxis::floattolabel(double data, int past_comma) const {
|
|||||||
if (sign<0) res+="-";
|
if (sign<0) res+="-";
|
||||||
if (intpart!=0) res+=QString::number(intpart);
|
if (intpart!=0) res+=QString::number(intpart);
|
||||||
if (num!=0) {
|
if (num!=0) {
|
||||||
if (denom==1) res+=QString::number(num);
|
if (denom==1) res+=addTickUnit(QString::number(num));
|
||||||
else {
|
else {
|
||||||
if (axisStyle.tickLabelType==JKQTPCALTfrac || (axisStyle.tickLabelType==JKQTPCALTintfrac && intpart==0)) res+=QString("\\frac{%1}{%2}").arg(addTickUnit(QString::number(num))).arg(denom);
|
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));
|
else if (axisStyle.tickLabelType==JKQTPCALTintfrac) res=addTickUnit(res+QString("\\frac{%1}{%2}").arg(num).arg(denom));
|
||||||
|
Loading…
Reference in New Issue
Block a user