Questions tagged [mplot3d]

a 3D plotting toolkit which ships with the matplotlib Python plotting library.

The mplot3d toolkit adds simple 3D plotting capabilities to the plotting library.

Resources

391 questions
0
votes
1 answer

How to plot 3d triangles in matplotlib with triangles vertices's coordinates (9 numbers for each triangle)?

I have many triangles (say N=10^6) with (x,y,z) coordinates of each vertex of the triangles stored in a file. So each triangle has 9 numbers stored as a row in the file. Hence the file has N rows. Now I just want to plot (in 3d) all the triangles…
deltasata
  • 377
  • 1
  • 4
  • 21
0
votes
0 answers

3d scatter plot with mplot3d with missing frequency as z axis

I am trying to plot some data but I only have my x and y axis given. I would like to get the frequency for my z axis like I would in a histogram. But I don't really want a histogram, rather a scatter plot or a surface plot. This is my histogram…
Jen Mer
  • 101
  • 1
  • 3
  • 10
0
votes
0 answers

Can't use mplot3d, getting error: AttributeError: 'module' object has no attribute '_string_to_bool'

I'm trying to use mplot3d to plot something 3D. I have Mac OSX. However I get this error: ax = fig.gca(projection = '3d') File "/usr/local/lib/python2.7/site-packages/matplotlib/figure.py", line 1368, in gca return self.add_subplot(1, 1, 1,…
J. P.
  • 289
  • 4
  • 14
0
votes
1 answer

Error when installing mplot3d in python for 3d plotting

I'm trying to build a 3d surface plot in python. From what I've read, this is the standard package: from mpl_toolkits.mplot3d import Axes3D However, I receive the following Error: ImportError: No module named mpl_toolkits.mplot3d This is the error…
sully_r
  • 131
  • 1
  • 4
  • 14
0
votes
0 answers

3D plotting of spheres

I am wanting to plot all my spheres on the same graph, which should be 1 by 1 by 1. I am calling the plotting function shown below in several loops, as I want the spheres to change colours depending on some conditions. The coordinates of the centre…
Hello
  • 97
  • 1
  • 5
0
votes
1 answer

Plotting several spheres on the same graph

I am writing code to plot spheres. I am generating random points using a separate function and I would like to add these as spheres to the same graph. For the moment, separate graphs are created for each sphere. The code is shown below. Disk here is…
Hello
  • 97
  • 1
  • 5
0
votes
1 answer

What is the most descriptive way to plot Lorenz System?

I am (numerically) solving the Lorenz System by using different methods. I am plotting it using matplotlib but I would like a way to distinguish better the points. For example: Let's assume the points to be plotted are stored in the array a which…
D1X
  • 5,025
  • 5
  • 21
  • 36
0
votes
2 answers

MPlot3D Image Manipulation in IPython

I am developing a Python program that involves displaying X-Y-Z Trajectories in 3D space. I'm using the Spyder IDE that naturally comes with Anaconda, and I've been running my scripts in IPython Consoles. So I've been able to generate the 3D plot…
S. Gamgee
  • 501
  • 5
  • 16
0
votes
1 answer

How to create a colored sphere

I have a data set which maps a tuple of phi and theta to a value which represents the strength of the signal. I want to plot these on a sphere. I simply followed a demo from matplotlib and adjusted the code to my use case. from mpl_toolkits.mplot3d…
SourBitter
  • 157
  • 2
  • 11
0
votes
1 answer

Using mplot3D to plot DataFrame

I have a dataframe like this: f1 model cost_threshold sigmoid_slope 366 0.140625 open 0.0001 0.0001 445 0.356055 open 0.0001 0.0010 265 0.204674 open 0.0001 0.0100 562 0.230088 …
Dhruv Ghulati
  • 2,976
  • 3
  • 35
  • 51
0
votes
1 answer

Matplotlib color surface ellipsoid distance from centre

I am trying to plot an error ellipsoid in 3D. This is ofcourse not that hard, but I found troubles with the collors. The colormap that I used use the Z values for the color. I would like that the describes the relationship of the distance between a…
3dSpatialUser
  • 2,034
  • 1
  • 9
  • 18
0
votes
1 answer

Graph a cloud of points with plot_trisurf

I'm new to python and have the following problem, I hope you can help me. My program plots 3D cloud of points using plot_trisurf, and I get the next figure: But I would like it to be of the same color red (no opacity). My data is: (triangles =…
Jun
  • 5
  • 2
0
votes
1 answer

Plotting surface defined with boolean expressions?

I was trying to plot a function which was defined something as follows: def f(x,y); if x==y: return x else: return x-y Now there's nothing wrong with that syntactically, except that I can't plot it: from numpy import…
Alasdair
  • 1,300
  • 4
  • 16
  • 28
0
votes
1 answer

ploting 3D surface using array

Z=np.array([[10.,12.,12.,5.], [10.,0.,0.,5.], [10.,0.,0.,5.], [10.,20.,20.,20.]]) X = np.arange(0, 4, 1) Y = np.arange(0, 4, 1) I have a 2D 4x4 array with. I want to make a 3D plot with x and y axes having discrete integer…
0
votes
1 answer

Python-xy 3d plot from text file

I have a text file containing 500x500 intensity values. I'm attempting to produce a 3D plot of this data using Python-XY. Only a particular part of this 500x500 array is meant to be plotted (235:268, 210:280). Here is one of many attempts of the…
Azaxa
  • 49
  • 7