python : 2D perspective projection of a 3D surface plot

Panchi

I am making a 3D surface plot using matplotlib (python). I want to visualize the shadow (2D perspective projection) of the 3D surface on xy xz and yz surface.

In matlab, SHADOWPLOT does the needed work. Does anyone know if Python has something similar that can be used for the same?

Developer

Example from {here}:

"""
.. versionadded:: 1.1.0
   This demo depends on new features added to contourf3d.
"""

from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
from matplotlib import cm

fig = plt.figure()
ax = fig.gca(projection='3d')
X, Y, Z = axes3d.get_test_data(0.05)
ax.plot_surface(X, Y, Z, rstride=8, cstride=8, alpha=0.3)
cset = ax.contourf(X, Y, Z, zdir='z', offset=-100, cmap=cm.coolwarm)
cset = ax.contourf(X, Y, Z, zdir='x', offset=-40, cmap=cm.coolwarm)
cset = ax.contourf(X, Y, Z, zdir='y', offset=40, cmap=cm.coolwarm)

ax.set_xlabel('X')
ax.set_xlim(-40, 40)
ax.set_ylabel('Y')
ax.set_ylim(-40, 40)
ax.set_zlabel('Z')
ax.set_zlim(-100, 100)

plt.show()

and result:

enter image description here

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

python : 2D perspective projection of a 3D surface plot

From Dev

matplotlib : project 3d surface on 2d plot

From Dev

matplotlib : project 3d surface on 2d plot

From Dev

Creating a 3D surface plot with matplotlib in python

From Dev

Plotting a 3D Cylindrical Surface plot in Python

From Dev

Change the colour scheme of the 3D surface plot in Plotly Python

From Dev

Analysis of a 3D point cloud by projection in a 2D surface

From Dev

Python Plotly: X,Y Grid Contour Projection onto 3D Surface

From Dev

How to deal with negative depth in 3D perspective projection

From Dev

3D perspective projection coordinates in clip space

From Dev

A bit about 3D perspective projection & matrix transforms

From Dev

3D surface plot in R

From Dev

3d surface plot with xyz coordinates

From Dev

3D surface plot in R

From Dev

3D Surface plot misplaced axis

From Dev

3d surface plot with function call

From Dev

How to project a 2D image as a surface in a 3D scatter plot (in R)?

From Dev

How to project a 2D image as a surface in a 3D scatter plot (in R)?

From Dev

3D plot with an 2D array python matplotlib

From Dev

How to surface plot/3d plot from dataframe?

From Dev

matplotlib 3D plot, plot_surface black

From Dev

(python) plot 3d surface with colormap as 4th dimension, function of x,y,z

From Dev

Plot a 3D surface from {x,y,z}-scatter data in python

From Dev

3d plot of models (3d scatterplot + model surface + connecting points to surface)

From Dev

3D Surface Colormap in Python

From Dev

"Cut out" 3D Surface Plot in R

From Dev

How to calculate the volume under a 3d surface plot

From Dev

Plot a 3d surface from a 'list of lists' using matplotlib

From Dev

R 3d surface plot with factor variables

Related Related

  1. 1

    python : 2D perspective projection of a 3D surface plot

  2. 2

    matplotlib : project 3d surface on 2d plot

  3. 3

    matplotlib : project 3d surface on 2d plot

  4. 4

    Creating a 3D surface plot with matplotlib in python

  5. 5

    Plotting a 3D Cylindrical Surface plot in Python

  6. 6

    Change the colour scheme of the 3D surface plot in Plotly Python

  7. 7

    Analysis of a 3D point cloud by projection in a 2D surface

  8. 8

    Python Plotly: X,Y Grid Contour Projection onto 3D Surface

  9. 9

    How to deal with negative depth in 3D perspective projection

  10. 10

    3D perspective projection coordinates in clip space

  11. 11

    A bit about 3D perspective projection & matrix transforms

  12. 12

    3D surface plot in R

  13. 13

    3d surface plot with xyz coordinates

  14. 14

    3D surface plot in R

  15. 15

    3D Surface plot misplaced axis

  16. 16

    3d surface plot with function call

  17. 17

    How to project a 2D image as a surface in a 3D scatter plot (in R)?

  18. 18

    How to project a 2D image as a surface in a 3D scatter plot (in R)?

  19. 19

    3D plot with an 2D array python matplotlib

  20. 20

    How to surface plot/3d plot from dataframe?

  21. 21

    matplotlib 3D plot, plot_surface black

  22. 22

    (python) plot 3d surface with colormap as 4th dimension, function of x,y,z

  23. 23

    Plot a 3D surface from {x,y,z}-scatter data in python

  24. 24

    3d plot of models (3d scatterplot + model surface + connecting points to surface)

  25. 25

    3D Surface Colormap in Python

  26. 26

    "Cut out" 3D Surface Plot in R

  27. 27

    How to calculate the volume under a 3d surface plot

  28. 28

    Plot a 3d surface from a 'list of lists' using matplotlib

  29. 29

    R 3d surface plot with factor variables

HotTag

Archive