☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Y-ticks/y-range error while changing from 2-dimensional x_range-factors to 1-dimensional

Community Support
Higem
Higem

Hello!

I need your help once again :slight_smile:

There’s some strange behaviour of y-ticks while changing from 2-dimensional x_range-factors to 1-dimensional.
The code is here - from bokeh.io import showfrom bokeh.layouts import column, rowfrom bokeh.mod - Pastebin.com.

It works good when you click the 1st button (1d-factors) and then the 2nd one (2d-factors), but if you click on the 1st button again, you’ll see that y-ticks dissappeared and in console.log there error “TypeError: t is undefined” will appear, on the next iteration you’ll see an additional error.
This can be seen here - https://gifyu.com/image/dJuG.

Could you help me please with that?
Thank you!

⌁   Link to post
p-himik
p-himik

Replace lines like fig.x_range.factors = new FactorRange(...); with fix.x_range = new FactorRange(...).
Well, the exception is gone with that change, but now the plot is just empty, except for the top left corner. Judging by the Bokeh code, it doesn’t want you to change the ranges at all. You might as well recreate the whole plot then.

⌁   Link to post
Higem
Higem

Maybe it would be cheaper to have 2 completely overlapped figures (one with 1d-range and the 2nd with 2d-range) and hide/show them when it’s neccessary.

Thank you very much!

⌁   Link to post

End of archived discussion · Replies are disabled