Answers for "matplotlib xtick main label"

1

xticks and yticks matplotlib

#x-ticks: 
plt.xticks(start, stop, step))
#y-ticks:
plt.yticks(np.arange(start,stop,step))
Posted by: Guest on August-09-2021
0

yticks matplotlib

locs, labels = yticks()  # Get the current locations and labels.
>>> yticks(np.arange(0, 1, step=0.2))  # Set label locations.
>>> yticks(np.arange(3), ['Tom', 'Dick', 'Sue'])  # Set text labels.
>>> yticks([0, 1, 2], ['January', 'February', 'March'],
...        rotation=45)  # Set text labels and properties.
>>> yticks([])  # Disable yticks.
Posted by: Guest on January-14-2022

Python Answers by Framework

Browse Popular Code Answers by Language