To create static, animated and interactive visualizations of data, we use the Matplotlib module in Python. The below programs will depict 3D wireframe. visualization of data in Python. In-order to visualize data using 3D wireframe we require some modules from matplotlib, mpl_toolkits and numpy library.
Example 1:
# importing modules from mpl_toolkits.mplot3d import axes3d from matplotlib import pyplot # creating the visualiztion fig = pyplot.figure() wf = fig.add_subplot(111, projection='3d') x, y, z = axes3d.get_test_data(0.05) wf.plot_wireframe(x,y,z, rstride=2, cstride=2,color='green') # displaying the visualization wf.set_title('Example 1') pyplot.show() |
Output:

In the above program, a 3D wireframe is plotted using test values for coordinates.
Example 2:
# importing modules from mpl_toolkits import mplot3d import numpy from matplotlib import pyplot # assigning coordinates a = numpy.linspace(-5, 5, 25) b = numpy.linspace(-5, 5, 25) x, y = numpy.meshgrid(a, b) z = numpy.sin(numpy.sqrt(x**2 + y**2)) # creating the visualiztion fig = pyplot.figure() wf = pyplot.axes(projection ='3d') wf.plot_wireframe(x, y, z, color ='green') # displaying the visuliztion wf.set_title('Example 2') pyplot.show() |
Output:

Recommended Posts:
- Python | Matplotlib Sub plotting using object oriented API
- Python | Matplotlib Graph plotting using object oriented API
- 3D Contour Plotting in Python using Matplotlib
- Plotting Histogram in Python using Matplotlib
- 3D Surface plotting in Python using Matplotlib
- 3D Scatter Plotting in Python using Matplotlib
- Plotting cross-spectral density in Python using Matplotlib
- Plotting Various Sounds on Graphs using Python and Matplotlib
- Three-dimensional Plotting in Python using Matplotlib
- Different plotting using pandas and matplotlib
- Plotting graph For IRIS Dataset Using Seaborn And Matplotlib
- Python | Plotting Google Map using gmplot package
- Plotting graph using Seaborn | Python
- Python | Plotting Google Map using folium package
- Python | Geographical plotting using plotly
- Python | Plotting charts in excel sheet using openpyxl module | Set - 1
- Python | Plotting charts in excel sheet using openpyxl module | Set – 2
- Python | Plotting charts in excel sheet using openpyxl module | Set 3
- Python | Plotting Area charts in excel sheet using XlsxWriter module
- Python | Plotting bar charts in excel sheet using XlsxWriter module
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

