Typically, you can build a canvas like this:
from jhplot import HPlot c1 = HPlot("Canvas",600,400,2,1) # canvas size 600x400, 2 plot regions c1.visible(49,50) # show it on the screen at position 40,50 c1.setAutoRange() # autorange for X c1.draw(object1) # draw object1 (H1D,F1D,P1D etc) c1.draw(object2) # draw a new object c1.export("figure.pdf") # export to PDF file
This code create a canvas with the size 600×400 (in pixels), it has 2 pads to show data. The method visible(100,200) make the canvas visible and sets its location on the screen at position 100 (in X from left conner) and 200 (from top) in pixels. If you want a default position, jut call “visible()”. Then you can draw any mathematical object or data. Then you can export the image to vector format. Now you are ready to plot functions, histograms and datasets. See the detail in HPlot
Let's run this code and make an empty canvas with 2 plot regions:
Let us draw a function on this canvas using the default attributes for the canvas:
Read SCaVis documentation for detailed description.
— Sergei Chekanov 2010/03/07 16:37