I'm just starting to use Bokeh. Below I create some arguments that I use for rect figure .
x_length = var_results.index * 5.5
Multiplying the index by 5.5 gave me more space between the labels.
names = var_results.Feature.tolist() y_length = var_results.Variance y_center = var_results.Variance/2
var_results
is a Pandas framework that has a typical, sequential, non-repeating index. var_results
also has a Features
column, which is a string of non-duplicate names, and finally has a Variance
column, which is a dtype float.
r = figure(x_range = names, y_range = (-0.05,.3), active_scroll = 'wheel_zoom', x_axis_label = 'Features', y_axis_label = 'Variance') r.rect(x_length, y_center, width=1, height=y_length, color = "#ff1200") output_notebook() show(r)
I essentially make a histogram with rectangles. Bokeh seems very customizable. But my schedule looks rough around the edges, literally.
As you can see, there is an ugly spot just below the chart and above the βFeaturesβ name. These are the names of the labels (technically the names of the rectangles). How do I create space and possibly rotate the labels 45 degrees so they are readable and not just overlapping clutter?
source share