散景:空 canvas 的不稳定行为,数据几乎相同
bokeh: erratic behaviour of empty canvas, with pretty much identical data
我有一个关于散景的奇怪问题,用于可视化数据中的线条。我提取了出现问题的数据并将其缩小到以下示例:
import matplotlib.pyplot as plt
from bokeh.plotting import figure, output_file, show
fig = figure(width=1200, height=300, x_axis_type="datetime")
fig.line(x=['1511550670', '1511550995', '1511551093', '1511551108'],
y=[-99.99994912, -99.99995743, -99.99995395, -99.99995494],
color='blue', legend='no line?')
fig.line(x=['1511550670', '1511550995', '1511551093', '1511551108'],
y=[-0.16839438, -0.04496412, 0.14891187, 0.12161594],
color='red', legend='line!')
output_file("overall.html")
show(fig)
两个数据集对我来说都很好,但 canvas 中只打印了一个。
谁能帮我弄清楚青蛙是怎么回事?
如果将时间戳作为字符串提供的用法在某些用例中有效,那纯属无意和偶然。它没有在任何地方记录或支持。传递实际数字时间戳按预期工作:
from bokeh.plotting import figure, output_file, show
fig = figure(width=1200, height=300, x_axis_type="datetime")
fig.line(x=[1511550670, 1511550995, 1511551093, 1511551108],
y=[-99.99994912, -99.99995743, -99.99995395, -99.99995494],
color='blue', legend='no line?')
fig.line(x=[1511550670, 1511550995, 1511551093, 1511551108],
y=[-0.16839438, -0.04496412, 0.14891187, 0.12161594],
color='red', legend='line!')
output_file("overall.html")
show(fig)
除了上述原始时间戳之外,来自 python、pandas、numpy 等的任何典型日期时间值也可以使用。
我有一个关于散景的奇怪问题,用于可视化数据中的线条。我提取了出现问题的数据并将其缩小到以下示例:
import matplotlib.pyplot as plt
from bokeh.plotting import figure, output_file, show
fig = figure(width=1200, height=300, x_axis_type="datetime")
fig.line(x=['1511550670', '1511550995', '1511551093', '1511551108'],
y=[-99.99994912, -99.99995743, -99.99995395, -99.99995494],
color='blue', legend='no line?')
fig.line(x=['1511550670', '1511550995', '1511551093', '1511551108'],
y=[-0.16839438, -0.04496412, 0.14891187, 0.12161594],
color='red', legend='line!')
output_file("overall.html")
show(fig)
两个数据集对我来说都很好,但 canvas 中只打印了一个。 谁能帮我弄清楚青蛙是怎么回事?
如果将时间戳作为字符串提供的用法在某些用例中有效,那纯属无意和偶然。它没有在任何地方记录或支持。传递实际数字时间戳按预期工作:
from bokeh.plotting import figure, output_file, show
fig = figure(width=1200, height=300, x_axis_type="datetime")
fig.line(x=[1511550670, 1511550995, 1511551093, 1511551108],
y=[-99.99994912, -99.99995743, -99.99995395, -99.99995494],
color='blue', legend='no line?')
fig.line(x=[1511550670, 1511550995, 1511551093, 1511551108],
y=[-0.16839438, -0.04496412, 0.14891187, 0.12161594],
color='red', legend='line!')
output_file("overall.html")
show(fig)
除了上述原始时间戳之外,来自 python、pandas、numpy 等的任何典型日期时间值也可以使用。