File:Signaux alternatifs.svg

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

Original file(SVG file, nominally 720 × 540 pixels, file size: 33 KB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary

[edit]
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.
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

[edit]
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.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current16:29, 9 December 2012Thumbnail for version as of 16:29, 9 December 2012720 × 540 (33 KB)Savant-fou (talk | contribs)Légère erreur sur le tracé.
16:28, 9 December 2012Thumbnail for version as of 16:28, 9 December 2012720 × 540 (33 KB)Savant-fou (talk | contribs){{Information |Description ={{fr|1=Différents types de signaux alternatifs. Fait avec Matplotlib. Code utilisé : <source lang="python"> # -*- coding: utf-8 -*- import math from numpy import arange import numpy as numpy from matplotlib.pyplot impo...

There are no pages that use this file.

Metadata