from org.jfree.data.xy import XYSeries, XYSeriesCollection
from org.jfree.chart import ChartFactory, ChartFrame
from org.jfree.chart.plot import PlotOrientation
import math

series = XYSeries("Sine curve")
for i in range(100):
     x = 0.1*i
     y = math.sin(x)
     series.add(x, y)

dataset = XYSeriesCollection(series)
chart = ChartFactory.createXYLineChart("Title", "time", "sine",
                                        dataset,
                                        PlotOrientation.VERTICAL,
                                        True, True, False)

frame = ChartFrame("Window title", chart)
frame.setVisible(True)
frame.setSize(400, 600)

