17 Plotting 2D functions

To plot 2D functions and histograms, you should use class. Here is the typical example which plots two functions on the same plot:

>>> from jhplot  import HPlot3D
>>> from jhplot  import F2D
>>> c1 = HPlot3D("Canvas",600,400)
>>> c1.visible(1)
>>> c1.setNameX("X axis")
>>> c1.setNameY("Y axis")
>>> f1 = F2D("2*exp(-x*y/20)+10*sin(pi*x)/y", -2.0, 5.0, -2.0, 5.0)
>>> f2 = F2D("4*x*y", -2.0, 5.0, -2.0, 5.0)
>>> c1.draw(f1,f2)

Here, is the main class to build a 2D function.