Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

plt.annotate text size

import matplotlib.pyplot as plt

X = [1,2,3,4,5]
Y = [1,1,1,1,1]
labels = 'ABCDE'
sizes = [10, 15, 20, 25, 30]

fig, ax = plt.subplots()

ax.scatter(X, Y)

for x, y, label, size in zip(X, Y, labels, sizes):
    ax.annotate(label, (x, y), fontsize=size)

plt.show()
Comment

plt.annotate text size

import matplotlib.pyplot as plt

X = [1,2,3,4,5]
Y = [1,1,1,1,1]
labels = 'ABCDE'
sizes = [10, 15, 20, 25, 30]

fig, ax = plt.subplots()

ax.scatter(X, Y)

for x, y, label, size in zip(X, Y, labels, sizes):
    ax.annotate(label, (x, y), fontsize=size)

plt.show()
Comment

PREVIOUS NEXT
Code Example
Python :: Export a Pandas dataframe as a table image 
Python :: python Decompress gzip File 
Python :: python Correlation matrix of features 
Python :: Python NumPy swapaxis Function Syntax 
Python :: pd.read_excel column data type 
Python :: python remove empty lines from file 
Python :: python vs c++ 
Python :: Converting objects into integers 
Python :: pandas divide one column by another 
Python :: list to dataframe 
Python :: numpy is not nan 
Python :: for i in a for j in a loop python 
Python :: python file hidden 
Python :: how to append leading zeros in python 
Python :: inverse list python 
Python :: delete dictionary key python 
Python :: How to colour a specific cell in pandas dataframe 
Python :: find the time of our execution in vscode 
Python :: django ModelChoiceField value not id 
Python :: multiple pdf to csv python 
Python :: Python NumPy copyto function Syntax 
Python :: How to split a text column into two separate columns? 
Python :: strip all elements in list python 
Python :: pandas rename column values dictionary 
Python :: python get parent directory 
Python :: click ok on alert box selenium webdriver python 
Python :: dict typing python 
Python :: convert python float list to 2 digit 
Python :: Select rows without NaN in specific column 
Python :: show columns pandas 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =