File:Signaux alternatifs.svg

Summary

Description
Français : Différents types de signaux alternatifs.
Date
Source Own work
Author Savant-fou
SVG development
InfoField
 The source code of this SVG is invalid due to an error.
 This W3C-invalid plot was created with Matplotlib.
Category:Invalid SVG created with Matplotlib code#1000Signaux%20alternatifs.svg
Source code
InfoField

Python code

# -*- coding: utf-8 -*-

import math
from numpy import arange
import numpy as numpy
from matplotlib.pyplot import  plot, show
import matplotlib.pyplot as plt
import pylab

tcar = arange(0.0,20.0,0.01)
car = []
i=0.5
for t in tcar:
	if t%4==0: i=-i
	car.append(i)
	
ttri = arange(20.0,56.0,8)
tri = []
i=-i
for t in ttri:
	i=-i
	tri.append(i)

sci=[]
tsci = [52,52.01]
for a in range(0,6):
	tsci.append(tsci[a]+10)
for t in tsci:
	sci.append(i)
	i = -i

timp=[82,90,90.01,100,100.1,108,108.1,120]
imp=[0.5,0.5,0,0,0.5,0.5,0,0]

fig = plt.figure()
ax1 = fig.add_subplot(111)
ax1.set_ylabel('Temps (s)')
ax1.plot(tcar,car,"b")

ax2 = fig.add_subplot(111)
ax2.plot(ttri,tri,"r")

ax3 = fig.add_subplot(111)
ax3.set_xlabel('Tension (volts)')
ax3.plot(tsci,sci,"g")

ax4 = fig.add_subplot(111)
ax4.set_ylabel('Tension (volts)')
ax4.plot(timp,imp,"b")

ax1.text(1, -0.55, u"Signal carré")
ax2.text(22, -0.55, u"Signal triangulaire")
ax3.text(51, -0.55, u"Signal en dents de scie")
ax4.text(83, -0.1, u"Signal\nimpulsionnel")

plt.axis([0,110,-0.6,0.6])
plt.grid(True)
plt.savefig('signaux_alternatifs.svg' ,transparent=False)

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Category:CC-Zero#Signaux%20alternatifs.svgCategory:Self-published work
Category:Certificat d'opérateur du service amateur (livre) Category:NumPy
Category:CC-Zero Category:Certificat d'opérateur du service amateur (livre) Category:Invalid SVG created with Matplotlib code Category:NumPy Category:Self-published work