So I have an hbar stack and I want to update the axis dynamically. It works fine when I clear the document and replot, but this prevents me from adding more tabs and interactivity since it refreshes the doc and the view. Will try to upload some sample code tomorrow, but is there anyway to update the figure y_range? I can’t seem to get it to work.
You can just use
plot.y_range.update(start=1, end=2). It’s equivalent to
plot.y_range.start = 1 plot.y_range.end = 2
My axis is categorical
Ah, that’s a crucial detail. It means that
y_range is an instance of
FactorRange. It has the
factors property which you could change:
plot.y_range.factors = ['a', 'b'].