390 questions
2 votes
0 answers
84 views
How to bring 3D surfaces (triangular cuts, arrows, and text) to the front in a Matplotlib 3D plot?
I’m trying to reproduce the classic HSV color cone matplotlib in Python. The idea is to draw a 3D cone in HSV space, with two triangular internal faces removed so we can see the inside of the cone. ...
1 vote
0 answers
100 views
How to view the scene from a given pose (4x4 transformation matrix) in Matplotlib
I'm trying to place the camera at a particular pose (given as a 4x4 transformation matrix) with the camera looking along the +ve z-axis in a Matplotlib 3D plot. There are a few reference poses and a ...
5 votes
1 answer
114 views
FancyArrowPatch in 3D with curve (connectionstyle)
I'm trying to draw a curved FancyArrowPatch to annotate an angle in a 3D plot. How do I get the arrow to curve, stay in the plane of the two lines, and span the whole angle? Based on https://...
0 votes
1 answer
97 views
How can I clip a 3D surface plot in matplotlib with a horizontal plane?
I am trying to create a 3D surface plot similar to the one shown below. view of 3D surface plot with defined z-bounds and added contour lines I have been able to have some luck with the basic pyplot ...
0 votes
1 answer
90 views
In matplotlib 3D line plots, how to ensure lines that are behind actually appear behind those drawn later?
I am plotting families of orbits in python using matplotlib and the add_subplots() routine: fig=plt.figure() ax=fig.add_subplots(projection='3d') I then loop through my list of [X,Y,Z] series and ...
1 vote
1 answer
54 views
How do I color 3d triangular mesh using another scalar in matplotlib?
I have 3d vertex position data (x,y,z), scalar values at each vertex v, and vertex indices for each triangle tri. If I were to draw the surface geometry itself, I could use plot_trisurf. If I were to ...
0 votes
0 answers
45 views
How to prevent 3D Matplotlib axis extension past set_[x/y/z]lim()? [duplicate]
I have an issue where the 3D axis limits set in Matplotlib are not respected in the plot, as shown by the minimal working example below. It can be seen that the extent of the plot goes beyond zero, ...
0 votes
0 answers
55 views
How do I clearly combine a 3D scatter plot and a surface plot together?
I think my problem is fairly simple. I've managed to find a way to plot my 3D surface against a set of discrete data points, but the issue now is that it is not clear to see whether the points lie ...
1 vote
0 answers
69 views
Python - XYZ plot coloring cluster region
Current this is my code for XY axis: import numpy as np import matplotlib.pyplot as plt def plot_with_tricontourf_customized(dfs, figures_organizer, figsize_setting, list_points_mean, ...
0 votes
1 answer
75 views
How to display minor ticks without gridlines on the z axis?
I want to display the minor z ticks on an Axes3D plot without minor gridlines. The starting figure looks like this: The code is here: import numpy as np import matplotlib from matplotlib.figure ...
2 votes
2 answers
94 views
How to turn off gridlines from 3d axes?
How do I turn off the major x axis grid from this axes? This code below works on 2d plots to hide the major x gridlines. On 3d plots it doesn't seem to do anything. I prefer to use general axes ...
0 votes
0 answers
28 views
How can I recreate these 3D vector plots of a rotating vector using matplotlib?
I want to recreate figures like this by using Matplotlib, how would I do so? The second figure is hard to create using drawn lines; I'd like a helical spiral from the tip of the vector along z', so ...
0 votes
0 answers
53 views
3d Bar Plot in Matplotlib: "floating" bars and other issues
I have latitude and longitude coordinates in UTM with some data associated with them in a .csv file. I want to make a 3d bar graph with the height's representing an area's associated data value. I ...
0 votes
0 answers
25 views
3D surface in matplotlib.pyplot does not correspond to data
I am trying to plot a simple 3D surface (just for testing). It appears to me that the surface does not correspond with the data matrix (defined as the sum of two input vectors using the Numpy add....
0 votes
1 answer
57 views
Extend a 3d plot to the edge of a figure with matplotlib
The following code results in a figure saved with large white spaces around it, while there is enough space to stretch the axes. import matplotlib.pyplot as plt import numpy as np X = np.arange(-5, 5,...