Question : change axis and axis label color matplotlib
Answered by : annoying-ant-nobj5r9cszbq
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(range(10))
ax.set_xlabel('X-axis')
ax.set_ylabel('Y-axis')
ax.spines['bottom'].set_color('red')
ax.spines['top'].set_color('red')
ax.xaxis.label.set_color('red')
ax.tick_params(axis='x', colors='red')
plt.show()
Source : | Last Update : Fri, 23 Oct 20
Question : plt axis tick color
Answered by : tired-turtler
ax.tick_params(axis='x', colors='red')
Source : | Last Update : Wed, 10 Nov 21