Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

matplotlib custom legend

import matplotlib.lines as mlines

eight = mlines.Line2D([], [], color='blue', marker='s', ls='', label='8')
nine = mlines.Line2D([], [], color='blue', marker='D', ls='', label='9')
# etc etc
plt.legend(handles=[eight, nine])
Comment

PREVIOUS NEXT
Code Example
Python :: pyspark show all values 
Python :: python check if class has function 
Python :: how to save the model in python 
Python :: sqlite query in python 
Python :: df.iterrows() 
Python :: pandas groupby apply list 
Python :: convert price to float python 
Python :: decision tree regressor 
Python :: rotate 90 degrees clockwise counter python 
Python :: standard scaler vs min max scaler 
Python :: pandas get day names 
Python :: spacy config 
Python :: python square all numbers in list 
Python :: python count empty lines in text file 
Python :: seaborn pairplot 
Python :: how to calculate the sum of a list in python 
Python :: extract data from json file python 
Python :: python replace string 
Python :: django drop all tables 
Python :: np.random 
Python :: Send GIF in Embed discord.py 
Python :: matplotlib position legend 
Python :: how explode by using two columns pandas 
Python :: how to check if a input is an integer python 
Python :: drop every other column pandas 
Python :: Delete file in python Using the os module 
Python :: pandas divide one column by another 
Python :: check dir exist python 
Python :: how to clear a list in python 
Python :: python do while 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =