Graficos

Graficos

from Tkinter import * 
root = Tk()  
root.title('Ejemplo') 

circulo = Canvas(width=210, height=210, bg='white') 
circulo.pack(expand=YES, fill=BOTH) 
circulo.create_oval(10, 10, 200, 200, width=5, fill='blue') 

rectangulo = Canvas(width=210, height=210, bg='white')
rectangulo.pack(expand=YES, fill=BOTH)
rectangulo.create_rectangle(10, 10, 200, 200, width=5, fill='yellow')

linea = Canvas(width=210, height=210, bg='white')
linea.pack(expand=YES, fill=BOTH)
linea.create_line(0, 200, 200, 0, width=10, fill='black')
linea.create_line(0, 0, 200, 200, width=10, fill='black')

root.mainloop() 

from Tkinter import * 
root = Tk() 
root.title('Ejemplo') 

rectangulo = Canvas(width=210, height=210, bg='white')
rectangulo.pack(expand=YES, fill=BOTH)
rectangulo.create_rectangle(10, 10, 200, 200, width=5, fill='yellow')
root.mainloop() 

from Tkinter import * 
root = Tk() 
root.title('Ejemplo') 
circulo = Canvas(width=210, height=210, bg='white') 
circulo.pack(expand=YES, fill=BOTH) 
circulo.create_oval(10, 10, 200, 200, width=5, fill='blue') 
root.mainloop() 
from Tkinter import * 
root = Tk() 
root.title('Ejemplo') 
linea = Canvas(width=210, height=210, bg='white')
linea.pack(expand=YES, fill=BOTH)
linea.create_line(0, 200, 200, 0, width=10, fill='black')
linea.create_line(0, 0, 200, 200, width=10, fill='black')

root.mainloop()

Comentarios

Entradas populares de este blog

Registro de un procesador.