Standard Deviation graph is slightly offset for one value
Standard Deviation graph is slightly offset for one value
With mean 3 and standard deviation 1 graph is slightly tilted and looks normal for all other values. It also happens with mean 6 sd 2, mean 9 sd 3 etc. here is an image of that happening http://imgur.com/a/fDP3M does anybody know why is that?
-
- Posts: 513
- Joined: Wed Sep 12, 2007 3:18 pm
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: Standard Deviation graph is slightly offset for one valu
There is a flag (autoRangeStickyZero) that you can set on the axis to control this:
The default is true, so that when margins are added to the axis range but zero falls within the margin, then the axis is forced to start at zero. This very often is what people expect, but in your case not so set the flag the false.
Code: Select all
/**
* A flag that affects the size of the margins added to the axis range when
* the range is determined automatically. If the value 0 falls within the
* margin and this flag is TRUE, then the margin is truncated at zero.
*/
private boolean autoRangeStickyZero;
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

