mayavi

Mayavi doesn't run from within Spyder: complains about “ValueError: API 'QString' …”

时光怂恿深爱的人放手 提交于 2019-11-30 12:59:46
I am unable to run/use Mayavi library from within Spyder IDE. I have described the problem below. Any help will be very useful. (Thank you very much in advance.) Steps to reproduce the problem: Just importing the Mayavi library in a script (for example using "import mayavi.mlab as mlab") and executing the script will reproduce this problem. I am including a test code (note that this code is an example code from the Mayavi website) here to reproduce the problem: code from numpy import sin, cos, mgrid import mayavi.mlab as mmlab def f(x,y): return sin(x + y) + sin(2*x - y) + cos(3*x + 4*y) x,y =

ValueError: cannot set toolkit to wx because it has already been set to qt4

落花浮王杯 提交于 2019-11-30 09:51:48
The following import from mayavi import mlab generates the value error . I installed Mayavi using setuptools ( as described here ). The gui works fine (some bugs here and there but still I can use the modules etc.) I am guessing some thing didn't went well with the install. Any suggestions how I can fix my installation(if that is what the problem is) ? Edit 1: I uninstalled mayavi and reinstalled it (using pip), but the valueError is still present. Edit 2: The system I have the installation on is a virtual Ubuntu 15.04 (using VMware 6.0.6). I have pasted the pip install mayavi output here .

Get mayavi working with Python 3

非 Y 不嫁゛ 提交于 2019-11-30 08:54:25
I'm having trouble running mayavi in python 3.3 When running my program with python3 (or python3.3) i get from mayavi import mlab as ml ImportError: No module named 'mayavi' To get numpy and matplotlib to work, i used: sudo apt-get install python3-"missing module" But the usual way to install mayavi is just sudo apt-get install mayavi2 And python3 doesn't find it.... Does anyone know a way to get mayavi to work with Python3? Is it not supported yet? I have tried both import mayavi.mlab as ml from mayavi import mlab as ml Both give me the same error Any clarification would be greatly

installing Mayavi with pip - no module named vtk

萝らか妹 提交于 2019-11-29 23:52:43
I want to use Mayavi. Situation I use a MacBook Air, with OSX 10.7.3. I use Python 2.7.2 I have virtualenv installed. But I have not used it for this installation. I've manually installed all it's dependencies, including VTK . For VTK , I followed its installation guide and installed the python wrapper. Now if I open a new terminal window and open python, I can import vtk without any error. Problem I try to install Mayavi with the following command: pip install mayavi But the following error occurs: Downloading/unpacking mayavi Running setup.py egg_info for package mayavi build_src building

Mayavi doesn't run from within Spyder: complains about “ValueError: API 'QString' …”

我们两清 提交于 2019-11-29 18:31:15
问题 I am unable to run/use Mayavi library from within Spyder IDE. I have described the problem below. Any help will be very useful. (Thank you very much in advance.) Steps to reproduce the problem: Just importing the Mayavi library in a script (for example using "import mayavi.mlab as mlab") and executing the script will reproduce this problem. I am including a test code (note that this code is an example code from the Mayavi website) here to reproduce the problem: code from numpy import sin, cos

Enthought Canopy Mayavi font size bug

独自空忆成欢 提交于 2019-11-29 14:49:19
The font size setting in Enthough Canopy Mayavi mlab appears to be broken. Neither the command: mlab.axes.label_text_property.font_size = 12 (e.g.) nor the direct menu font size command (advanced settings) works. I have logged a bug report with Enthought, but it looks like a more general Mayavi bug, see Does Mayavi "Font Size" text property work? As you say this is a bug that has to do with the translation between the mayavi layer and the vtk layer. But for now you could use this attribute: >> ax=mlab.axes() >> ax.axes.font_factor 1.5 >> ax.axes.font_factor=2 It only produces a small increase

installing Mayavi with pip - no module named vtk

梦想与她 提交于 2019-11-28 21:00:53
问题 I want to use Mayavi. Situation I use a MacBook Air, with OSX 10.7.3. I use Python 2.7.2 I have virtualenv installed. But I have not used it for this installation. I've manually installed all it's dependencies, including VTK . For VTK , I followed its installation guide and installed the python wrapper. Now if I open a new terminal window and open python, I can import vtk without any error. Problem I try to install Mayavi with the following command: pip install mayavi But the following error

How to plot a 3D density map in python with matplotlib

▼魔方 西西 提交于 2019-11-28 15:36:03
I have a large dataset of (x,y,z) protein positions and would like to plot areas of high occupancy as a heatmap. Ideally the output should look similiar to the volumetric visualisation below, but I'm not sure how to achieve this with matplotlib. My initial idea was to display my positions as a 3D scatter plot and color their density via a KDE. I coded this up as follows with test data: import numpy as np from scipy import stats import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D mu, sigma = 0, 0.1 x = np.random.normal(mu, sigma, 1000) y = np.random.normal(mu, sigma, 1000) z

Map an image onto a sphere and plot 3D trajectories

泪湿孤枕 提交于 2019-11-28 09:30:24
What I would like to do is to define a sphere in the center of my 3D coordinate system (with radius=1), wrap a cylindrical planet map onto the sphere's surface (i.e. perform texture mapping on the sphere) and plot 3D trajectories around the object (like satellite trajectories). Is there any way I can do this using matplotlib or mayavi? Plotting trajectories is easy using mayavi.mlab.plot3d once you have your planet, so I'm going to concentrate on texture mapping a planet to a sphere using mayavi. (In principle we can perform the task using matplotlib, but the performance and quality is much

creating standalone exe using pyinstaller with mayavi import

倖福魔咒の 提交于 2019-11-28 02:08:51
问题 I have a program that helps visualize some data in 3D by plotting a surface and a cloud of points to see how they relate to the surface. For the visualization I am using mayavi since it was easy to set up and does a better job than matplotlib in 3D. The program works great when I run it in my python environment and makes beautiful visualizations. However, I need to distribute this to a few people who don't have Python and would prefer not to have to install python and all the add-ins on each