-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGraficacion Probabilidad.py
76 lines (59 loc) · 2.73 KB
/
Graficacion Probabilidad.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# ---------------------------
# Desarrollador: Mike Gabriel
# ---------------------------
# ⡴⠑⡄⠀⠀⠀⠀⠀⠀⠀ ⣀⣀⣤⣤⣤⣀⡀
# ⠸⡇⠀⠿⡀⠀⠀⠀⣀⡴⢿⣿⣿⣿⣿⣿⣿⣿⣷⣦⡀
# ⠀⠀⠀⠀⠑⢄⣠⠾⠁⣀⣄⡈⠙⣿⣿⣿⣿⣿⣿⣿⣿⣆
# ⠀⠀⠀⠀⢀⡀⠁⠀⠀⠈⠙⠛⠂⠈⣿⣿⣿⣿⣿⠿⡿⢿⣆
# ⠀⠀⠀⢀⡾⣁⣀⠀⠴⠂⠙⣗⡀⠀⢻⣿⣿⠭⢤⣴⣦⣤⣹⠀⠀⠀⢀⢴⣶⣆
# ⠀⠀⢀⣾⣿⣿⣿⣷⣮⣽⣾⣿⣥⣴⣿⣿⡿⢂⠔⢚⡿⢿⣿⣦⣴⣾⠸⣼⡿
# ⠀⢀⡞⠁⠙⠻⠿⠟⠉⠀⠛⢹⣿⣿⣿⣿⣿⣌⢤⣼⣿⣾⣿⡟⠉
# ⠀⣾⣷⣶⠇⠀⠀⣤⣄⣀⡀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇
# ⠀⠉⠈⠉⠀⠀⢦⡈⢻⣿⣿⣿⣶⣶⣶⣶⣤⣽⡹⣿⣿⣿⣿
# ⠀⠀⠀⠀⠀⠀⠀⠉⠲⣽⡻⢿⣿⣿⣿⣿⣿⣿⣷⣜⣿⣿⣿⡇
# ⠀⠀ ⠀⠀⠀⠀⠀⢸⣿⣿⣷⣶⣮⣭⣽⣿⣿⣿⣿⣿⣿⣿⠇
# ⠀⠀⠀⠀⠀⠀⣀⣀⣈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇
# ⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
# -------------------------------
# Implementación de las librerias
# -------------------------------
from tkinter import Tk, Frame,Button
import matplotlib.pyplot as plt
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
# ----------------------------------------------------------
# creamos las propiedades de la ventana donde sera ejecutado
# ----------------------------------------------------------
ventana = Tk()
ventana.geometry('1100x500')
ventana.wm_title('UwU')
ventana.minsize(width=1100,height=500)
frame = Frame(ventana, bg='blue')
frame.grid(column=0,row=0, sticky='nsew')
# ---------------------
# Datos de las graficas
# ---------------------
nombres = ['talvez', 'nel', 'si', 'tiene novio','nose']
colores = ['blue','red','green','magenta', 'black']
tamaño = [10, 25, 15, 20, 16]
fig, axs = plt.subplots(1,3 , dpi=80, figsize=(14, 6),
sharey=True, facecolor='#FF5733')
# -----------------------
# Editar estilo de titulo
# -----------------------
fig.suptitle('Probabilidad de que ella me ame',color='white',size=16, family="Kawaii Stitch")
# ----------------------------------------------
# color de borde = 'negro', ancho de línea = 1.2
# ----------------------------------------------
axs[0].bar(nombres, tamaño, color = colores)
axs[1].scatter(nombres, tamaño, color = colores)
axs[2].plot(nombres, tamaño, color = 'm')
# ---------------------------------
# Crea el area de dibujo en Tkinter
# ---------------------------------
canvas = FigureCanvasTkAgg(fig, master = frame)
canvas.draw()
canvas.get_tk_widget().grid(column=0, row=0)
# --------------
# cerrar ventana
# --------------
ventana.mainloop()