Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Java
 QCChart3D for Java
 controlling digits past decimal point using SCINot

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List

* Forum Code is ON
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]


T O P I C    R E V I E W
Peter Posted - 16 Jun 2010 : 18:45:54
I'm trying to control the display of Numeric Axis Labels, namely the number of digits to the right of the decimal place. I'm using setAxisLabelsFormat(NumericalAxisLabels.SCIENTIFICFORMAT)
which behaves on a linear scale axis but adds numerous decimal places when I change the axis to log scale.

I tried using setAxisLabelsDecimalPos(2) but that didn't work--in fact it made it worse! Without this call on a linear scaled axis, the labels were truncated one place past the decimal. With the call, it added 26 places past the decimal.

With the call to setAxisLabelsDecimalPos(2) on a log scale axis, it started at 13 decimal places and with each successive tick, it added another decimal place to the tick's label until it got to the end of the axis with 26 decimal places.

The data consists of large numbers--between 10**12 to 10**26...

Thanks for any insight.
2   L A T E S T    R E P L I E S    (Newest First)
Peter Posted - 03 Jul 2010 : 19:12:44
quinncurtis Posted - 17 Jun 2010 : 09:31:17
The setAxislabelsDecimalPos method does not set the number of decimals displayed, it sets the precision of the number.

For a log axis, if you are plotting data in the range of 10^26, try a value of -26.


This will keep all of the axis labels at a value 1E12, 1E13,...,1E26

Or you can use EXPONENTFORMAT format and set the decimal precision to -99.

Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07