title: AttributeError: draw_artist can only be used after an initial draw which caches the render
body: <p>My requirement is to plot the data in polar graph. However I need to keep polar graph in particular angle to looks like "V" shape and data need to plotted in between the particular angle. </p>
  
  <p>In python I don't find a solution to keep the polar graph in particular angle, Example : Graph should be display in between -60 to 60 degree radius. To achieve that I have looked into couple of existing examples and creating required polar graph with FloatingSubplot functions.  However I am hitting the issue , when we try to use along with function animation function with blit=True. Error message is displayed is "AttributeError: draw_artist can only be used after an initial draw which caches the render"</p>
  
  <p>Here is my code. </p>
  
  #
  
  <pre><code>import matplotlib
  matplotlib.use('Qt4Agg')
  import numpy as np
  import matplotlib.pyplot as plt
  from matplotlib import style
  import matplotlib.animation as animation
  import mpl_toolkits.axisartist.floating_axes as floating_axes
  from matplotlib.transforms import Affine2D
  from matplotlib.projections import PolarAxes
  from mpl_toolkits.axisartist import angle_helper
  from mpl_toolkits.axisartist.grid_finder import MaxNLocator, DictFormatter
  from mpl_toolkits.axisartist.floating_axes import GridHelperCurveLinear, FloatingSubplot
  
  plt.close('all')
  
  fig = plt.figure('Practice', dpi=100)  # To set the fig title as pratice
  
  ax1 = fig.add_subplot(2, 2, 1)  # subplot for 1st plot
  plt.ion()
  ax1.grid(True)
  
  
  def fractional_polar_axes(f, thlim=(0, 120), rlim=(0, 20), step=(30, 0.25),
                            thlabel='theta', rlabel='r', ticklabels=True, theta_offset=0, rlabels=None):
      '''Return polar axes that adhere to desired theta (in deg) and r limits. steps for theta
  and r are really just hints for the locators.'''
      th0, th1 = thlim  # deg
      r0, r1 = rlim
      thstep, rstep = step
  
      tr_rotate = Affine2D().translate(theta_offset, 0)
      # scale degrees to radians:
      tr_scale = Affine2D().scale(np.pi / 180., 1.)
      # pa = axes(polar="true") # Create a polar axis
      pa = PolarAxes
      tr = tr_rotate + tr_scale + pa.PolarTransform()
      theta_grid_locator = angle_helper.LocatorDMS((th1 - th0) // thstep)
      r_grid_locator = MaxNLocator((r1 - r0) // rstep)
      theta_tick_formatter = angle_helper.FormatterDMS()
      if rlabels:
          rlabels = DictFormatter(rlabels)
  
      grid_helper = GridHelperCurveLinear(tr,
                                          extremes=(th0, th1, r0, r1),
                                          grid_locator1=theta_grid_locator,
                                          grid_locator2=r_grid_locator,
                                          tick_formatter1=theta_tick_formatter,
                                          tick_formatter2=rlabels)
  
      a = FloatingSubplot(f, 222, grid_helper=grid_helper)
      # a = Subplot(f,753, grid_helper=grid_helper)
      # f.add_subplot(7,5,(3,34))
      f.add_subplot(a)
      # adjust x axis (theta):
      print(a)
      a.axis["bottom"].set_visible(False)
      a.axis["top"].set_axis_direction("bottom")  # tick direction
      a.axis["top"].toggle(ticklabels=ticklabels, label=bool(thlabel))
      a.axis["top"].major_ticklabels.set_axis_direction("top")
      a.axis["top"].label.set_axis_direction("top")
      a.axis["top"].major_ticklabels.set_pad(10)
  
      # adjust y axis (r):
      a.axis["left"].set_axis_direction("bottom")  # tick direction
      a.axis["right"].set_axis_direction("top")  # tick direction
      a.axis["left"].toggle(ticklabels=True, label=bool(rlabel))
      # add labels:
      a.axis["top"].label.set_text(thlabel)
      a.axis["left"].label.set_text(rlabel)
      # create a parasite axes whose transData is theta, r:
      auxa = a.get_aux_axes(tr)
      print(auxa)
      # make aux_ax to have a clip path as in a?:
      auxa.patch = a.patch
      # this has a side effect that the patch is drawn twice, and possibly over some other
      # artists. So, we decrease the zorder a bit to prevent this:
      a.patch.zorder = -2
  
      # add sector lines for both dimensions:
      thticks = grid_helper.grid_info['lon_info'][0]
      rticks = grid_helper.grid_info['lat_info'][0]
      print(grid_helper.grid_info['lat_info'])
      for th in thticks[1:-1]:  # all but the first and last
          auxa.plot([th, th], [r0, r1], ':', c='grey', zorder=-1, lw=0.5)
      for ri, r in enumerate(rticks):
          # plot first r line as axes border in solid black only if it  isn't at r=0
          if ri == 0 and r != 0:
              ls, lw, color = 'solid', 1, 'black'
          else:
              ls, lw, color = 'dashed', 0.5, 'grey'
          # From http://stackoverflow.com/a/19828753/2020363
          auxa.add_artist(plt.Circle([0, 0], radius=r, ls=ls, lw=lw, color=color, fill=False,
                                     transform=auxa.transData._b, zorder=-1))
  
      return auxa
  
  def animate(i):
      global loopcount, th, r
      th = th+.1
      r = r+.1
  
      datapoints.set_offsets(np.vstack((th,r)).T)
      #print("in animate")
      return datapoints,
  
  
  if __name__ == '__main__':
      r_locs = [0,5,10, 15, 20]
  
      r_labels = ['0', '5', '10', '15', '20']
      r_ticks = {loc: label for loc, label in zip(r_locs, r_labels)}
      a1 = fractional_polar_axes(fig, thlim=(-60, 60), step=(20, 5),
                                 theta_offset=90, rlabels=r_ticks)
      th= 20
      r=10
      a1.scatter(th,r , c = 'r', alpha = 0.5, linewidths = '.2', s = 20) # plotting the line at thetha 20 and radius 10
      datapoints = a1.scatter([], [], c='b',  alpha = 0.5, linewidths = '.2', s = 20) # creating scatter line with given instruction,
      ani = animation.FuncAnimation(fig, animate, frames=30, interval=20, blit=True)
  
  plt.show(block=True)
  </code></pre>
  
  #
  
  <p>"""
  Above code is working perfectly fine with blit=False and also same solution working fine with line and scatter plotting in normal graph.<br>
  Please someone help me to resolve the issue. 
  """</p>