title: Galactic and equatorial projected grids with matplotlib
body: <p>I'm attempting to draw a scatter plot of astronomic sources projected on a full sky map, using two coordinate grids: <a href="https://en.wikipedia.org/wiki/Galactic_coordinate_system" rel="nofollow noreferrer">galactic</a> and <a href="https://en.wikipedia.org/wiki/Equatorial_coordinate_system" rel="nofollow noreferrer">equatorial</a>. Generating a single grid plot (using one of the pre-defined projections) is easy:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import numpy as np
  
  # Random galactic coordinates
  l_rad = np.random.uniform(-np.pi, np.pi, 100)
  b_rad = np.random.uniform(-np.pi / 2., np.pi / 2., 100)
  
  plt.figure()
  plt.subplot(111, projection="aitoff")
  plt.grid(True)
  plt.plot(ra_rad, dec_rad, 'o', markersize=2, alpha=0.3)
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/lOLww.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lOLww.png" alt="enter image description here"></a></p>
  
  <p>What I need though is a map with two grids superimposed: one for galactic coordinates (which is already there) and another one for equatorial. That is, a second grid like the one in the image below (notice the hour convention instead of decimal degrees for the right ascension) should be superimposed onto the first grid:</p>
  
  <p><a href="https://i.stack.imgur.com/OSMZy.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OSMZy.gif" alt="enter image description here"></a></p>
  
  <p>I think the <a href="https://www.astro.rug.nl/software/kapteyn/" rel="nofollow noreferrer">Kapteyn</a> package can do <a href="https://www.astro.rug.nl/software/kapteyn/allsky.html#fig-34-hammer-aitoff-projection-ait-oblique" rel="nofollow noreferrer">something similar</a> (image below) but I'd prefer to avoid it if possible (I find it rather complicated to use).</p>
  
  <p><a href="https://i.stack.imgur.com/KjcB3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KjcB3.png" alt="enter image description here"></a></p>