X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Fchart-geometry.c;h=49b1ed6a8d243341d768e9d9b0695f4a2804de8f;hb=d3487b8eeb911e0547acf72fe4481338d78d0721;hp=26268fd2f32c89032ebb4b5673cc21032b7dfbf5;hpb=deb0f9c922e36c6dcf48e519f83416eb875b21cb;p=pspp
diff --git a/src/math/chart-geometry.c b/src/math/chart-geometry.c
index 26268fd2f3..49b1ed6a8d 100644
--- a/src/math/chart-geometry.c
+++ b/src/math/chart-geometry.c
@@ -167,7 +167,7 @@ chart_get_scale (double highdbl, double lowdbl,
* Non Scientific: "%.3lf", scale=1.00
* Scientific: "%.2lfe3", scale = 0.001
* Usage example:
- * fs = chart_get_ticks_format(95359943.3,34434.9,8,&scale,&long);
+ * fs = chart_get_ticks_format(95359943.3,34434.9,8,&scale);
* printf(fs,value*scale);
* free(fs);
*/
@@ -191,7 +191,7 @@ chart_get_ticks_format (const double max, const double min,
}
else if (logmax > 0.0) /*logintv is > 0*/
{
- if (logintv < 3.0)
+ if (logintv < 5.0)
{
logshift = 0; /* No scientific format */
nrdecs = 0;
@@ -201,12 +201,12 @@ chart_get_ticks_format (const double max, const double min,
{
logshift = (int)logmax;
nrdecs = MIN(6,(int)(logmax-logintv)+1);
- format_string = xasprintf("%%.%dlfe%d",nrdecs,logshift);
+ format_string = xasprintf("%%.%dlf∙10%d",nrdecs,logshift);
}
}
else /* logmax and logintv are < 0 */
{
- if (logmax > -3.0)
+ if (logmax > -4.0)
{
logshift = 0; /* No scientific format */
nrdecs = (int)(-logintv) + 1;
@@ -216,7 +216,7 @@ chart_get_ticks_format (const double max, const double min,
{
logshift = (int)logmax-1;
nrdecs = MIN(6,(int)(logmax-logintv)+1);
- format_string = xasprintf("%%.%dlfe%d",nrdecs,logshift);
+ format_string = xasprintf("%%.%dlf∙10%d",nrdecs,logshift);
}
}
*scale = pow(10.0,-(double)logshift);