#19 axis label precision misbehavior

closed-fixed
Alan W. Irwin
None
5
2009-11-17
2003-11-19
Derek Dolney
No

I am using plplot-5.2.1. Try the following bit of code:

#include <plplot.h>

int main(void) {

plinit();

plsyax(0, 2);

plprec(1, 2);

pladv(0);
plvpor(0.1, 0.9, 0.1, 0.9);
plwind(0.00, 1.00, 0.00, 0.10);
plbox("bcnst", 0, 0, "bcnstv", 0, 0);

pladv(0);
plvpor(0.1, 0.9, 0.1, 0.9);
plwind(0.00, 1.00, 0.00, 0.08); /* changed limit */
plbox("bcnst", 0, 0, "bcnstv", 0, 0);

plend();

}

The first page looks like I wanted, with two digit
precision on all the labels. For the second page, I
only changed the upper limit of the y-axis. For values
less than 0.1, plplot insists on using exponential
notation. I can't get it to just write "0.08", etc.

Please help! Thanks,

Derek Dolney

Discussion

  • Alan W. Irwin
    Alan W. Irwin
    2009-11-16

    • assigned_to: nobody --> airwin
     
  • Alan W. Irwin
    Alan W. Irwin
    2009-11-17

    As of revision 10608 (today) we have (finally) fixed this issue. The problem was in pldprec where ceiling logic on the digfix value effectively didn't allow ydigmax values specified by plsyax(ydigmax, 0) greater than 4 to be utilized. If you look at the svn trunk version of PLplot and try out, e.g.,

    examples/python/test_axis_precision.py -dev xwin

    you will find an example where the exponential notation is _not_ used for

    plwind(0.00, 1.00, 0.00, 0.08);

    for the svn trunk version of PLplot. Revision 10608 should be going into our next release of PLplot.

     
  • Alan W. Irwin
    Alan W. Irwin
    2009-11-17

    • status: open --> closed-fixed