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
5
votes
1 answer

Plotting a series of 2D plots projected in 3D in a perspectival way

I'd like to plot a likelihood distribution, basically an NxT matrix, where each row represents a distribution on some variable in each timestep t (t=0...T), so I could visualize the trajectory which a Maximum Likelihood Estimation would yield. I…
ben0it8
  • 505
  • 1
  • 6
  • 10
5
votes
0 answers

How to plot spherical polygons in Python using matplotlib?

I have a numpy array vertices of shape (N,3) containing the N vertices of a spherical polygon in 3D, i.e. all these points lie on the surface of a sphere. The center and radius of the sphere is known (take the unit sphere for example). I would like…
Meneldur
  • 215
  • 1
  • 5
5
votes
2 answers

Artifacts in a filled contour plot on 3D axes

I have a frustrating problem that only manifests itself when plotting filled contour plots on 3D axes and only in certain situations. Here is an example of the issue I am experiencing: and These are the same data at different contouring…
casey
  • 6,855
  • 1
  • 24
  • 37
5
votes
1 answer

mayavi 3d object in matplotlib Axes3D

I sometimes find myself frustrated with the lack of certain rendering features in matplotlib's mplot3d. In most of these cases, I do find that I can get what I want in mayavi, but still the matplotlib 3d axes are preferable, if only for aesthetics,…
tsj
  • 758
  • 3
  • 23
5
votes
1 answer

Matplotlib 3D pan and zoom not working

When i try to use the pan and zoom tool, the plot rotates on left click and zooms from the center on right click. zooming the plot by making a rectangular selection is not working. Has somebody a clue how this problem can be solved?
boon
  • 345
  • 1
  • 4
  • 11
5
votes
2 answers

How to visualize 3D delaunay triangulation

I have a set of 3D points which I've used scipy.spatial.Delaunay to do the triangulation / tetrahedralization. I now have a set of unique faces of all of the tetrahedra, and would like to visualize these in 3D. Are there any Python libraries (or…
bard
  • 2,762
  • 9
  • 35
  • 49
4
votes
2 answers

Matplotlib 3D plot - 2D format for input data?

I am plotting a function of two parameters with matplotlib. I copied an example in matplotlib tutorial and transformed with my own input data: vectors X and Y (equally spaces numbers in -3:3) and Z=peaks(X,Y) with peaks a function that I defined…
kiriloff
  • 25,609
  • 37
  • 148
  • 229
4
votes
1 answer

How to change the 3d axis settings

I have managed to create this graph using matplotlib. I would like to remove the 0.2, 0.4, 0.6.. from the axis named B and change the axis interval from 200 to 100 in the axis named A. I have been trying to do this for quite sometime now...Any…
user926321
  • 400
  • 4
  • 13
4
votes
2 answers

Remove border from matplotlib 3D pane

I would like to remove the borders from my 3D scene as described below. Any idea how to do that? Here the code to generate the current scene: import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D # Create…
Alexis.Rolland
  • 5,724
  • 6
  • 50
  • 77
4
votes
1 answer

Changing the colorbar limits in a mpl_toolkits.mplot3d plot

I am trying to change the clim in a mpl_toolkits.mplot3d plot using this method: fig = plt.figure(figsize=(10,10)) ax = fig.add_subplot(111, projection='3d') p = ax.scatter(x_, y_, z_, c='gray', s=0.25, alpha='0.5') cbar =…
Merk
  • 171
  • 12
4
votes
1 answer

Plot a 1D gaussian distribution on a plane in 3D plot python

I have the following code and along plots it generates. My aim is to plot on the second figure (right) a 1D Gaussian Distribution on the red plane shown. The aim of this is to show that the overlap (which represents the conditional) is a Gaussian…
prax1telis
  • 297
  • 2
  • 12
4
votes
0 answers

Matplotlib Plot3D Surface/Line/Scatter plot how to define z-order

Preface: I am aware that matplotlib cannot deal with 3D occlusion and that for that type of issue I should use Mayavi. This is a different situation. What I'm trying to achieve is to plot a line on top of a surface. The line is only on "this" side…
Miguel
  • 1,293
  • 1
  • 13
  • 30
4
votes
1 answer

How to plot a 3D histogram

I have three arrays and I am trying to make a 3D histogram. x = [1, 2, 3, 2, 5, 2, 6, 8, 6, 7] y = [10, 10, 20, 50, 20, 20, 30, 10, 40, 50, 60] z = [105, 25, 26, 74, 39, 85, 74, 153, 52, 98] Here's my attempt so far: from mpl_toolkits.mplot3d…
Matt-pow
  • 946
  • 4
  • 18
  • 31
4
votes
1 answer

How to represent density information on a matplotlib 3-D scatter plot

I am trying to plot the r,g,b channels in an image as a 3-D scatter plot. This works well when i have a black and white image as i get a scatter plot with just two distinct clusters at two ends of the scatter plot. However for color images the…
4
votes
2 answers

Change 3D background to black in matplotlib

I'm having trouble changing the background of my 3d graph to black. This is my current code. When I do set facecolor to black, it changes the inside of the graph to be grey, which is not what I want. fig =…
Ryan Tom
  • 195
  • 3
  • 14