I have been using Sage to run code on my server interactively from my laptop. I enjoy being able to run code on my GPU from anywhere. I often find the most time consuming part of the processes is plotting--particularly three dimensional plotting and animations. It seems that Mayavi is a particularly sophisticated plotting package that would be perfect for me. The only problem is that it is nearly impossible to get Sage to play nicely with it. After a few days of tinkering, I have drawn a few conclusions:
* All the current VTK spkgs do not work with the current version of sage (and hacking them into submission is futile). * Installing wxPython on Sage is pretty much impossible, but PyQT is pretty easy. * All the current Mayavi spkgs do not work with the current version of Sage (again, hacking them has proven fruitless). I found some ways around these obstacles. First, I installed Mayavi on my system. Then I linked the python vtk modules to an identical folder in the corresponding location within Sage. Then I installed PyQT with this spkg: http://code.google.com/p/computational-sage/downloads/detail?name=PyQt-x11-gpl-4.8.4.spkg Then I installed Mayavi from Enthought's ets.py (from within the Sage shell of course). See the section on installing Mayavi from git for more information: http://docs.enthought.com/mayavi/mayavi/installation.html I can now run examples with Mayavi from my Sage notebook--sort of. If I try mlab.show(), the images get plotted on my desktop, not below the corresponding cell on my browser. However, if I call mlab.savefig('test.jpg'), I will see an image in the same way I would with matplotlib. Now I want to finish the job by any means I can. First, I need to know why the problem I am experiencing does not happen with Sage's built in viewers--like Jmol. Why does Jmol not plot images on my desktop? How does Sage redirect that interface to appear below the appropriate cell on the notebook server? I tried a simple script that embeds Mayavi in a custom Qt widget, but that again appeared on my desktop, not in my browser (see http://docs.enthought.com/mayavi/mayavi/auto/example_qt_embedding.html). My plan is to learn how Sage redirects output to the notebook server, then figure out how to apply that process to a Qt widget that redirects Mayavi output in a similar fashion. Please let me know how (or how I can find out how) Sage manages interactive plots through the notebook. Any further help/guidance would be of course be greatly appreciated. Thanks, Alex Eftimiades -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/groups/opt_out.
