title: Bokeh Ray glyph not displaying when length defined
body: <p>I am attempting to use the Bokeh Ray glyph to display wind direction data. My x-data is datetime (at 1-day resolution). I have a Pandas dataframe that includes a datetime-indexed column of wind direction data (one entry per day, ranges 0-360 degrees). The Ray function seems like it should be perfect, however when I define <code>length</code> the ray segments do not render. If I set <code>length=0</code> (which forces the ray segment to span the entire plot window), then the rendering is successful.</p>
  
  <p>Relevant code:</p>
  
  <pre><code>def make_avewindspddir_fig(df):
  
    fig = figure(
      title="Average Wind Speed &amp; Direction",
      name="avewindspddir_fig",
      x_axis_type='datetime',
      y_axis_label='wind speed (mph)',
      width=900, height=250
    )
  
    newcds = create_avewindspddir_cds(df, 'summit', start, end)
  
    avewinddirrays = fig.ray(x='Date', y='y_zeros', length=0, 
      length_units='data', angle='avewinddir', angle_units='deg', 
      color='black', line_width=2, source=newcds)
  
    fig.y_range = Range1d(-20, 100)
  
    return fig
  </code></pre>
  
  <p>The Pandas dataframe I pass to the 'create_avewindspddir_cds' function (which creates the newcds) contains a datetime index, average wind speed, max wind gust, ave wind direction (degrees), and 'y_zeros' (a column of zeros that I use as the origin point for each ray, equal in length to all other columns). The date range is input by the user and define 'start' and 'end'.</p>
  
  <p>The code above (along with code for plotting wind speed and gust lines) produces the following figure. This is a single panel among many other panels in my layout, so I will just use a screenshot (click for zoomed view):
  <a href="https://i.stack.imgur.com/ZZlme.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZZlme.png" alt="enter image description here"></a></p>
  
  <p>The rays are rendering the angle data correctly, and the plot essentially seems perfect if I could get control of the length parameter. The idea here is to have small wind direction vectors plotting for each day, displaying below the average wind speed and max gust lines (each ray has origin at y=0). If I change the ray plotting code to this (changing the <code>length</code> parameter to 10):</p>
  
  <pre><code>avewinddirrays = fig.ray(x='Date', y='y_zeros', length=10, 
    length_units='data', angle='avewinddir', angle_units='deg', 
    color='black', line_width=2, source=newcds)
  </code></pre>
  
  <p>...the rays simply do not plot (and I get no error messages in my terminal). I have tried length values from 0.1 to 1000, and I have tried using length units of 'screen' and 'data'.</p>
  
  <p>Likely, this is a problem related to having datetime values for my x-axis, and integers for my y-axis (do 'length' units in the data-space refer to x-axis units or y-axis units?).</p>
  
  <p>As a follow-up question, is there a way to put an arrow symbol on one end of the ray?</p>
  
  <p><strong>EDIT:</strong> In response to @bigreddot....
  One additional piece that is key to making this work:
  If using wind direction data (with compass directions in degrees), the data must first be rotated for Ray to plot it correctly. Note that Ray rotates angles up from the horizontal x-axis. To convert compass directions, the following code works:</p>
  
  <pre><code># a: 0-90
  a = winddir.ix[(winddir &gt; 0) &amp; (winddir &lt;= 90)]
  a_rotate = (a - 90)*-1
  a_rotate.name = 'a_rotate'
  
  # b: 90-180
  b = winddir.ix[(winddir &gt; 90) &amp; (winddir &lt;= 180)]
  b_rotate = (b - 450)*-1
  b_rotate.name = 'b_rotate'
  
  # c: 180-360
  c_d = winddir.ix[(winddir &gt; 180) &amp; (winddir &lt;= 360)]
  c_d_rotate = 360 - c_d + 90
  c_d_rotate.name = 'c_d_rotate'
  
  # retain the nulls!
  nulls = winddir[winddir.isnull()==True]
  nulls.name = 'nulls'
  
  # put it back together:
  avewinddir_rotate = pd.concat([a_rotate, b_rotate, c_d_rotate, nulls]) 
  avewinddir_rotate.sort_index(inplace=True)
  </code></pre>
  
  <p>Also, because arrows are not possible, I achieved the same effect using circles:</p>
  
  <pre><code>circles = fig.circle(x='Date', y='y_zeros',size=4, line_color='black', 
  fill_color='white', line_width=2, source=newcds)
  </code></pre>
  
  <p>All that is needed is a symbol to orient one end of the Ray. In this case, the Ray rotates around the circle and indicates where the wind is <em>from</em> (as is standard with wind barbs). Here is my resulting figure:</p>
  
  <p><a href="https://i.stack.imgur.com/GWtK0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GWtK0.png" alt="enter image description here"></a></p>