I’m trying to modify a plot width & height from a Jupyter notebook.
According to the ‘push_notebook’ documentation, and as far as I understand it properly, everything changed since the last call to ‘show’ or ‘push_notebook’ is supposed to be updated by a call to ‘push_notebook’. I consequently, don’t understand why the following doesn’t work:
kwargs = {}
kwargs[‘title’] = “test”
kwargs[‘plot_width’] = 950
kwargs[‘plot_height’] = 250
plt = figure(**kwargs,)
hdl = show(plt, notebook_handle=True)
``
plt.plot_height = 400
plt.plot_width = 400
push_notebook(handle=hdl)
``
The plot area remains the same (i.e. the initial one).
My guess is that these two properties in particular are not wired up to be responsive to any changes after initialization. The layout system is quite complicated, and many aspects can only be computed on the BokehJS side of things, necessitating some compromises. And that's just in the single plot case, if you have a plot in a layout and just want to resize one thing it's not necessarily always clear even in principle what the "right" thing to do to adjust the overall layout is. It's possible that something could be done to make the plot sizes dynamically updatable (maybe at least in some specific cases, like "single plot") but that would be new development, so the first step would be a feature request on GitHub.
Thanks,
Bryan
···
On Jan 11, 2017, at 2:49 AM, Nicolas Leclercq <[email protected]> wrote:
Hi all,
I'm trying to modify a plot width & height from a Jupyter notebook.
According to the 'push_notebook' documentation, and as far as I understand it properly, everything changed since the last call to 'show' or 'push_notebook' is supposed to be updated by a call to 'push_notebook'. I consequently, don't understand why the following doesn't work: