File:Mpl example 3D surface.svg
![File:Mpl example 3D surface.svg](https://upload.wikimedia.org/wikipedia/commons/thumb/5/55/Mpl_example_3D_surface.svg/720px-Mpl_example_3D_surface.svg.png?20160927095235)
Original file (SVG file, nominally 720 × 540 pixels, file size: 329 KB)
Captions
Captions
Summary
[edit]DescriptionMpl example 3D surface.svg |
English: 3D surface plot with Matplotlib |
Date | |
Source |
Own work![]() This W3C-unspecified plot was created with Matplotlib. |
Author | Adrien F. Vincent |
Rationale: this work aims at providing an updated version of the previous work https://commons.wikimedia.org/wiki/File:Matplotlib_3d_v.svg , done by IkamusumeFan,
Source code has been (very) slightly modified into fully object-oriented matplotlib interface. The original shebang was also removed.
The matplotlib (mpl) version is 1.5.3, with Python 2.7 and numpy 1.10
##########
## Code for the figure
##########
"""This generates the graph of the function f(x, y) = sin(sqrt(x^2 + y^2))."""
import matplotlib.pyplot as plt
import numpy as np
from matplotlib import cm
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
fig.clf()
ax = fig.add_subplot(1, 1, 1, projection='3d')
x = np.arange(-5, 5, 0.25)
y = np.arange(-5, 5, 0.25)
X, Y = np.meshgrid(x, y)
R = np.sqrt(X*X + Y*Y)
Z = np.sin(R)
surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.coolwarm)
fig.savefig("matplotlib_3d.svg")
plt.show()
##########
Licensing
[edit]![w:en:Creative Commons](https://upload.wikimedia.org/wikipedia/commons/thumb/7/79/CC_some_rights_reserved.svg/90px-CC_some_rights_reserved.svg.png)
![attribution](https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Cc-by_new_white.svg/24px-Cc-by_new_white.svg.png)
![share alike](https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/Cc-sa_white.svg/24px-Cc-sa_white.svg.png)
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 09:52, 27 September 2016 | ![]() | 720 × 540 (329 KB) | Adrien F. Vincent (talk | contribs) | User created page with UploadWizard |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
File usage on other wikis
The following other wikis use this file:
- Usage on fr.wikipedia.org
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Width | 576pt |
---|---|
Height | 432pt |