Posts

Showing posts from April, 2018

Python - GUI - Tkinter(Bar & Pie Chart)

Image
Quickly, i just want to show you a simple example of creating bar and pie chart with Tkinter . Try this simple example: import tkinter as tk root = tk.Tk() root.title("Tkinter Bar and Pie Graph") #here is for bar chart............ tk.Label(root, text='Bar Chart').pack() data = [21, 20, 19, 16, 14, 13, 11, 9, 4, 3] c_width = 400 c_height = 350 c = tk.Canvas(root, width=c_width, height=c_height, bg= 'white') c.pack() #experiment with the variables below size to fit your needs y_stretch = 15 y_gap = 20 x_stretch = 10 x_width = 20

Python - GUI - Tkinter

Image
Tkinter is the standard GUI library for Python . Tk was developed as a GUI extension for the Tcl scripting language by John Ousterhout . The first release was in 1991. Both Tk and Tkinter are available on most Unix platforms, Windows and Macintosh systems . Tkinter provides a powerful object-oriented interface to the Tk GUI toolkit. Tkinter consists of a number of modules.The Tk interface is provided by a binary extension module named _tkinter . Creating a GUI application using Tkinter is fast and easy. Before we go into a simple example, lets take a quick look at the following: Tkinter widgets :Tkinter provides various controls used in a GUI application. These controls are commonly called widgets; menu menubutton button checkbutton progressbar radiobutton scale canvas combobox label labelframe entry frame listbox message notebook panedwindow tk_optionMenu Tkin