[pxdislin/DISLIN] Making the axis invisible
Louis Luangkesorn
lluang at northwestern.edu
Mon Jan 14 12:28:24 EST 2002
[This did not seem to go out a couple of days ago so I'm resending it.]
Potentially a wild goose chase, but DISLIN does not seem to have a
mailing list.
Is there a way to hide the axis in a DISLIN generated figure? For
example, on O'Reilly's OnLAMP site
http://www.onlamp.com/pub/a/python/2000/07/05/numerically.html
The code below draws a line drawing of a house. What I want to do is
draw the house, but without the x and y axis that is drawn. I've
thought that if I removed the
plot.add_axis(axis)
line that may do it, but I find that pxDislin requires this. I'vle also
tried setting
axis(color = 'BACK')
but that did not seem to do the trick either. Any ideas? I can work
with either DISLIN (from Python, of course) or pxdislin.
Thanks.
Louis
--------
from pxDislin import *
from Numeric import *
plot = dPlot()
axis = dAxis(-20,20,-20,20, color = 'BACK')
axis(color = 'BACK')
plot.add_axis(axis)
house_pts = array([[5,5,-5,-5,5,4,4,2,2,5,5,0,-5],
[-5,5,5,-5,-5,-5,-1,-1,-5,-5,5,8,5]])
house = dMultiLine(house_pts[0],house_pts[1])
plot.add_object(house)
box_pts = array([[-10,-10,-5,-5,-10],
[-10, -5, -5,-10,-10]])
box = dMultiLine(box_pts[0], box_pts[1])
line = dVector(-5, -5,5,-10, color = 'blue')
plot.add_object(line)
plot.add_object(box)
plot.show()
--
K Louis Luangkesorn
lluang at northwestern.edu http://pubweb.nwu.edu/~kll560 PGP:0xF3E2D362
Whatsoever things are true, ... honest, ... just, ... pure, ... lovely,
... of good report; if there be any virtue, and if there be any praise,
think on these things. - motto - Northwestern University
More information about the Python-list
mailing list