Commit 0a2e344b authored by dos santos's avatar dos santos

Début programme mini projet BIS

parent 6a3591e4
# Créé par thierry, le 06/12/2015 en Python 3.2
import matplotlib
from numpy import arange, sin, pi
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg
# implement the default mpl key bindings
from matplotlib.backend_bases import key_press_handler
import matplotlib.pyplot as plt
from matplotlib.figure import Figure
import sys
if sys.version_info[0] < 3:
import Tkinter as Tk
import tkinter as Tk
fenetre = Tk.Tk()
fenetre.wm_title("Représentation De la température en fonction du temps")
f = Figure(figsize=(5, 4), dpi=100)
a = f.add_subplot(111)
b = f.add_subplot(111)
c = f.add_subplot(111)
#d = f.add_subplot(111)
t = arange(-100, 100.0, 0.01)
s = t**2
x = t**3
y = t*0
z = 0
#impression d'une fonction
a.plot(t, s)
b.plot(t, x)
c.plot(t, y)
#d.plot(t, z)
#a.plot(abscisses, ordonnees, 'ro')
a.axis([-6, 6, -20, 20])
b.axis([-6, 6, -20, 20])
c.axis([-6, 6, -20, 20])
#d.axis([0, 6, 0, 20])
canvas = FigureCanvasTkAgg(f, master=fenetre)
canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)
toolbar = NavigationToolbar2TkAgg(canvas, fenetre)
def _quit():
button = Tk.Button(master=fenetre, text='Quit', command=_quit)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment