如何在 pandas-bokeh 中旋转 xticks

How to rotate xticks in pandas-bokeh

.plot_bokeh(kind='bar',x='Weather',stacked=True,***xticks=?????????***)

文件 ~\Anaconda3\lib\site-packages\pandas_bokeh\plot.py:658,在 plot(df_in, x, y, kind, figsize, use_index, title, legend, logx, logy, xlabel, ylabel, xticks, yticks, xlim, ylim, fontsize_title, fontsize_label, fontsize_ticks, fontsize_legend、颜色、颜色图、类别、histogram_type、堆叠、权重、分箱、范数、累积、show_average、plot_data_points、plot_data_points_size、number_format , disable_scientific_axes, show_figure, return_html, 平移, 缩放, sizing_mode, toolbar_location, hovertool, hovertool_string, rangetool, vertical_xlabel , x_axis_location, webgl, reuse_plot, **kwargs)

我正在使用散景,但似乎无法弄清楚为什么我不能将轴上的 xlabels 旋转 90 degrees/vertical。我可以看到 xticks 可用所以有人可以帮忙吗?谢谢

您可以通过设置vertical_xlabel=True启用垂直标签。请参阅示例 histogram.

作为参考
import pandas as pd
import pandas_bokeh
pandas_bokeh.output_notebook()

df = pd.DataFrame({'x':[1,2,3,4,5], 'y':[3,4,2,1,3]})
df.plot_bokeh(vertical_xlabel=True)