Plotting discrete values

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
nubiste
Posts: 13
Joined: Mon Aug 04, 2008 9:53 am

Plotting discrete values

Post by nubiste » Mon Aug 04, 2008 10:16 am

Hi,

Just started using JFreeChart so this might be a trivial question(I hope:).

I have values of the type 0,1,0,1,0,2 etc.

So I want each point in the graph to be represented by a constant value until it reaches the next data point. So it should look something like this:

Code: Select all

                    
 3 |             
 2 |     ____     
 1 |____|    |____| 
    ------------------------
   ------- time---->

hope this makes sense

thanks
ste

skunk
Posts: 1087
Joined: Thu Jun 02, 2005 10:14 pm
Location: Brisbane, Australia

Post by skunk » Mon Aug 04, 2008 1:59 pm

Code: Select all

org.jfree.chart.renderer.xy.XYStepRenderer

Locked