Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

set axis labels python

# Basic syntax:
plt.xlabel("X axis label") # Add ", fontsize = #" to control fontsize
plt.ylabel("Y axis label")

# Example usage:
plt.plot(range(5))
plt.xlabel("X axis label")
plt.ylabel("Y axis label")
plt.title("Figure title", fontsize = 20)

# Note, xlabel and ylabel come from matplotlib.pyplot and plt is an 
# 	abbreviation for this, e.g. import matplotlib.pyplot as plt
Comment

matplotlib label axis

import matplotlib.pyplot as plt

plt.ylabel('Y AXIS')
plt.xlabel('X AXIS')
Comment

y axis label python

plt.xlabel('categories')
plt.ylabel('values')
Comment

matplotlib axis labels

ticks = [0, 1, 2]
labels = ["a", "b", "c"]

plt.figure()
plt.xticks(ticks, labels)
plt.show()
Comment

PREVIOUS NEXT
Code Example
Python :: how to change int to string in python 
Python :: return mean of df as dataframe 
Python :: how to change templates folder in flask 
Python :: python convert 
Python :: python milisegundos 
Python :: manage python environment in jupyterlab 
Python :: python try except: print error 
Python :: readlines 
Python :: beautifulsoup 
Python :: split paragraphs in python 
Python :: json to argparse 
Python :: get xlim python 
Python :: pandas.get_dummies 
Python :: python towers of hanoi recursive 
Python :: f readlines python not working 
Python :: scikit learn to identify highly correlated features 
Python :: proper function pandas 
Python :: separate words in a text to make a list python 
Python :: how to make a window python 
Python :: slack bot error not_in_channel 
Python :: how to count substring in a string in python 
Python :: python how to add a string to a list in the middle 
Python :: .first() in django 
Python :: ImportError: cannot import name include 
Python :: split by backslash python 
Python :: fernet in python 
Python :: get particular columns from dataframe 
Python :: what is the difference between accuracy and loss 
Python :: python install progressbar 
Python :: Remove whitespace from str 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =