How to plot waterfall chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
madhaw4

How to plot waterfall chart

Post by madhaw4 » Mon Jun 09, 2003 8:10 am

Hi,

I wanted to generate waterfall chart using jfree chart. Can any one help me?

Thanks

Madhaw

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Mon Jun 09, 2003 9:00 am

I'm not sure what a waterfall chart is...can you post an example?
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Sir Henry

Waterfall chart

Post by Sir Henry » Fri Feb 04, 2005 10:48 am

It seems that there are differing definitions of what a waterfall display is.

In my context of frequency spectrum analysis, I would like to display a 3-dimensional dataset like it is done in the Bubble Chart Demo. I have time on the x-axis, frequency on the y-axis, and amplitude on the z-axis. Spectrum analysers normally visualise the z-axis with varying color intensities. Such a chart is in my context referred to as a waterfall display.

Has anybody got any experience with such types of charts, and would it be feasible to use JFreeChart for it?

Thanks for any response.

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Fri Feb 04, 2005 11:02 am

Since the original post, we've implemented the following "waterfall" chart (not what you're looking for):

Image

The ContourPlot in JFreeChart sounds a little more like what you are describing - someone else wrote this code and I haven't done a lot of work with it, but perhaps you can try it out.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Sir Henry

Post by Sir Henry » Fri Feb 04, 2005 11:09 am

Yes, we better stick to your definition of a waterfall chart in this context and perhaps use the term "intensity chart" for what I am looking for.

I will definitely try out your suggestion. :)

Any further hints are welcome.

Sir Henry

Post by Sir Henry » Tue Feb 08, 2005 10:36 am

David, you were right, this contour chart is exactly what I was looking for:

Image

Like others did, I also noticed a rather poor performance. Is there still any development ongoing or would it be worth starting to look for improvements?

Cheers,
Sir Henry

Guest

Post by Guest » Tue Feb 08, 2005 1:30 pm

Addition:

In particular I would like to have the ability to add data series to the right and automatically remove series from the left.
Currently I have to recreate the full ContourDataset with each update.

Kagetto

waterfall time/frequency/amplitude contour

Post by Kagetto » Thu Nov 10, 2005 2:06 am

Does anyone know how Sir Henry was able to accomplish the waterfall contour chart image shown here?

I am having a hard time figuring it out. If I feed the ContourDataset a bunch of XYZ points, it messes up the graph horribly. For instance if I do something like:

Code: Select all

Vector x = new Vector();
Vector y = new Vector();
Vector z = new Vector();

for(int i = 0; i < 20; i++){
  y.add(new Double(i));
  for(int j = 0; j < 20; j++){
    x.add(new Double(j));
    z.add(new Double(j));
  }
}

CountourDataset data = new ContourDataset("Bleh", x.toArray(), y.toArray(), z.toArray());
The code will not draw horizontal lines for the different y values specified and has only one color for z that shows at the far right end of the graph. I need it to draw all of the horizontal lines (which is why I have many x,z points for the same y) and interpolate the colors (the z values) between the x values I give it....

Any help would be awesome.

~Kagetto

Kagetto

Post by Kagetto » Thu Nov 10, 2005 4:20 pm

I switched the x and y arrays and now it works. In other words, I moved time to the x axis as shown in the contour chart image. =)

mhilpert
Posts: 497
Joined: Wed Apr 02, 2003 1:57 pm
Location: Germany

Change category colors?

Post by mhilpert » Fri Nov 11, 2005 9:52 am

Is it possible to change the color of each category seperately?
Java 11, JFreeChart 1.0.15, JFreeSVG 4.0

Kagetto

Post by Kagetto » Fri Nov 11, 2005 11:02 pm

I may not full understand your question but you can change the colors of the Z axis using a ColorPalette:

Code: Select all

        zColorBar = new ColorBar(zAxisLabel);
        zColorBar.setColorPalette(new color palette);
...
        ContourPlot plot = new ContourPlot(dataset, xAxis, yAxis, zColorBar);
~Kagetto

mhilpert
Posts: 497
Joined: Wed Apr 02, 2003 1:57 pm
Location: Germany

Post by mhilpert » Mon Nov 14, 2005 4:37 pm

Hello? My question was tied to this thread => Waterfall chart. I ask, if it's possible to change the colors of each bar of the waterfall chart?
Java 11, JFreeChart 1.0.15, JFreeSVG 4.0

m.ibbrahim
Posts: 3
Joined: Mon Aug 14, 2006 1:35 pm

Post by m.ibbrahim » Fri Oct 27, 2006 12:34 pm

hey,
even i m searching for that.. pls send me the link of the example demonstating how to change the colors of each bar of the waterfall chart..

Locked