File:Even odd harmonics.svg

Uploaded by Nicoguaro
Upload date 2016-07-19T22:07:38Z
MIME type image/svg+xml
Dimensions 575 × 450 px
File size 22.8 KB

Summary

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

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.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

19 July 2016

23,353 byte

image/svg+xml

dcd34e60d8e7152abb23635b65f51dad2e3bb501

Category:CC-BY-4.0 Category:Fourier series Category:Mechanical vibrations Category:Self-published work Category:Valid SVG created with Matplotlib code Category:Waveforms