Bokeh legend scroll - python

When generating a bokeh plot using python with many categories, for instance a bar plot, the legend will not fit entirely in the screen and it is not possible to scroll.
Is there a way to scroll a legend?
Thank you

There is no scroll option for the legend.
Some suggestions from this answer:
The legend is drawn on the same canvas as the plot, so you could show more of your legend by increasing the plot size.
You could decrease the legend font size with p.legend.label_text_font_size = "8px"

Related

How to change legend size when you have two of them, i.e two pie plots in one figure

games.loc[:,['Nofcolumn1', 'Nofcolumns2', 'Nofcolumns3']].groupby('Nofcolumns3').sum().plot(kind='pie', subplots=True, figsize=(16,12))
As you can see, I am plotting two pie charts in one figure, but can't change size of each legend separately.
When I try the following:
plt.legend(prop{'size': 10})
Only the second legend gets resized. I am new to data visualization, sorry if the question is too simple.

How to prevent matplotlib figure is resized due to outside legend

I got a general issue with a plotting function using matplotlib.pyplot. I plot a set of stacked horizontal bar charts, the goal is to produce congruent figures, the embedded grid is suppose to fit, but the image gets resized, when I change the input data. However, if i plot the image without the legend, I receive the desired output. But I do want to include a legend of course !
The formatting lines I include are the following:
figure size
fig,ax = plt.subplots(1,figsize=(20,9))
grid definition
plt.grid(color="darkgrey")
legend defintion
ax.legend([handles[i] for i in order], [labels[i] for i in order],
bbox_to_anchor=((0.5, -0.15)), loc="upper center",fontsize="medium",ncol=5)
tight layout
fig.tight_layout()
store the image
fig.savefig(str(figname)+'.jpg',bbox_inches='tight',quality=95,dpi=300)

Change legend marker size for Plotly scatter plot (bubble chart) in Python

As I started modifying the Categorical Bubble Charts example found here, the size of the markers in the legend became so small they could not be seen.
Is there a way to control the legend marker size without changing the marker size in the plot?
The comment by anbjork found here gave me a great workaround:
fig.update_layout(legend= {'itemsizing': 'constant'})

How to add subplot in python use matplotlib

I have a canvas to draw my figure in python and matplotlib
i want to add plot to that canvas dynamically
in fact i want to area of convas share bitwen all child plot
for example if canvas have only one plot, all area of canvas alocated to this and if add another plot to that canvas all area of canvas shared bitwen this tow plot and ...
Note: I do not know in advance how many plot(charts) I am going to add to canvas
thank you

Vertical scroll bar on horizontal bar plot

How can I add vertical scroll bar on horizontal bar chart on plotly? (other open source libraries are also welcome)
I have thousands of horizontal bars in my chart, so I want to scroll up/down on this with a good design.
At the end I want to achieve a plot like below;

Categories

Resources