[Matplotlib-users] 3d axis orientation

2007-02-24 Thread Ryan Krauss
I am using axes3d to draw wireframes with code like this:

from numpy import *
import pylab as p
import matplotlib.axes3d as p3

fig1 = figure(1)
ax1 = p3.Axes3D(fig1)
ax1.plot_wireframe(x,y,z)


When this gets done drawing, I can click and drag with my mouse to
rotate the figure.  I would like to set the orientation from a script.
 Is there a method of either fig1 or ax1 to do this?

Thanks,

Ryan

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] problem with raw_input and event handlers

2007-02-24 Thread Matthew Auger
Hi all...I am connecting an event handler that collects user input via 
raw_input. When using GTKAgg as my backend, this works but requires the 
user to first hit 'enter' before the raw_input prompt is displayed--this 
extra step of hitting enter is quite cumbersome! When I use the TKAgg 
backend, I get this error message:
Exception in Tkinter callback
Traceback (most recent call last):
   File /local/lib/python2.5/lib-tk/Tkinter.py, line 1403, in __call__
 return self.func(*args)
   File 
/local/lib/python2.5/site-packages/matplotlib/backends/backend_tkagg.py, 
line 208, in button_press_event
 FigureCanvasBase.button_press_event(self, x, y, num, guiEvent=event)
   File /local/lib/python2.5/site-packages/matplotlib/backend_bases.py, 
line 911, in button_press_event
 func(mouseevent)
   File tktest.py, line 15, in printpoint
 color = str(raw_input(Enter color: ))
RuntimeError: can't re-enter readline

I am using Tcl/Tk 8.4.14, python2.5, and matplotlib0.90. The test code I'm 
using follows.

Thanks for any help!
Matt

-
import pylab,scipy

def printpoint(event):
  color = str(raw_input(Enter color: ))
  text = %d , %d % (event.xdata,event.ydata)
  pylab.text(event.xdata,event.ydata,text,color=color)

data = scipy.arange(100.)
pylab.plot(data)
pylab.connect('button_press_event',printpoint)

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users