gridplot shared borders

How does gridplot ‘share’ the border properties between plot elements?

if I have a layout like this:

from bokeh.io import show
from bokeh.plotting import figure
from bokeh.models import gridplot

fig1 = figure(plot_width=700,plot_height=200)
fig2 = figrue(plot_width=350,plot_height=350)
fig3 = figrue(plot_width=350,plot_height=350)

grid = gridplot([[fig1],[fig2,fig3]])

show(grid)

``

It looks fine, everything is the size it should be. Then if I do:

fig1.min_border_left=80

``

This applies the border to the canvas with figure 1, and also to the canvas with figure 2, but not the one with figure 3. To make them look the same you have to add:

fig3.min_border_left=80

``

Similarly if I do:

fig1.min_border_right=80

``

It applies the border to the canvas of figure 1, and also to the one with figure 3, but not to the one with figure 2. To make them both look the same you have to add:

fig2.min_border_right=80

``

Finally to have fig2 and fig3 look like squares again, you need to have the same padding bottom+top as left+right, so one could do:

fig2.min_border_bottom = 160

``

Which applies the same padding to the canvas with figure 3.

Is there documentation on how Row and Column propagate properties between their children?

Is there documentation on how Row and Column propagate properties between their children?

AFAIK there is not any such feature, please feel free to open a GH feature request to discuss.

Bryan

···

On Sep 1, 2017, at 09:11, Sébastien Roche <[email protected]> wrote:

How does gridplot 'share' the border properties between plot elements?

if I have a layout like this:
from bokeh.io import show
from bokeh.plotting import figure
from bokeh.models import gridplot

fig1 = figure(plot_width=700,plot_height=200)
fig2 = figrue(plot_width=350,plot_height=350)
fig3 = figrue(plot_width=350,plot_height=350)

grid = gridplot([[fig1],[fig2,fig3]])

show(grid)

It looks fine, everything is the size it should be. Then if I do:

fig1.min_border_left=80

This applies the border to the canvas with figure 1, and also to the canvas with figure 2, but not the one with figure 3. To make them look the same you have to add:

fig3.min_border_left=80

Similarly if I do:
fig1.min_border_right=80

It applies the border to the canvas of figure 1, and also to the one with figure 3, but not to the one with figure 2. To make them both look the same you have to add:
fig2.min_border_right=80

Finally to have fig2 and fig3 look like squares again, you need to have the same padding bottom+top as left+right, so one could do:
fig2.min_border_bottom = 160
Which applies the same padding to the canvas with figure 3.

Is there documentation on how Row and Column propagate properties between their children?

--
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/088ba750-a02d-4455-baee-384f997dfb50%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Not such feature as no documentation or as no shared children properties?

It definitely looks like in a Column layout with Rows, the min_border_left/right of the Nth canvas in a Row is shared to the Nth canvas of all other Rows (and it just keeps the maximum if several Nth canvas min_border_left/right are set).

And in a Row the min_border_bottom/top will be shared to all the canvases in the Row

Not such feature as no documentation or as no shared children properties?

I mean there is not feature or API to share properties among children in a layout.

It definitely looks like in a Column layout with Rows, the min_border_left/right of the Nth canvas in a Row is shared to the Nth canvas of all other Rows (and it just keeps the maximum if several Nth canvas min_border_left/right are set).

Bokeh works to line up axes in rows and columns. If you increase the padding in one plot in a column, bokeh will attempt to make the other vertical axes in that column line up nicely automatically. My impressions is that this behavior covers a subset of what you are wanting, without needing to explicitly share any properties at all. But if you need more control, then currently any properties properties will have to be set explicitly on each plot. As I said, a feature request on GH it make this easier or simpler would be the best place to discuss further.

Thanks,

Bryan

···

On Sep 1, 2017, at 10:25, Sébastien Roche <[email protected]> wrote:

And in a Row the min_border_bottom/top will be shared to all the canvases in the Row

--
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/4a3a0404-b5e0-4d07-a2f0-5564d6dbf3a5%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.