- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
/Library/Python/2.7/site-packages/bokeh/properties.py:363: DeprecationWarning: Setting a fixed font size value as a string 'text_font_size' is deprecated, set with value('text_font_size') or ['text_font_size'] instead super(HasProps, self).setattr(name, value)
运行此代码时收到此警告:
myfig.text(x=[i], y=[.5], text=["abc"], text_align='center', text_font_size=['10pt'], text_color='#CDEFCC')
你能帮忙吗?我该如何摆脱它?
最佳答案
看起来这是 Bokeh 的一个活跃错误。有一个GitHub issue about it 。以下是响应的片段:
Hi @marcomayer looks like you found a little bug. The "list" syntax may go away anyway. You can set values like this, however:
from bokeh.properties import value
p.axis.major_label_text_font_size=value("8pt")
For a little context, the reason for the deprecation is that string values for data specs are, in every other context, interpreted as column data source column names. This changes brings consistency to the interface.
关于python - Bokeh 弃用警告 : Setting a fixed font size value as a string 'text_font_size' is deprecated,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31486415/
我是一名优秀的程序员,十分优秀!