gpt4 book ai didi

python - 如何为 Holoview 曲线启用网格线

转载 作者:行者123 更新时间:2023-11-30 22:28:08 26 4
gpt4 key购买 nike

当我显示 Holoview 图时,没有网格线。我正在努力寻找如何打开它们。

Graph without gridlines

代码片段:

renderer = hv.renderer('bokeh').instance(mode='server')



plot = hv.Curve(
data
, kdims=['observation_time']
, vdims=vdims
, extents=(pd.datetime(year=2000, month=1, day=1, hour=0, minute=0, second=0), None, pd.datetime(year=2000, month=1, day=1+days, hour=0, minute=0, second=0), None)
, label=vdims_str + " "
)(plot=dict(width=WIDTH))

...

plot1 = _get_curve(date_index=date_index, vdims_str='total_a')
plot2 = _get_curve(date_index=date_index, vdims_str='total_b')
plot3 = _get_curve(date_index=date_index, vdims_str='total_c')

plots = plot1 * plot2 * plot3

最佳答案

我解决了这个问题。需要 show_grid=True

    plot = hv.Curve(
data
, kdims=['observation_time']
, vdims=vdims
, extents=(pd.datetime(year=2000, month=1, day=1, hour=0, minute=0, second=0), None, pd.datetime(year=2000, month=1, day=1+days, hour=0, minute=0, second=0), None)
, label=vdims_str + " "
)(plot=dict(width=WIDTH, show_grid=True))

关于python - 如何为 Holoview 曲线启用网格线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46713973/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com