title: Matplotlib Darker Background in 3D Plot
body: <p>I am plotting the following image in matplotlib.
  My problem is that, the image looks good like this, however, I would like to make the background darker, as when I print this image, the grayscale part does not appear in the print. Could someone tell me API to make this change?</p>
  
  <p>I use simple API to plot the 3D curve - </p>
  
  <pre><code>ax.plot(X1, Y1, Z1, '^', c='r')
  ax.plot(X2, Y2, Z2, 'o', c='b')
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/ka7Jc.png" alt="enter image description here"></p>
  
  <p>What I also tried is this - </p>
  
  <pre><code>fig = plt.figure(figsize=(10,10))
  ax = fig.gca(projection='3d',  axisbg='gray')
  </code></pre>
  
  <p>This changes the color to dark gray, but it is also changing the colour outside the image -</p>
  
  <p><img src="https://i.stack.imgur.com/kckpX.png" alt="enter image description here"></p>