| 1 | initial version |
The commands point2d and line will draw points and lines for you. Here is an example:
nodes = [(1,1),(-1,1),(2,0)]
points = point2d(nodes,color='black',size=50)
lines = line((nodes[0],nodes[1]),hue=.2) + line((nodes[0],nodes[2]),hue=.4)
(points + lines).show(axes=False)
You could write a loop over the elements of the matrix 'Z' which adds the relevant line if the intensity is not zero, and uses the intensity value for the hue.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.