teaching:progappchim:codes_presentation

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Dernière révisionLes deux révisions suivantes
teaching:progappchim:codes_presentation [2016/02/17 11:59] villersdteaching:progappchim:codes_presentation [2016/02/17 12:07] villersd
Ligne 141: Ligne 141:
 ==== DemoTkinter ==== ==== DemoTkinter ====
   * télécharger ici : [[http://pythonfacile.free.fr/python/demotkinter.html]]   * télécharger ici : [[http://pythonfacile.free.fr/python/demotkinter.html]]
 +
 +===== Matplotlib - pylab =====
 +
 +<sxh python; title : simple_fonction.py>
 +#!/usr/bin/python
 +# -*- coding: utf-8 -*-
 +# cosinusoïde amortie
 +
 +from pylab import *
 +
 +def my_func(t):        
 +    s1 = cos(2*pi*t)        
 +    e1 = exp(-t)        
 +    return s1*e1
 +
 +tvals = arange(0., 5., 0.05)
 +#plot(tvals, my_func(tvals))
 +
 +#show()
 +
 +plot(tvals, my_func(tvals), 'bo', tvals, my_func(tvals), 'k')
 +
 +show()
 +</sxh>
  
  
  • teaching/progappchim/codes_presentation.txt
  • Dernière modification : 2021/01/28 17:58
  • de villersd