my xyPlots have many points, and assigning shapes to some of the points would be helpful in identifying each line on a plot. With a shape at each point, it is hard to differentiate each line. With that being said, is there a method out there for limiting the number of shapes on an XY Plot. I do have the documentation, but have not found anything yet.
Chris
method for limiting the number of symbols on an XY chart?
chris36,
Any progress on this item? I am in a similar situation (I think) where I generate a dataset using the DatasetUtilities.sampleFunction2D to "simulate" the drawing of curves since there is no direct support for drawing curves (that I am aware of).
It would be helpful to differentiate between the lines.
One way, as you've suggested, is to draw each line with shapes at some points. I haven't figured out an elegant way to do this. I can make it look like this by drawing a line with no shapes, then drawing that same line with only shapes sampled at a few points.
Another way is to use various kinds of dotted and dashed lines by modifying the stroke. This is fine, but I personally would love (a) more direct support for drawing curves and (b) a more elegant way of drawing a line + shape for curves.
Jelai
Any progress on this item? I am in a similar situation (I think) where I generate a dataset using the DatasetUtilities.sampleFunction2D to "simulate" the drawing of curves since there is no direct support for drawing curves (that I am aware of).
It would be helpful to differentiate between the lines.
One way, as you've suggested, is to draw each line with shapes at some points. I haven't figured out an elegant way to do this. I can make it look like this by drawing a line with no shapes, then drawing that same line with only shapes sampled at a few points.
Another way is to use various kinds of dotted and dashed lines by modifying the stroke. This is fine, but I personally would love (a) more direct support for drawing curves and (b) a more elegant way of drawing a line + shape for curves.
Jelai
-
- Posts: 35
- Joined: Tue Mar 28, 2006 1:10 am
- Location: La Jolla
- Contact:
I think to do this you would simply subclass XYLineAndShapeRenderer and have your class call the inherited method for the points you want drawn. Looking over the class, I think it might be simpler to override drawItem() and simply setShapesVisible() or setSeriesShapesVisible() on a per-item basis. Something along those lines should work.