You are a guest. Restricted access. Read more

2D arrays

2D arrays are based on the Java class P1D. This class can be used to show data in X-Y plane As before, one can fill such arrays using the method “add(x,y)”.

Here is a simple example how to show several data sets on on X-Y graph:

from jhplot  import  P1D, HPlot
from java.awt import Color

p1=P1D("1st data set")
p1.add(1,2); p1.add(2,3); p1.add(4,5)

p2=P1D("2nd data set")
p2.add(-1,3); p2.add(5,-2); p2.add(1,0)

c1 = HPlot("Canvas")
c1.draw(p1); c1.draw(p2)

You have a limited access to this reference manual. One can unlock it after becoming a full member.

scavis/collections/2d_arrays.txt · Last modified: 2013/04/14 16:52 (external edit)
Back to top
CC Attribution-Share Alike 3.0 Unported = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0