2808 explained code solutions for 75 technologies


python-matplotlibHow to change axis label position


import matplotlib.pyplot as plt

plt.plot([2,1,3])
plt.xlabel("X title", loc="right")
plt.ylabel("Y title", loc="top")

plt.show()ctrl + c
import matplotlib.pyplot as plt

loads Matplotlib module to use plotting capabilities

.plot(

plot specified data

xlabel

set label for x-axis

ylabel

set label for y-axis

loc=

set label position

.show()

render chart in a separate window