Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to rotate the x label for subplot

import matplotlib.pyplot as plt
plt.rcParams["figure.figsize"] = [7.00, 3.50]
plt.rcParams["figure.autolayout"] = True
x = [1, 2, 3, 4]
ax1 = plt.subplot()
ax1.set_xticks(x)
ax1.set_yticks(x)
ax1.set_xticklabels(["one", "two", "three", "four"], rotation=45)
ax1.set_yticklabels(["one", "two", "three", "four"], rotation=45)
ax1.tick_params(axis="both", direction="in", pad=15)
plt.show()
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #rotate #label #subplot
ADD COMMENT
Topic
Name
9+9 =