File:Atan diagram.svg
From Wikimedia Commons, the free media repository
Jump to navigation
Jump to search
Size of this PNG preview of this SVG file: 575 × 449 pixels. Other resolutions: 307 × 240 pixels | 615 × 480 pixels | 984 × 768 pixels | 1,280 × 1,000 pixels | 2,560 × 1,999 pixels.
Original file (SVG file, nominally 575 × 449 pixels, file size: 204 KB)
File information
Structured data
Captions
Summary
[edit]DescriptionAtan diagram.svg |
English: 3D view of |
Date | |
Source | Own work |
Author | Nicoguaro |
SVG development InfoField | This plot was created with Matplotlib. |
Source code InfoField | Python code#!/usr/bin/python2
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
from matplotlib import cm
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
vmin, vmax = -np.pi, np.pi
plot_args = {'cmap':'YlGnBu_r', 'linewidth': 0.4, 'antialiased': True}
cmap = cm.get_cmap(plot_args['cmap'])
def modpi(x, ref):
return (x + np.pi/2 - ref) % (np.pi) - np.pi/2 + ref
xa = np.linspace(-1, 1, 31)
xc = 0.5 * (xa[:-1] + xa[1:])
ya = np.linspace(-1, 1, 31)
yc = 0.5 * (ya[:-1] + ya[1:])
y, x = np.meshgrid(ya, xa)
z = np.arctan(y / x)
ym, xm = np.meshgrid(yc, xc)
zc = np.arctan(ym / xm)
colors = cmap((zc.flatten() - vmin) / (vmax - vmin))
verts = []
for ix in range(len(xa)-1):
for iy in range(len(ya)-1):
zm = zc[ix, iy]
polygon = [
(xa[ix], ya[iy], modpi(z[ix,iy], zm)),
(xa[ix], ya[iy+1], modpi(z[ix,iy+1], zm)),
(xa[ix+1], ya[iy+1], modpi(z[ix+1,iy+1], zm)),
(xa[ix+1], ya[iy], modpi(z[ix+1,iy], zm))]
for i, p in enumerate(polygon):
if (p[0], p[1]) == (0., 0.):
z1 = polygon[(i-1)%len(polygon)][2]
z2 = polygon[(i+1)%len(polygon)][2]
new_points = [(p[0], p[1], z1), (p[0], p[1], z2)]
polygon = polygon[:i] + new_points + polygon[i+1:]
verts.append(polygon)
ax.add_collection3d(Poly3DCollection(verts, facecolors=colors, **plot_args))
#ax.plot_surface(x, y, z, **plot_args)
ax.view_init(azim=-70, elev=60)
ax.set_xlim(-1, 1)
ax.set_ylim(-1, 1)
ax.set_zlim(vmin, vmax)
plt.xticks([-1, -0.5, 0, 0.5, 1],
[r"$-1$", r"$-1/2$", r"$0$", r"$1/2$", r"$1$"])
plt.yticks([-1, -0.5, 0, 0.5, 1],
[r"$-1$", r"$-1/2$", r"$0$", r"$1/2$", r"$1$"])
ax.set_zticks([-np.pi, 0, np.pi])
ax.set_zticklabels([r"$-\pi$", r"$0$", r"$\pi$"])
ax.w_xaxis.set_pane_color((1.0, 1.0, 1.0, 0.0))
ax.w_yaxis.set_pane_color((1.0, 1.0, 1.0, 0.0))
ax.w_zaxis.set_pane_color((1.0, 1.0, 1.0, 0.0))
ax.set_xlabel(r"$x$", fontsize=18)
ax.set_ylabel(r"$y$", fontsize=18)
ax.set_zlabel(r"$\arctan(y/x)$", fontsize=18)
plt.savefig("atan.svg", bbox_inches="tight", transparent=True)
plt.show()
|
Licensing
[edit]I, the copyright holder of this work, hereby publish it under the following license:
This file is licensed under the Creative Commons Attribution 4.0 International license.
- 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.
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 19:54, 12 May 2020 | 575 × 449 (204 KB) | Geek3 (talk | contribs) | plot tiles up to the discontinuity | |
22:40, 16 February 2016 | 575 × 449 (231 KB) | Nicoguaro (talk | contribs) | User created page with UploadWizard |
You cannot overwrite this file.
File usage on Commons
The following page uses this file:
File usage on other wikis
The following other wikis use this file:
- Usage on en.wikipedia.org
- Usage on ja.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 | 460pt |
---|---|
Height | 359pt |