.plot_bokeh(kind='bar',x='Weather',stacked=True,***xticks=?????????***)
File ~\Anaconda3\lib\site-packages\pandas_bokeh\plot.py:658, in 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, color, colormap, category, histogram_type, stacked, weights, bins, normed, cumulative, show_average, plot_data_points, plot_data_points_size, number_format, disable_scientific_axes, show_figure, return_html, panning, zooming, sizing_mode, toolbar_location, hovertool, hovertool_string, rangetool, vertical_xlabel, x_axis_location, webgl, reuse_plot, **kwargs)
i am working with bokeh and cant seem to figure out why i cant rotate the xlabels on the axes by 90 degrees/vertical. i can see xticks are available so can someone help with this please? thank you
CodePudding user response:
You can enable vertical labels by setting vertical_xlabel=True
. See as reference the example 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)