Hello,
We have plotted XYPlot with Domain and Range Axis as Number Axis with AutoRangeIncludesZero(true).
The issue is that we want to extend the axis to contain majoraxis at the end
In the attached image the in first graph the Range axis should automatically go till 50, the second graph is ok and third graph should go till 75
same with domain axis, it should go till 32.5
How can we do this with AutoRange as the dataset would be dynamic
Thanks & Regards,
Pranav C Lunavat
Show majorAxis at the end of NumberAxis
Re: Show majorAxis at the end of NumberAxis
Tag!
Since you are having a constrained, dynamic XYPlot, I would recommend turning off auto range includes zero (set it to false), and instead manually set the range on the NumberAxis.
Since you want to always include zero, create the plot, obtain the range of the axis you want to modify, set the lower bound to 0, and the upper bound to whatever you compute it to be (for the first plot, you may want to always round up to the nearest increment of 10, ie the 43 on the first plot would become 50.
David
Since you are having a constrained, dynamic XYPlot, I would recommend turning off auto range includes zero (set it to false), and instead manually set the range on the NumberAxis.
Since you want to always include zero, create the plot, obtain the range of the axis you want to modify, set the lower bound to 0, and the upper bound to whatever you compute it to be (for the first plot, you may want to always round up to the nearest increment of 10, ie the 43 on the first plot would become 50.
David
Re: Show majorAxis at the end of NumberAxis
Hello David,
Thanks for the reply.
The graphs are created dynamically and hence I would like to go by AutoRange.
My only requirement is that the max end of the axis should always display the value as its a standard norms. Currently (attached image in original post) it doesn't show. Whether this can be achieved automatically or I'll have to do it manually as suggested by you
Thanks for the reply.
The graphs are created dynamically and hence I would like to go by AutoRange.
My only requirement is that the max end of the axis should always display the value as its a standard norms. Currently (attached image in original post) it doesn't show. Whether this can be achieved automatically or I'll have to do it manually as suggested by you
Re: Show majorAxis at the end of NumberAxis
Sorry to ask a question rather than post an answer. How did you get the value plot points to appear as dots on the red line ?
The API is very complex and I'm making very slow progress
The API is very complex and I'm making very slow progress
-
- Posts: 513
- Joined: Wed Sep 12, 2007 3:18 pm
Re: Show majorAxis at the end of NumberAxis
Also look at DatasetUtils methods that iterate over the items in an XYDataset to find the bounds.