Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Java
 QCChart2D for Java
 Fixing Y-Axis to a certain range of values...

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

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

* HTML is OFF
* Forum Code is ON
Smilies
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
javaman Posted - 05 May 2009 : 14:51:54
Hi,

I have a plot that receives a ton of data - and the data is normally centered around a certain value (say 15000). This plot is a time-series plot. Now, sometimes we get invalid data (usually a 0 value) which is okay - but this throws off the displayed Y-Axis - it now goes from 0 - 15000 - and all the data is scrunched at the top with that one point at the bottom.

The question is whether I can fix the Y-Axis to a certain range - and those that fall outside that range are just not shown in the plot? Thus, for instance, my Y-Axis would range from say 14800 to 15200.

Any ideas on this or do you need more info?

thanx.

Thanx - Joe!
1   L A T E S T    R E P L I E S    (Newest First)
quinncurtis Posted - 05 May 2009 : 15:52:27
You can define a coordinate system to any range you want; you do not have to use the auto-scaling. This is all discussed in Chapter 4 - Scaling and Coordinate Systems.

double xMin = -5;
double xMax = 15;
double yMin = 0;
double yMax = 105;
CartesianCoordinates simpleScale;
simpleScale = new CartesianCoordinates(xMin, yMin, xMax, yMax);



It may be that you want to first auto-scale, and then change one or more of the minimum or maximum values. Again, Chapter 4 discusses this.

double [] xData = {2,3,4,5,6,7,8,9};
double [] yData = { 22, 33, 44, 55, 46, 33, 25, 14};
SimpleDataset dataset = new SimpleDataset("“Sales", xData, yData);
CartesianCoordinates simpleScale = new CartesianCoordinates();
simpleScale.autoScale(dataset);
simpleScale.setScaleStartY(20);




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