Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [matplotlib-3d]

For questions about 3d plotting with matplotlib. Also use the matplotlib tag.

matplotlib-3d
0 votes
1 answer
36 views

Matplotlib Can't remove all whitespaces when plotting an image at z=0 of a 3D scatter plot

I'm trying to plot Cartopy tiles as a surface for my 3D scatter at z=0. To achieve this, I've created a 2D figure for the map data using the extents of my coordinates. The 2D figure looks correct. It ...
Charbel Abdallah's user avatar
0 votes
2 answers
25 views

Setting 3D-plot scale to logarithmic in Matplotlib giving an almost empty 2D plot

I'm trying to set the scale of a plot to logarithmic, using the code below. When plotting without the log scale, it gives me a correct plot. for it, folder in enumerate(norm_folder_list): fig = ...
Entangled Being's user avatar
0 votes
0 answers
25 views

'update lines' function in 3d animation

I am trying to animate in 3D an arm represented by 2 segments (3 points A, B and C of which I have 3D coordinates in a numpy array (shape (n,3))). Only the arm at instant t (between 0 and n) should be ...
Paul Dst's user avatar
1 vote
0 answers
39 views

How to rotate colorbar to align with plot_surface in 3d plot

I would like to plot a colorbar next to an image plotted with plot_surface in a 3d plot, such that the colorbar also rotates with the plot_surface image when the 3d axes are rotated. So far, my code ...
Hugh Mungus's user avatar
1 vote
1 answer
30 views

regression plane's color isn't uniform?

I don't understand why the color of the regression plane is not the same. Here the code and output: import numpy as np import pandas as pandas import statsmodels.api as sm import matplotlib.pyplot as ...
Basir Touati's user avatar
0 votes
0 answers
35 views

convert 3D top view into 2D plot

After getting the 2D plot by using ax.view_init function like the following question: Rotate 3d plot to look like 2d plot (no perspective) How can I change and resize the photo with the same behavior ...
fpga's user avatar
  • 19
0 votes
1 answer
30 views

Why are my subplots not positioned properly after animating them?

I'm answering module on image processing and I wanted to show how the values of a given 2D image change based on the intensity of the values of each pixel. The only thing is that I can't seem to ...
Ken Azurin's user avatar
0 votes
0 answers
30 views

plot_surface produces no accurate 3d plot

I am following the 3D surface (colormap) from Matplotlib tutorial in order to plot $f(x,y)=(y-x)^2+x^{5}$. import matplotlib.pyplot as plt from matplotlib import cm from matplotlib.ticker import ...
Oromion's user avatar
  • 119
0 votes
0 answers
46 views

Plotting a Surface with Multiple Matrices and Custom Colormap Incorporation in Python

I'm trying to plot a surface using Python, and I have four matrices representing the data: img, X, Y, and Z. Here's some contextual information to better understand the problem: X and Y are dimensions ...
Caio Henrique Pinheiro's user avatar
0 votes
0 answers
41 views

Transform 3D coordinates to 2D coordinates based on 2D camera angle view (matplotlib camera angle)

I have a 3D plot of points and lines connecting the points in matplotlib. I'm using the ax.view_init(elev, azim, roll) function to rotate the camera. The resulting camera angles I will be using always ...
Ashtav 's user avatar
0 votes
0 answers
22 views

Contour plot projection not showing properly in matplotlib 3d plotting

I was trying to plot the contour plot of the walker's position of a random walker moving in a 3d space on the xy, xz, and yz plane. I am getting a proper contour plot while plotting it in the xy plane ...
Puspendu Rana's user avatar
0 votes
1 answer
30 views

3D scatter of points with colors as a 4th var

I'm trying to scatter a dataset in 3D and for each point using a scalar variable as a color, to visualize better some phenomena. In order to keep things simple, suppose i want that each point plotted ...
user23885488's user avatar
0 votes
1 answer
76 views

Draw an image and a stem plot in 3d with matpltolib

I'm trying to make a 3d plot with python that shows an image at a certain level and certain specific points as a stem plot (basically the image is a sort of 2d map and the stem plots represent the ...
mmonti's user avatar
  • 186
1 vote
1 answer
96 views

Matplotlib 3d zoom issue

Here to ask a question about the basic matplotlib 3d plotting tools. Now, let me make some dummy data to explain my issue: import numpy as np import matplotlib.pyplot as plt x = np.linspace(-1, 1, ...
mmonti's user avatar
  • 186
0 votes
0 answers
38 views

Python matplotlib 3D surface | How to resize viewport?

I want to resize viewport to same width with fig size or change viewport shape from a square to a rectangle. [python code] fig = plt.figure(figsize=(10,4)) fig.patch.set_facecolor('#151C2C') ax = fig....
Seoyeon's user avatar

15 30 50 per page
1
2 3 4 5
26