问题
As Every one knows JFreeChart
supports 2-D (X,Y) charts, but I have a program that needs 3-D (X,Y,Z), 4-D (X,Y,Z,E) … up to six dimensions. For example,
my input data looks like this for 2D (X,Y):
(0.611787,2.304051) (1.636265 ,2.261579) (1.073176 ,1.188980)
If I have 3D (X,Y,Z), it looks like this:
(0.142197 ,1.440918 ,0.217366) (0.149352 ,0.748124 ,3.214357) (0.536232 ,0.107004 ,4.198831)
If I have four columns, it means 4-D, and may increase to 6-D. I need some help and suggestions if JFreeChart
supports 3-D. If not, is there any other software similar to JfreeChart
that can be integrated with Java code.
回答1:
JFreeChart includes the XYZDataset
interface, and implementing classes are suitable for three dimensional data. It's up to your program to determine how best to display the third dimension. For example, XYBlockRenderer
uses a PaintScale
, while other schemes use XYZToolTipGenerator
or XYZURLGenerator
. AFAIK, higher dimensions are not supported.
回答2:
I did, eventually, end up writing JFreeChart3D...but it is not free, so I called it Orson Charts. It has quite a similar style to JFreeChart (plots, datasets, renderers) and even does all the rendering via Graphics2D (so you can still export to JPG, PNG, SVG, PDF and other formats with existing converters).

来源:https://stackoverflow.com/questions/6716967/does-jfreechart-have-support-for-three-dimensional-charts