JFreeChart shows a function
Source code name: "chart_jfreechart_func.py"
Programming language: Python
Topic: Plots/2D
DMelt Version 1.4. Last modified: 03/15/1970. License: Pro
https://datamelt.org/code/cache/chart_jfreechart_func_3564.py
To run this script using the DMelt IDE, copy the above URL link to the menu [File]→[Read script from URL] of the DMelt IDE.


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)



You see the box below because you did not login.