A discussion forum for JFreeChart (a 2D chart library for the Java platform).
-
mjs483
- Posts: 9
- Joined: Thu May 24, 2007 7:02 pm
Post
by mjs483 » Thu Aug 23, 2007 1:52 pm
I'm working with an XYPlot using an XYZDataSet and XYBlockRenderer to generate a surface plot (or contour chart, or intensity chart, we all seem to call them something different here).
My XYZDataSet has one series that consists of about 118000 data points.
The problem is that it takes about 10-15 seconds to actually draw the chart after I add the dataset to the plot. I'd like to speed this up to at least 1 second plot time. Does this sound possible or is my dataset simply too large? Or does it sound like I've made a coding error for this to take so long?
I know others have asked about making their surface/intensity charts faster. Has anyone had success? Any forum posts I've missed?
Advice on how to proceed is greatly appreciated

-
mjs483
- Posts: 9
- Joined: Thu May 24, 2007 7:02 pm
Post
by mjs483 » Fri Aug 24, 2007 3:38 pm
Update:
After some research my new plan is to attempt to create my own renderer. The renderer will create a buffered image from Java's WritableRaster class and paint the image on the chart. Java seems to be able to do this very quickly even for large data sets.
I understand that this breaks JFreeChart's item by item drawing convention.
My big question is, if I do something like this will I still have a way to use the zooming and crosshair functionality that is built into JFreeChart. (The zooming and crosshairs are what I really want.)
-
jsnel
- Posts: 19
- Joined: Thu Apr 19, 2007 12:00 pm
Post
by jsnel » Wed Nov 05, 2008 12:05 pm
Did you ever write that renderer or did you find an alternative solution? I'm currently looking into plotting a 512*512=262144 points XYPlot using XYBlockRenderer and in the near future even 1024x1024=1M points. The draw times are already several seconds on a fast CPU whereas I would like it to be <1s. I too would like to retain the zooming and crosshair functionality so I'm really interested to see if you (or someone else for that matter) came up with a solution.