Bokeh plot not displaying correctly

非 Y 不嫁゛ 提交于 2019-12-24 17:18:38

问题


I am using Bokeh plots in a couple of my Django views. The plots are rendering the data correctly, but they are weirdly skewed when rendered on my page.

The html looks like this:

<div class="container">
  <h4 class="text-center"> Resource Usage </h4>
  {% for label,div in divs.items %}
    <h3 class="text-center"><u> Satellite {{ label }}</u></h3>
    </br>
    <div class="container">
      {{ div | safe }}
    </div>
  {% endfor %}
</div>
</div>
{{ script | safe }}

Where the div code looks like this:

'<div class="plotdiv" id="b367d397-25cc-4fa2-9b92-e0d0a8f155fa"></div>'

I'm just trying Bokeh's base example here but am getting something that looks like this:

Can anyone tell me why that offset is happening?


回答1:


After a discussion on Bokeh's Google group, the problem was that I applied CSS styling to tables that I have elsewhere in my page and that was affecting how the Bokeh plots were being displayed. Once I removed the table styling the plots displayed correctly.



来源:https://stackoverflow.com/questions/32833193/bokeh-plot-not-displaying-correctly

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!