File:Even odd harmonics.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file (SVG file, nominally 575 × 450 pixels, file size: 23 KB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary

[edit]
Description
English: Symmetric and asymmetric periodic waveforms. The red is symmetric and green is asymmetric.

Red is:

Green is:

Español: Ondas simétrica y asimétrica. La curva roja es simétrica, mientras la verde es asimétrica.
Date
Source Own work
Author Nicoguaro
SVG development
InfoField
 
The SVG code is valid.
 
This plot was created with Matplotlib.
Source code
InfoField

Python code

from numpy import linspace, cos, pi
import matplotlib.pyplot as plt

plt.style.use("seaborn-white")
red = "#e41a1c"
green = "#4daf4a"

t = linspace(0, 4*pi, 400)
y1 = cos(t)   cos(3*t   1)   0.2*cos(7*t   5)
y2 = cos(t)   cos(2*t   1)   0.2*cos(6*t   5)

fig = plt.figure()

plt.subplots_adjust(hspace=0.001)

ax1 = plt.subplot(2, 1, 1)
plt.plot(t/pi, y1, lw=2, color=red)
plt.grid(b=True)
plt.yticks([-2.5, -1.25, 0, 1.25, 2.5], [])
plt.ylim(-2.5, 2.5)

plt.subplot(2, 1, 2, sharex=ax1)
plt.plot(t/pi, y2, lw=2, color=green)
plt.grid(b=True)
plt.xticks([0, 1, 2, 3, 4], [])
plt.yticks([-2.5, -1.25, 0, 1.25, 2.5], [])
plt.ylim(-2.5, 2.5)

plt.savefig("Even_odd_harmonics.svg", bbox_inches="tight")
plt.show()

Licensing

[edit]
I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution
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/TimeThumbnailDimensionsUserComment
current22:07, 19 July 2016Thumbnail for version as of 22:07, 19 July 2016575 × 450 (23 KB)Nicoguaro (talk | contribs)User created page with UploadWizard

The following page uses this file:

File usage on other wikis

The following other wikis use this file:

Metadata