Hey everyone,
I just started using bokeh. I have two plots, each of them has it’s own ResizeTool.
I was trying to link those ResizeTools, so that if I resize one of the plots the other one is resized too. I already tried to get the ResizeTool from the first plot and add it to the tools of the secound plot, but this approached faild, (because each tool just can belong to one plot?).
Is there a way to resize both plots at once whitout using the bokeh server?
Have you tried using the same datasource for both of them? That has generally worked for me.
···
On Tuesday, September 15, 2015 at 7:36:58 AM UTC-4, [email protected] wrote:
Hey everyone,
I just started using bokeh. I have two plots, each of them has it’s own ResizeTool.
I was trying to link those ResizeTools, so that if I resize one of the plots the other one is resized too. I already tried to get the ResizeTool from the first plot and add it to the tools of the secound plot, but this approached faild, (because each tool just can belong to one plot?).
Is there a way to resize both plots at once whitout using the bokeh server?
Hey,
thanks for your reply, but unfortunately this didn’t work out. The plots sizes are still not ‘linked’.
I hope anyone has solution for this.
···
Am Dienstag, 15. September 2015 13:36:58 UTC+2 schrieb [email protected]:
Hey everyone,
I just started using bokeh. I have two plots, each of them has it’s own ResizeTool.
I was trying to link those ResizeTools, so that if I resize one of the plots the other one is resized too. I already tried to get the ResizeTool from the first plot and add it to the tools of the secound plot, but this approached faild, (because each tool just can belong to one plot?).
Is there a way to resize both plots at once whitout using the bokeh server?
Hey,
thanks for your reply, but unfortunately this didn't work out. The plots sizes are still not 'linked'.
I hope anyone has solution for this.
Am Dienstag, 15. September 2015 13:36:58 UTC+2 schrieb p4n...@gmail.com:
Hey everyone,
I just started using bokeh. I have two plots, each of them has it's own ResizeTool.
I was trying to link those ResizeTools, so that if I resize one of the plots the other one is resized too. I already tried to get the ResizeTool from the first plot and add it to the tools of the secound plot, but this approached faild, (because each tool just can belong to one plot?).
Is there a way to resize both plots at once whitout using the bokeh server?
Hi Bryan,
thanks for your reply. I’ll consider to make a feature request.
If I embed a plot into an html file, is it than possible to adjust the width of the plot to fill the whole div, if the width of the div is set 100%?
I think this qould be a possible workaround for my usage.
Thanks for all your replies
Panzki
···
Am Dienstag, 15. September 2015 13:36:58 UTC+2 schrieb [email protected]:
Hey everyone,
I just started using bokeh. I have two plots, each of them has it’s own ResizeTool.
I was trying to link those ResizeTools, so that if I resize one of the plots the other one is resized too. I already tried to get the ResizeTool from the first plot and add it to the tools of the secound plot, but this approached faild, (because each tool just can belong to one plot?).
Is there a way to resize both plots at once whitout using the bokeh server?
Hi Bryan,
thanks for your reply. I'll consider to make a feature request.
If I embed a plot into an html file, is it than possible to adjust the width of the plot to fill the whole div, if the width of the div is set 100%?
I think this qould be a possible workaround for my usage.
Thanks for all your replies
Panzki
Am Dienstag, 15. September 2015 13:36:58 UTC+2 schrieb p4n...@gmail.com:
Hey everyone,
I just started using bokeh. I have two plots, each of them has it's own ResizeTool.
I was trying to link those ResizeTools, so that if I resize one of the plots the other one is resized too. I already tried to get the ResizeTool from the first plot and add it to the tools of the secound plot, but this approached faild, (because each tool just can belong to one plot?).
Is there a way to resize both plots at once whitout using the bokeh server?
So you should be able to attach a similar piece of js to the one above that updates the size of plot A based on the resize of B or visa versa.
The responsive work I’m doing at the moment will hopefully make the simple case of responsive much easier. I hadn’t considered this use case, but I will - thanks!
Sincerely,
Sarah Bird
···
On Tue, Sep 15, 2015 at 3:48 PM, Bryan Van de Ven [email protected] wrote:
There is work underway towards “responsive” plots, that may make it into the 0.10 release at the end of the month.
thanks for your reply. I’ll consider to make a feature request.
If I embed a plot into an html file, is it than possible to adjust the width of the plot to fill the whole div, if the width of the div is set 100%?
I think this qould be a possible workaround for my usage.
Thanks for all your replies
Panzki
Am Dienstag, 15. September 2015 13:36:58 UTC+2 schrieb [email protected]:
Hey everyone,
I just started using bokeh. I have two plots, each of them has it’s own ResizeTool.
I was trying to link those ResizeTools, so that if I resize one of the plots the other one is resized too. I already tried to get the ResizeTool from the first plot and add it to the tools of the secound plot, but this approached faild, (because each tool just can belong to one plot?).
Is there a way to resize both plots at once whitout using the bokeh server?
Thanks for any replies in advance
Panzki
–
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].
Hi Sarah,
thanks for your reply, I really appreciate your efforts.
I’ll try to wrap my head arround that javascript code, alltough my javascript skills aren’t the best. Maybe I can figure this out before the 0.10 release, if not I’ll have a good reason to check out the new features.
Hi Sarah,
thanks for your reply, I really appreciate your efforts.
I’ll try to wrap my head arround that javascript code, alltough my javascript skills aren’t the best. Maybe I can figure this out before the 0.10 release, if not I’ll have a good reason to check out the new features.
Kind regards
Panzki
–
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].
Hi Sarah,
first I want to thank you for your time, effort and kindness. I already tinkered arround with the js you provided with the goal of resizing my plots to the complet width of the window.
This are the first lines of javascript I’ve written, so chances are good that they contain some bullshit. For me it seems like, that the js is loaded and executed, because the console.log() statement from line 35 is executed. (I can see the message in the firefox/chrome console)
The problem is that the plots are not resized. One guess of mine is that I used a wrong modell id (or other id). I replaced the placeholders for the ids in the template by hand with the ids I found in my html.
I hope this information will help to find a solution.
Yes. The ids are not static. They are generated by bokeh on the fly. I believe I have an issue somewhere about overriding this that would make this kind of thing easier.
For the div id - you can probably get away without this, just wrap your chart in your own div and then you can manually target this to get the current width/height, for your desired width, you can just use the window.width()
Hi Sarah,
first I want to thank you for your time, effort and kindness. I already tinkered arround with the js you provided with the goal of resizing my plots to the complet width of the window.
This are the first lines of javascript I’ve written, so chances are good that they contain some bullshit. For me it seems like, that the js is loaded and executed, because the console.log() statement from line 35 is executed. (I can see the message in the firefox/chrome console)
The problem is that the plots are not resized. One guess of mine is that I used a wrong modell id (or other id). I replaced the placeholders for the ids in the template by hand with the ids I found in my html.
I hope this information will help to find a solution.
-Panzki
–
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].
Hey,
I got it! I implemented the resizing for a single plot with a hardcoded modell id. The links remain the same (demo site, js file).
Tomorrow I’ll adapt the script to deal with my tab plot and template, so I don’t have to ente the modell id by hand.
When I’m done with this I’ll maybe try to link the ResizeTools of the two plots using javascript.
Today I continued working on my problem, but unfortunately I got stuck.
I was able two resize one/two plots according to the window width, by rendering the js into a template like Sarah did here. However I’m still unable to deal with my Tab (widget?). My Tab widget contains to Panel widget as children of which each contains a plot. These are the plots I want to resize, but I’m unable to get access to them (or there models?).
When I embed the Tab widget into my html I get only the model id of the tab, but I cant resize the plots with this id.
Can anyone give me a hint or provide more documentation on how I can resize the plots inside the panels of the tab widget?
Today I continued working on my problem, but unfortunately I got stuck.
I was able two resize one/two plots according to the window width, by rendering the js into a template like Sarah did here. However I’m still unable to deal with my Tab (widget?). My Tab widget contains to Panel widget as children of which each contains a plot. These are the plots I want to resize, but I’m unable to get access to them (or there models?).
When I embed the Tab widget into my html I get only the model id of the tab, but I cant resize the plots with this id.
Can anyone give me a hint or provide more documentation on how I can resize the plots inside the panels of the tab widget?
Today I continued working on my problem, but unfortunately I got stuck.
I was able two resize one/two plots according to the window width, by rendering the js into a template like Sarah did here. However I’m still unable to deal with my Tab (widget?). My Tab widget contains to Panel widget as children of which each contains a plot. These are the plots I want to resize, but I’m unable to get access to them (or there models?).
When I embed the Tab widget into my html I get only the model id of the tab, but I cant resize the plots with this id.
Can anyone give me a hint or provide more documentation on how I can resize the plots inside the panels of the tab widget?
Hey,
sorry that my answer took so long but I’m really busy this weekend.
First of all I fixed my problem with the resizing of the tap plot. Here’s my solution:
//this is the tab widget
bokeh_obj = Bokeh.index[“{{ plot_dict[‘modelid’]}}”];
for (plot_model_id in bokeh_obj.views){
//here you can access the plot models
bokeh_obj.views[plot_model_id].model.set(‘plot_width’, new_width - 40);
bokeh_obj.views[plot_model_id].model.set(‘plot_height’, new_height);
}
``
The key to get access to the plot models in the Tab widget is to access them via the views property @Sarah:
Furthermore I downloaded your branch with the new responsive feature and build it. The example you made just works fine for, but unfortunately I did not have the time to test the new feature on my own with a custom example. However I’m looking forward to do so in the next few days.
-Panzki
···
Am Dienstag, 15. September 2015 13:36:58 UTC+2 schrieb [email protected]:
Hey everyone,
I just started using bokeh. I have two plots, each of them has it’s own ResizeTool.
I was trying to link those ResizeTools, so that if I resize one of the plots the other one is resized too. I already tried to get the ResizeTool from the first plot and add it to the tools of the secound plot, but this approached faild, (because each tool just can belong to one plot?).
Is there a way to resize both plots at once whitout using the bokeh server?