title: Setting tick colors of matplotlib 3D plot
body: <p>If I have a 3D matplotlib plot (<code>Axes3D</code> object), how do I change the color of the tick marks? I figured out how to change the color of the axis line, the tick labels, and the axis label. The obvious solution, use <code>ax.tick_params(axis='x', colors='red')</code>, only changes the tick labels not the tick marks themselves.</p>
  
  <p>Here is code that tries to change all the axes to red and gets everything but the tick marks:</p>
  
  <pre><code>from mpl_toolkits.mplot3d import Axes3D
  from matplotlib import pyplot as plt
  
  fig = plt.figure()
  ax = Axes3D(fig)
  
  ax.scatter((0, 0, 1), (0, 1, 0), (1, 0, 0))
  ax.w_xaxis.line.set_color('red')
  ax.w_yaxis.line.set_color('red')
  ax.w_zaxis.line.set_color('red')
  ax.w_zaxis.line.set_color('red')
  ax.xaxis.label.set_color('red')
  ax.yaxis.label.set_color('red')
  ax.zaxis.label.set_color('red')
  ax.tick_params(axis='x', colors='red')  # only affects
  ax.tick_params(axis='y', colors='red')  # tick labels
  ax.tick_params(axis='z', colors='red')  # not tick marks
  
  fig.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/0Q8FM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0Q8FM.png" alt="enter image description here"></a></p>