Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python tkinter plot points

from tkinter import *
from tkinter.ttk import *

import matplotlib
matplotlib.use("TkAgg")

from matplotlib.figure import Figure
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg

root = Tk()

figure = Figure(figsize=(5, 4), dpi=100)
plot = figure.add_subplot(1, 1, 1)

plot.plot(0.5, 0.3, color="#C41E3A", marker="o", linestyle="") # Plotting points

x = [ 0.1, 0.2, 0.3 ]
y = [ -0.1, -0.2, -0.3 ]
plot.plot(x, y, color="blue", marker="x", linestyle="")	# Plotting points

canvas = FigureCanvasTkAgg(figure, root)
canvas.get_tk_widget().grid(row=0, column=0)

root.mainloop()	# Running application
Comment

PREVIOUS NEXT
Code Example
Python :: blender python get current filename 
Python :: python ismatch 
Python :: install python modules without pip 
Python :: 2 plater die game in python 
Python :: 9x9 grid tkinter 
Python :: flask production server 
Python :: how to install qrcode module in python 
Python :: pandas array of dataframes 
Python :: get value of bit in integer python 
Python :: how to sort dataframe in python by length of groups 
Python :: sample adaboost classifier algorithm 
Python :: How to find the most similar word in a list in python 
Python :: reverse string python 
Python :: how to encrypt and decrypt strings python 
Python :: pip ne marche pas 
Python :: pyqt5 spin box change value trigger 
Python :: string replace in python 
Python :: what is cpython 
Python :: argparse for Command-Line Interface (CLI) 
Python :: search whole drive for a file in python 
Python :: python 3 docs 
Python :: sum of list of numbers 
Python :: a star search algorithm python code 
Python :: how to scan directory recursively python 
Python :: permutation and combination in python 
Python :: django-storages delete folder 
Python :: pd calculations between columns 
Python :: bad request 400 heroku app 
Python :: python filter list 
Python :: tensorflow euclidean distance 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =