Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

matplotlib add legend axis x

fig = plt.figure(figsize=(10,5))
ax = fig.add_subplot(111)
ax.set_title('ADR vs Rating (CS:GO)')
ax.scatter(x=data[:,0],y=data[:,1],label='Data')
plt.plot(data[:,0], m*data[:,0] + b,color='red',label='Our Fitting 
Line')
ax.set_xlabel('ADR')
ax.set_ylabel('Rating')
ax.legend(loc='best')
plt.show()
Comment

PREVIOUS NEXT
Code Example
Python :: sort json python 
Python :: raw string 
Python :: pandas subtract integer from column 
Python :: python tkinter delete label 
Python :: convert number to binary python 
Python :: python for doing os command execution 
Python :: how to drop a column by name in pandas 
Python :: mean code python 
Python :: flip pyplot python 
Python :: download youtube audio python 
Python :: remove characters in array of string python 
Python :: return column of matrix numpy 
Python :: python if else short version 
Python :: argparse multiple arguments as list 
Python :: from sklearn.metrics import classification_report 
Python :: django delete session 
Python :: drop columns pyspark 
Python :: string pattern matching pandas 
Python :: data science standard deviation 
Python :: json load python 
Python :: add percentage column pandas 
Python :: vscode not recognizing python import 
Python :: SafeERC20: low-level call failed 
Python :: fiel to base64 python 
Python :: install python setuptools ubuntu 
Python :: how to insert a variable into a string without breaking up the string in python 
Python :: get_terminal_sizee python 
Python :: python list subdirectories 
Python :: python list comprehension double for 
Python :: command to check python version in linux 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =