Show data and functions using WPlot canvas
Code: "canvas2D_wplot.py". Programming language: Python
DMelt Version 1. Last modified: 12/08/2015. License: Pro
https://datamelt.org/code/cache/canvas2D_wplot_3201.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 jhplot import *
from java.awt import Color
p1=P1D("data set")
p1.add(1,2,0.5)
p1.add(2,6,2)
p1.add(4,7,2)
p1.add(8,9,3)
p1.add(10,23,5)
p1.setColor(Color.red)
p2=P1D("data2")
p2.add(13,2)
p2.add(8,3)
p2.add(3,10)
p2.setColor(Color.blue)
p3=P1D("data3")
p3.add(2,4)
p3.add(4,6)
p3.setColor(Color.cyan)
f1=F1D("4+x*sqrt(x)",0,10)
c1 = WPlot()
c1.visible()
c1.draw(p2)
c1.draw(p2,"Line")
c1.draw(p3,"Bar")
c1.draw(p1)
c1.draw(f1)
# c1.export("aa.pdf")
You see the box below because you did not login.