0

I have this structure:

HashMap<Double, Integer>>  times

Where the Kay is a time (dobule) and the value is the number of occurence of this time. For example i have: time: 1.65 occurence: 10;

I need to plot a line chart with the time on X axis and the occurence on Y axis.

What i can use of very simple?

Neptune
  • 607
  • 2
  • 8
  • 19
  • possible duplicate of [drawing a simple line graph in Java](http://stackoverflow.com/questions/8693342/drawing-a-simple-line-graph-in-java) – rpax Jun 07 '14 at 12:03

1 Answers1

0

JFreeChart will handle this easily with a time series chart. You can either copy your data into the default time series dataset implementation (TimeSeries and TimeSeriesCollection classes), or you can wrap your own data structure within a class that implements the XYDataset interface (that way you don't need to duplicate your data).

David Gilbert
  • 4,427
  • 14
  • 22