File:Mpl example polar plot.svg
![File:Mpl example polar plot.svg](https://upload.wikimedia.org/wikipedia/commons/thumb/c/c1/Mpl_example_polar_plot.svg/540px-Mpl_example_polar_plot.svg.png?20160927095233)
Original file (SVG file, nominally 540 × 540 pixels, file size: 40 KB)
Captions
Captions
Summary
[edit]DescriptionMpl example polar plot.svg |
English: Logarithmic spiral with matplotlib |
Date | |
Source | Own work |
Author | Adrien F. Vincent |
Rationale: this work aims at providing an up-to-date version of the previous work https://commons.wikimedia.org/wiki/File:Logarithmic_Spiral_Pylab.svg , done by Morn the Gorn.
The matplotlib (mpl) version is 1.5.3, with Python 2.7 and numpy 1.10
##########
## Code for the figure
##########
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.ticker import NullFormatter # empty strings as tick labels
# Set up a figure with a polar projection
fig = plt.figure(figsize=(6, 6))
fig.clf()
ax = fig.add_subplot(1, 1, 1, polar=True)
# Plot a logarithmic spiral
t = np.arange(-4 * np.pi, 4 * np.pi, 0.1)
ax.plot(t, 1.19**t, linewidth=2) # one could also use `plt.polar`
# One wants a grid but without any tick label
ax.xaxis.set_major_formatter(NullFormatter())
ax.yaxis.set_major_formatter(NullFormatter())
ax.grid(True, ls='solid', color='0.75')
fig.savefig('logarithmic_spiral.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.
![](https://upload.wikimedia.org/wikipedia/commons/thumb/0/01/Created_with_Matplotlib-logo.svg/22px-Created_with_Matplotlib-logo.svg.png)
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 | ![]() | 540 × 540 (40 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.
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 | 432pt |
---|---|
Height | 432pt |