Quiverkey reference arrow is not being displayed
Question: The reference arrow is missing in my quiverkey and I can't figure out why.

Can someone see what I'm doing wrong? I originally wasn't using gridspec, but
I needed to so that my figures scaled correctly. When I wasn't using gridspec,
the reference arrow was showing, but now it no longer is. Why would gridspec
cause me to lose the reference arrow for the quiverkey?

Matplotlib version : 1.4.3

Python version : 2.7.10

Note: the stick plot function taken from
[here.](https://ocefpaf.github.io/python4oceanographers/blog/2014/09/15/stick_plot/)

    
    
    import matplotlib.pyplot as plot
    import matplotlib as mpl
    from mpl_toolkits.basemap import Basemap
    import numpy as np
    from datetime import datetime, timedelta
    import matplotlib.gridspec as gridspec
    from matplotlib.dates import date2num
    
    def stick_plot(time, u, v, **kw):
        width = kw.pop('width', 0.002)
        headwidth = kw.pop('headwidth', 0)
        headlength = kw.pop('headlength', 0)
        headaxislength = kw.pop('headaxislength', 0)
        angles = kw.pop('angles', 'uv')
        ax = kw.pop('ax', None)
    
    
        if angles != 'uv':
            raise AssertionError("Stickplot angles must be 'uv' so that"
                             "if *U*==*V* the angle of the arrow on"
                             "the plot is 45 degrees CCW from the *x*-axis.")
    
        if not ax:
            fig, ax = plot.subplots()
    
        q = ax.quiver(date2num(time), [[0]*len(time)], u, v,
                  angles='uv', width=width, headwidth=headwidth,
                  headlength=headlength, headaxislength=headaxislength,
                  **kw)
    
        ax.axes.get_yaxis().set_visible(False)
        ax.xaxis_date()
        return q
    
    
    
    x = np.arange(100, 110, 0.1)
    start = datetime.now()
    time = [start + timedelta(days=n) for n in range(len(x))]
    u, v = np.sin(x), np.cos(x)
    
    gs = gridspec.GridSpec(1,3, width_ratios = [5,1,3], height_ratios = [2,1])  
    fig = plot.figure(figsize=(11,8))
    ax1 = plot.subplot(gs[:, :-1])
    ax2 = plot.subplot(gs[:, -1])
    
    map1 = Basemap(ax = ax1)
    map1.drawcoastlines()
    
    q = stick_plot(time, u, v, ax = ax2)
    
    ref = 1
    qk = plot.quiverkey(q, 0.3, 0.85, ref,
                  "%s N m$^{-2}$" % ref,
                  labelpos='N', coordinates='axes')
    
    _ = plot.xticks(rotation=30)
    
    plot.show()
    

The picture:

[![missing quiver key reference
arrow](http://i.stack.imgur.com/7abmh.png)](http://i.stack.imgur.com/7abmh.png)


Answer: I had similar problem. Explicitly setting `linewidth` keyword in call to
`quiver()` solved the problem for me.

