Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

add text to plot python

import matplotlib.pyplot as plt
w = 4
h = 3
d = 70
plt.figure(figsize=(w, h), dpi=d)
x = [1, 2, 4]
x_pos = 0.5
y_pos = 3
plt.text(x_pos, y_pos, "text on plot")
plt.plot(x)
plt.savefig("out.png")Outputout.png
Comment

PREVIOUS NEXT
Code Example
Python :: save and load catboost model 
Python :: path sum with python 
Python :: what is self in programming 
Python :: python pip not working 
Python :: webbrowser python could not locate runnable browser 
Python :: pandas reset row indices 
Python :: python discord bot join voice channel 
Python :: flask secret key generator 
Python :: numpy fill na with 0 
Python :: count number of matrix islands python 
Python :: install python glob module in windows 
Python :: save numpy arrayw with PIL 
Python :: python virtual environment 
Python :: create an array from 1 to n python 
Python :: plot specific columns pandas 
Python :: print first dictionary keys python 
Python :: print current time hours and minutes in python 
Python :: throw error python 
Python :: pandas percent change between two rows 
Python :: python infinite value 
Python :: remove unicode characters from string python 
Python :: python get stock data 
Python :: record video with python 
Python :: median of a list python 
Python :: char to binary python 
Python :: unban discord.py 
Python :: python average of two lists by row 
Python :: auth proxy python 
Python :: django python base 64 encode 
Python :: increase limit of recusrion python 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =