Bokeh's to_bokeh() ignores legend from matplotlib
<p>When converting a matplotlib plot into a bokeh html plot, I see that the legend in the matplotlib plot does not appear in the bokeh html plot. Below is an example. How can I get the legend to show up in bokeh? Thanks.</p>

<pre><code>import matplotlib.pyplot as plt
from bokeh.plotting import figure, show, output_file, save
from bokeh.mpl import to_bokeh

if __name__ == '__main__':
    legend = ['x^2', '2x'] 
    fig = plt.figure()
    ax = fig.add_subplot(111)
    plt.plot(range(10), [x*x for x in range(10)], '-o')
    plt.plot(range(10), [2*x for x in range(10)], '-o')
    plt.legend(legend, loc='upper left')
    plt.show()
    bk = to_bokeh(fig)
    show(bk
</code></pre>

<p>)</p>

<p>Bokeh's MPL compat capability is based on an experimental third-party library that is no longer actively maintained. The <code>to_bokeh</code> functionality is provided as-is, and with the explicit expectation that it currently provides only partial coverage. More comprehensive compatibility will depend on the implementation of <a href="https://github.com/matplotlib/matplotlib/wiki/MEP25" rel="nofollow">Matplotlib Enhancement Proposal 25</a> which would provide a stable and robust JSON serialization protocol for libraries like Bokeh to be able to interoperate with it. No work will be done on Bokeh's MPL compat until or if MEP25 is implemented.  However, there has been no significant movement on MEP 25 in two years, so my strong recommendation, if you are looking to take advantage of Bokeh's features, is to use native Bokeh APIs such as <a href="http://bokeh.pydata.org/en/0.12.1/docs/user_guide/plotting.html" rel="nofollow"><code>bokeh.plotting</code></a> directly, and to not rely on <code>to_bokeh</code> for anything serious. </p>

python matplotlib bokeh