title: Cartopy lat/lon labels with LCC projection
body: <p>I need to add lat/lon labels to my LCC projected figure. Its amazing how complicated this has turned out to be. I used the code <a href="https://stackoverflow.com/questions/27962953/cartopy-axis-label-workaround">here</a> and it worked really well for a single panel figure. My figures all need to be 3-4 panels unfortunately. 2 problems.</p>
  
  <ol>
  <li><p>The anchored text (supposed to be "a") on subplot 1 disappears.</p></li>
  <li><p>Strange text appears on subplot 2-3, I cannot figure out what is generating it.</p></li>
  </ol>
  
  <p>Thanks as always!</p>
  
  <p>My code:</p>
  
  <pre><code>fig = plt.figure(1,figsize=(11,9), dpi=600.0)
  projection = ccrs.LambertConformal(central_longitude=-105,central_latitude=45,standard_parallels=[50,40])
  
  ax1 = fig.add_subplot(131, projection = projection)
  
  test = plt.contourf(temp.lon,temp.lat,temp[:,:].values,transform=ccrs.PlateCarree(),levels=levs,cmap='RdBu_r', extend='both')
  plt.contourf(temp_pval.lon,temp_pval.lat,temp_pval[:,:].values,transform=ccrs.PlateCarree(),color='none',edgecolor='black',hatches="..",alpha=0.,add_colorbar = False)
  
  ax1.set_extent([ext_e, ext_w, ext_s, ext_n])
  states_provinces = cfeature.NaturalEarthFeature(
      category='cultural',
      name='admin_1_states_provinces_lines',
      scale='50m',
      facecolor='none')
  ax1.add_feature(states_provinces, edgecolor='black', linewidth=0.2)
  ax1.add_feature(cfeature.COASTLINE)
  ax1.add_feature(cfeature.BORDERS)
  shape_feature = ShapelyFeature(Reader('/Users/gbromley/Dropbox/Montana_Climate_Project/Study_Area/NGP_Study_Area/Study_Area_08_01_17.shp').geometries(),crs=ccrs.PlateCarree(), facecolor='none',edgecolor='black')
  ax1.add_feature(shape_feature)
  
  
  # *must* call draw in order to get the axis boundary used to add ticks:
  fig.canvas.draw()
  
  # Define gridline locations and draw the lines using cartopy's built-in gridliner:
  xticks = [-120,-110, -100, -90]
  yticks = [30, 40, 50, 60]
  ax1.gridlines(xlocs=xticks, ylocs=yticks)
  
  # Label the end-points of the gridlines using the custom tick makers:
  ax1.xaxis.set_major_formatter(LONGITUDE_FORMATTER) 
  ax1.yaxis.set_major_formatter(LATITUDE_FORMATTER)
  pf.lambert_xticks(ax1, xticks)
  pf.lambert_yticks(ax1, yticks)
  
  ax1.title.set_visible(False)
  cb = plt.colorbar(test, cmap='RdBu_r',fraction=0.037)
  cb.set_label('$^\circ$C / Decade',fontsize=10)
  
  anchored_text = AnchoredText("a", loc=2)
  
  ### VPD Plot ###
  ax2 = fig.add_subplot(132, projection = projection)
  
  test2 = plt.contourf(vpd.lon,vpd.lat,vpd[:,:].values,transform=ccrs.PlateCarree(),levels=levs,cmap='PuOr_r', extend='both')
  
  ax2.set_extent([ext_e, ext_w, ext_s, ext_n])
  states_provinces = cfeature.NaturalEarthFeature(
      category='cultural',
      name='admin_1_states_provinces_lines',
      scale='50m',
      facecolor='none')
  ax2.add_feature(states_provinces, edgecolor='lightgray')
  ax2.add_feature(cfeature.COASTLINE)
  ax2.add_feature(cfeature.BORDERS)
  vpd_pval.plot.contourf(axes=ax2,transform=ccrs.PlateCarree(),color='none',edgecolor='black',hatches="..",alpha=0.,add_colorbar = False)
  
  
  shape_feature = ShapelyFeature(Reader('/Users/gbromley/Dropbox/Montana_Climate_Project/Study_Area/NGP_Study_Area/Study_Area_08_01_17.shp').geometries(),crs=ccrs.PlateCarree(), facecolor='none',edgecolor='black')
  ax2.add_feature(shape_feature)
  
  
  # *must* call draw in order to get the axis boundary used to add ticks:
  fig.canvas.draw()
  
  # Define gridline locations and draw the lines using cartopy's built-in gridliner:
  xticks = [-120,-110, -100, -90]
  yticks = [30, 40, 50, 60]
  ax2.gridlines(xlocs=xticks, ylocs=yticks)
  
  # Label the end-points of the gridlines using the custom tick makers:
  ax2.xaxis.set_major_formatter(LONGITUDE_FORMATTER) 
  ax2.yaxis.set_major_formatter(LATITUDE_FORMATTER)
  pf.lambert_xticks(ax2, xticks)
  pf.lambert_yticks(ax2, yticks)
  
  
  ax2.title.set_visible(False)
  cb = plt.colorbar(test2, cmap='PuOr_r',fraction=0.037)
  cb.set_label('hPa / Decade',fontsize=10)
  
  anchored_text = AnchoredText("b", loc=2)
  ax2.add_artist(anchored_text)
  
  
  ### Precip Plot ###
  
  ax3 = fig.add_subplot(133, projection = projection)
  test3 = plt.contourf(precip.lon,precip.lat,precip[:,:].values,transform=ccrs.PlateCarree(),levels=precip_levs,cmap='BrBG', extend='both')
  
  precip_pval.plot.contourf(axes=ax3,transform=ccrs.PlateCarree(),color='none',edgecolor='black',hatches="..",alpha=0.,add_colorbar = False)
  ax3.set_extent([ext_e, ext_w, ext_s, ext_n])
  states_provinces = cfeature.NaturalEarthFeature(
      category='cultural',
      name='admin_1_states_provinces_lines',
      scale='50m',
      facecolor='none')
  ax3.add_feature(states_provinces, edgecolor='lightgray')
  ax3.add_feature(cfeature.COASTLINE)
  ax3.add_feature(cfeature.BORDERS)
  shape_feature = ShapelyFeature(Reader('/Users/gbromley/Dropbox/Montana_Climate_Project/Study_Area/NGP_Study_Area/Study_Area_08_01_17.shp').geometries(),crs=ccrs.PlateCarree(), facecolor='none',edgecolor='black')
  ax3.add_feature(shape_feature)
  
  ax3.title.set_visible(False)
  cb = plt.colorbar(test3, cmap='BrBG',fraction=0.037)
  cb.set_label('mm / Decade',fontsize=10)
  anchored_text = AnchoredText("c", loc=2)
  ax3.add_artist(anchored_text)
  
  # *must* call draw in order to get the axis boundary used to add ticks:
  fig.canvas.draw()
  
  # Define gridline locations and draw the lines using cartopy's built-in gridliner:
  xticks = [-120,-110, -100, -90]
  yticks = [30, 40, 50, 60]
  ax3.gridlines(xlocs=xticks, ylocs=yticks, color='black', linewidth = 0.1)
  
  # Label the end-points of the gridlines using the custom tick makers:
  ax3.xaxis.set_major_formatter(LONGITUDE_FORMATTER) 
  ax3.yaxis.set_major_formatter(LATITUDE_FORMATTER)
  pf.lambert_xticks(ax3, xticks)
  pf.lambert_yticks(ax3, yticks)
  
  
  
  plt.tight_layout()
  
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/UsleD.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UsleD.jpg" alt="The figure in question"></a></p>