HPlotXY canvas for analytic functions
Code: "canvas2D_hplotxy_func.py". Programming language: Python DMelt Version 1. Last modified: 05/09/2015. License: Pro
https://datamelt.org/code/cache/canvas2D_hplotxy_func_2582.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 java.awt import Color,Font
from java.util import Random
from jhplot import * 

c1 =HPlotXY("Functions",600,400)
c1.visible()
c1.setGTitle("Functions")
c1.setNameX("X")
c1.setNameY("Values")

p1=F1D('x*x', -10,10)
p1.setLineStyle(1)

p2=F1D('x*x*cos(x)', -10,10)
p2.setLineStyle(2)
p2.setColor(Color.red)

c1.setRangeY(0,3)
c1.setRangeX(-1.2,1.2)

c1.draw(p1)
c1.draw(p2)

# c1.export("test.svg");

You see the box below because you did not login.