擅长:python、mysql、java
<p>我是用这个库得到的:<a href="https://mpld3.github.io/quickstart.html" rel="nofollow noreferrer">https://mpld3.github.io/quickstart.html</a></p>
<pre><code>fig = image_compare.get_images_figure()
html = mpld3.fig_to_html(fig)
return render(request, 'products/blank.html', {'html' : html})
</code></pre>
<p>以及空白.html看起来像这样:</p>
<pre><code>{% autoescape off %}{{ html }}{% endautoescape %}
</code></pre>