- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to display a 3D plot of a 3D array isosurface in matplotlib mplot3D or similar?
Let's take an example to see how to display a 3D plot of a 3D array isosurface in matplotlib −
Example
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D plt.rcParams["figure.figsize"] = [7.50, 3.50] plt.rcParams["figure.autolayout"] = True x = np.arange(-5, 5, 0.25) y = np.arange(-5, 5, 0.25) x, y = np.meshgrid(x, y) h = x ** 2 + y ** 2 fig = plt.figure() ax = Axes3D(fig) ax.plot_surface(x, y, h, rstride=1, cstride=1, cmap=plt.cm.rainbow, linewidth=0, antialiased=False) plt.show()
Output
- Related Articles
- Creating a 3D plot in Matplotlib from a 3D numpy array
- How to plot a 3D continuous line in Matplotlib?
- How to plot a 3D patch collection in matplotlib?
- How to surface plot/3D plot from a dataframe (Matplotlib)?
- How to plot a point on 3D axes in Matplotlib?
- How to plot a 3D density map in Python with Matplotlib?
- How to plot 3D graphs using Python Matplotlib?
- Setting the aspect ratio of a 3D plot in Matplotlib
- Saving a 3D-plot in a PDF 3D with Python
- Plot 3D bars without axes in Matplotlib
- Plot Matplotlib 3D plot_surface with contour plot projection
- How to plot scatter points in a 3D figure with a colorbar in Matplotlib?
- How to make a 3D scatter plot in Python?
- How to turn off transparency in Matplotlib's 3D Scatter plot?
- Make 3D plot interactive in Jupyter Notebook (Python & Matplotlib)

Advertisements