I need a category plot displaying only a few data items which must be updatable, looking like this: http://i7.photobucket.com/albums/y260/- ... orbars.jpg
I created the above chart using DefaultStatisticalCategoryDataset which just about works perfectly. However, I cannot figure out a suitable way to update the dataset and thus the chart. Say on that chart I want to update Group 2s data, I've tried removing the relevant data from the dataset and adding in new data for Group 2 but this means the X axis is now unordered (Group 1...Group 3...Group 2).
Alternatively I tried implementing it using DefaultCategoryDataset. This allows me to edit and update the mean values on my chart perfectly through the setValue method but I can't figure out how to add (updatable) error bars to this chart!
If DefaultStatisticalCategoryDataset had setMean and setStDv methods that would be perfect! Can anyone see how I can be both updatable and include error charts? Or perhaps an alternative way of updating my DefaultStatisticalCategoryDataset which would keep the order of items on the x axis?
Thanks! I did do a good search through the forums but couldn't find anything exactly like this.
Category plot with error bars
-
- Posts: 1634
- Joined: Sat Feb 17, 2007 1:51 pm
Re: Category plot with error bars
Have you tried to add the men and stddev values without removing the old data first, e. g. just callJ. wrote: I created the above chart using DefaultStatisticalCategoryDataset which just about works perfectly. However, I cannot figure out a suitable way to update the dataset and thus the chart. Say on that chart I want to update Group 2s data, I've tried removing the relevant data from the dataset and adding in new data for Group 2 but this means the X axis is now unordered (Group 1...Group 3...Group 2).
Alternatively I tried implementing it using DefaultCategoryDataset. This allows me to edit and update the mean values on my chart perfectly through the setValue method but I can't figure out how to add (updatable) error bars to this chart!
If DefaultStatisticalCategoryDataset had setMean and setStDv methods that would be perfect!
Code: Select all
DefaultStatisticalCategoryDataset.add(double mean, double standardDeviation, java.lang.Comparable rowKey, java.lang.Comparable columnKey)