Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Java
 QCRTGraph for Java
 Scaling again
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

chippr

16 Posts

Posted - 12 Aug 2008 :  16:59:42  Show Profile  Reply with Quote
Is there any function which will help when the plot happens to be at the max Y value? The line just draws right along the top of the graph, which isn't very good. I have only the YMAX scaling instead of both MIN and MAX....

quinncurtis

1586 Posts

Posted - 12 Aug 2008 :  22:02:40  Show Profile  Reply with Quote
You can try calling the scroll frames setAutoScaleRoundYMode with AUTOAXES_FAR.

scrollframe.setAutoScaleRoundYMode (ChartConstants.AUTOAXES_FAR);

If your values are exactly at a round axis values, such as 10.0 or 20.0, the axis may still may not round past that values, since it always tries to choose a an even value for the scale.
Go to Top of Page

chippr

16 Posts

Posted - 13 Aug 2008 :  09:11:33  Show Profile  Reply with Quote
Yeah I have already tried that...to no avail...I guess I'll have to turn on the MIN scaling also
Go to Top of Page

quinncurtis

1586 Posts

Posted - 13 Aug 2008 :  10:06:19  Show Profile  Reply with Quote
We don't know if that will work. You do not want to auto-scale a signal, both min and max, that does not have a range. If the signal is 10, then 9.9999999999 to 10.0000000001 is just as valid as an auto scale as 5.0 to 15.

What values do you pick to auto-scale something with no range ? Scaling the y-axis from 0.0 to a round axis value >= the input values seems like the most logical thing to us, and to most users over the last 20 years.

Give some detail. What exactly is the max y-value, and it is assumed your input data value ? What min and max y-scale would you like to see, given a signal pegged at that value, with no range ? How can this pegged signal occur in a real world application with real-time data, as opposed to some kind of simulation where you just input the same exact value every time?
Go to Top of Page

chippr

16 Posts

Posted - 13 Aug 2008 :  11:36:49  Show Profile  Reply with Quote
Hmmm....well in my application the data can be any positive number. In certain cases, the data is a constant over time. This wouldn't be very useful to the user to look at, but nonetheless it is possible to happen.
We plot, for example, the percentage drop of packets in a network stream which can be a very constant value. While what you say about calculating the y-axis scaling is logical, the result of that logic is to have a plot in which the line is drawn along the extreme top of the plot and in my case along a grid line, which doesn't look good. I'm obviously not a graphing expert, like you guys, but I would think that extending the Y max to slightly above the actual data's max would make sense. You could move it up some small ratio of the total range of the y-axis data or something like that, but I'm sure that might be too simplistic and you are the guys with 20 years experience in graphing...
BTW you are right about changing the scale to MINMAX not being effective in this case.
Go to Top of Page

quinncurtis

1586 Posts

Posted - 13 Aug 2008 :  12:00:30  Show Profile  Reply with Quote
Sorry, but we do not have the auto-scaling algorithm you describe. It seems to us that in a real-world network, it would be unlikely that some measured parameter like "dropped packets" could be both constant over a long period of time, and exactly on a "round" value corresponding to the axis maximum, and a major tick mark interval. But we are not network experts. If you feel this is critical to your application, you can always have our special services group craft you an auto-scale algorithm that meets your needs exactly.
Go to Top of Page

chippr

16 Posts

Posted - 13 Aug 2008 :  12:44:36  Show Profile  Reply with Quote
ok..well in any case if I do use MINMAX the scale does eventually change to a extremely small range around the "constant" value. This is not a perfect solution but I'll see if it passes muster with management. If not, then I'll inquire about a special service "fix".
Go to Top of Page

quinncurtis

1586 Posts

Posted - 13 Aug 2008 :  13:14:49  Show Profile  Reply with Quote
Asthetically, and practically, having the chart suddenly re-scale to a range that is orders of magnitude different from scales before and after the constant data interval seems a bad solution. If you want to make the the line plot stand out more when it is pegged against the upper limit of range, give it a thicker line width value, assuming you are using 1. Try 3 or even 5. You can also force the line plot to plot after the grid lines (on top of), if that isn't the case already.
Go to Top of Page

chippr

16 Posts

Posted - 13 Aug 2008 :  14:37:58  Show Profile  Reply with Quote
Thanks, I did make the line size thicker yesterday...I made it 3 I think..which helped....I have decided since the main reason to use your stuff was to be able to move back over time (like the polygraph example) I have to use just Y MAX scaling otherwise when you go back in time, you can lose the plot points...The max Y issue will come up fairly rarely in any case...
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07