File:Mpl example Mandelbrot set.svg
Original file (SVG file, nominally 900 × 868 pixels, file size: 1.46 MB)
Captions
Summary
editDescriptionMpl example Mandelbrot set.svg |
English: The Mandelbrot set, plotted with Python and matplotlib. (Originally programmed for Rosetta Code.) |
||
Date | |||
Source | Own work | ||
Author | Adrien F. Vincent | ||
SVG development InfoField | This plot was created with Matplotlib.
| ||
Source code InfoField | Python code##########
## Code for the figure
##########
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.cm import prism as colormap
fig, ax = plt.subplots(figsize=(10, 10))
def m(a):
z = 0
for n in range(1, 100):
z = z**2 + a
if abs(z) > 2.0:
return n
return np.NaN
X = np.arange(-2.0, 0.8, 0.001)
Y = np.arange(-1.5, 1.5, 0.001)
Z = np.zeros((len(Y), len(X)))
for iy, y in enumerate(Y):
print (iy, "of", len(Y))
for ix, x in enumerate(X):
Z[iy,ix] = m(x + 1j * y)
ax.imshow(Z, cmap=colormap, interpolation='none',
extent=[X.min(), X.max(), Y.min(), Y.max()])
ax.set_xlabel("Re(c)")
ax.set_ylabel("Im(c)")
fig.savefig("mandelbrot_python.svg")
plt.show()
##########
|
Rationale: this work aims at providing a version of the previous work https://commons.wikimedia.org/wiki/File:Logarithmic_Spiral_Pylab.svg , done by Morn, with a source code that uses object-oriented matplotlib interface and without Python wildcard import.
Licensing
edit- 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 | 900 × 868 (1.46 MB) | 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 vi.wikipedia.org
- Phương trình
- Đại số tuyến tính
- Bản mẫu:Đại số
- Ma trận (toán học)
- Phương trình đại số
- Phương trình tuyến tính
- Đại số trừu tượng
- Lý thuyết nhóm
- Nhóm (toán học)
- Không gian vectơ
- Không gian Hilbert
- Vành
- Phương trình bậc ba
- Đại số phổ dụng
- Trường đóng đại số
- Tích vô hướng
- Đại số sơ cấp
- Hình học đại số
- Cấu trúc đại số
- Lý thuyết số đại số
- Lý thuyết vành
- Đại số giao hoán
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 | 720pt |
---|---|
Height | 694pt |