title: bokeh plotting second axis - how to get limits of primary axis?
body: <p>I have a bokeh plot with date on the x-axis (<code>data["obs_date"]</code>) and I want another x-axis at the top covering the same range but shown in a different format (<code>mjd</code> below).</p>
  
  <p>I have tried to add the second axis with:</p>
  
  <pre><code>plot.extra_x_ranges = {"MJD":
                             Range1d(start=Time(min(data["obs_date"])).mjd,
                                     end=Time(max(data["obs_date"])).mjd)}
  plot.add_layout(LinearAxis(x_range_name="MJD", axis_label="MJD",
                                 axis_label_text_font_size="16pt"),
                                 "above")
  </code></pre>
  
  <p>However, because bokeh adds a small buffer to the limits of the plot, using <code>min</code> <code>max</code> of <code>data["obs_date"]</code> as the limits for this new axis gives me a small offset - in the image below <code>16 Jan 2018</code> should align with <code>58134</code>. It also causes it to break when I only have one point to plot.</p>
  
  <p>How can I set the limits of my  new axis so that it is 'aware' of the limits of the primary axis? Coming form a matplotlib background, I suppose the equivalent I am looking for is <code>ax.get_xlim()</code>.</p>
  
  <p><a href="https://i.stack.imgur.com/FWbgk.png" rel="noreferrer"><img src="https://i.stack.imgur.com/FWbgk.png" alt="enter image description here"></a></p>