Ze, in case you’re interested, here’s a snippet of a chat nick and i had
Nick: the conclusion I came to is the only short term fix was to
pre-create them all, add them to renderers, and set visibility on only
the one you want to see
Nick: this still required a change, but it is a one line change in some
of the layout functionality in bokehjs
Me: so you had your own build of bokehjs
Nick: yeah, I’ve been working through it seeing if it was something
simple, but I couldn’t find it if so
Nick: for being able to add/remove them at will wasn’t simple I mean,
the visibility method isn’t too bad
Sorry this isn’t super easy right now.
The issue that nick referenced is probably the best place to follow.
On 1/20/16 7:31 AM, Nick Roth wrote:
I have an open issue related to this, though it is using Plot not Figure.
https://github.com/bokeh/bokeh/issues/3626
On Wednesday, January 20, 2016 at 3:17:38 AM UTC-6, Zé Silva wrote:
Hi Sarah, thanks for the reply. I tried adding the following on the
update() function
if x_axis.value == 'Product':
p.xaxis = CategoricalAxis()
and I got an AttributeError: unexpected attribute 'xaxis' to Figure. However xaxis shows up when running dir(p) inside the update().
Any further suggestions?
On Wednesday, 20 January 2016 08:23:28 UTC+1, Sarah Bird wrote:
Hi Jose,
That notebook is just changing the data, so wouldn't address
your needs.
Given that you're modifying the IMDB example you're using the
server, I
would try something like this:
in the appropriate change method set the new axis `p.xaxis =
DatetimeAxis()` or `p.xaxis = CategoricalAxis()`
I wouldn't use the x_axis_type as that would mean creating a new
Figure.
I don't know if this will actually work, but that's what I'd try.
Bird
On 1/18/16 12:59 AM, Zé Silva wrote:
> First of all, congratulations on the awesome work being done
with bokeh.
> My question is:
>
> How can I change the x_axis_type through some Select? To be more
> specific I am trying to modify the IMDB demo example
> <[http://demo.bokehplots.com/apps/movies](http://demo.bokehplots.com/apps/movies)
<[http://demo.bokehplots.com/apps/movies](http://demo.bokehplots.com/apps/movies)>> and would like to add
some
> Categorical and Datetime data to both x_axis and y_axis
selectors. In
> that specific example, that would be equivalent to add Genre
and Year,
> which would imply changing the axis type to categories and
datetime,
> respectively. This
>
<[http://nbviewer.jupyter.org/github/birdsarah/bokeh-miscellany/blob/master/tests/1017_select_widget_categorical_axis.ipynb](http://nbviewer.jupyter.org/github/birdsarah/bokeh-miscellany/blob/master/tests/1017_select_widget_categorical_axis.ipynb)
<[http://nbviewer.jupyter.org/github/birdsarah/bokeh-miscellany/blob/master/tests/1017_select_widget_categorical_axis.ipynb](http://nbviewer.jupyter.org/github/birdsarah/bokeh-miscellany/blob/master/tests/1017_select_widget_categorical_axis.ipynb)>>
notebook
> didn't help much.
>
> Thanks,
>
> Jose
>
> --
> You received this message because you are subscribed to the
Google
> Groups "Bokeh Discussion - Public" group.
> To unsubscribe from this group and stop receiving emails from
it, send
> an email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> To view this discussion on the web visit
>
[https://groups.google.com/a/continuum.io/d/msgid/bokeh/5113cac6-bf27-47b3-b80a-2b6d140d50e2%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/5113cac6-bf27-47b3-b80a-2b6d140d50e2%40continuum.io)
<[https://groups.google.com/a/continuum.io/d/msgid/bokeh/5113cac6-bf27-47b3-b80a-2b6d140d50e2%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/5113cac6-bf27-47b3-b80a-2b6d140d50e2%40continuum.io)>
>
<[https://groups.google.com/a/continuum.io/d/msgid/bokeh/5113cac6-bf27-47b3-b80a-2b6d140d50e2%40continuum.io?utm_medium=email&utm_source=footer](https://groups.google.com/a/continuum.io/d/msgid/bokeh/5113cac6-bf27-47b3-b80a-2b6d140d50e2%40continuum.io?utm_medium=email&utm_source=footer)
<[https://groups.google.com/a/continuum.io/d/msgid/bokeh/5113cac6-bf27-47b3-b80a-2b6d140d50e2%40continuum.io?utm_medium=email&utm_source=footer](https://groups.google.com/a/continuum.io/d/msgid/bokeh/5113cac6-bf27-47b3-b80a-2b6d140d50e2%40continuum.io?utm_medium=email&utm_source=footer)>>.
> For more options, visit
[https://groups.google.com/a/continuum.io/d/optout](https://groups.google.com/a/continuum.io/d/optout)
<[https://groups.google.com/a/continuum.io/d/optout](https://groups.google.com/a/continuum.io/d/optout)>.
–
You received this message because you are subscribed to the Google
Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
mailto:[email protected].
To post to this group, send email to [email protected]
mailto:[email protected].
To view this discussion on the web visit
https://groups.google.com/a/continuum.io/d/msgid/bokeh/c5fdf139-33dd-4f1b-a98f-06055dc5ebf7%40continuum.io
<https://groups.google.com/a/continuum.io/d/msgid/bokeh/c5fdf139-33dd-4f1b-a98f-06055dc5ebf7%40continuum.io?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/569FD0A7.7060908%40gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.