# Plots with same sized plot areas (not same figure size)

**URL:** <https://discourse.bokeh.org/t/plots-with-same-sized-plot-areas-not-same-figure-size/11456>\
**Category:** Community Support\
**Tags:** figure, axis, bokeh\
**Created:** [April 16, 2024, 9:20am UTC](https://discourse.bokeh.org/t/plots-with-same-sized-plot-areas-not-same-figure-size/11456 "2024-04-16T09:20:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adam1](https://discourse.bokeh.org/user_avatar/discourse.bokeh.org/adam1/32/6689_2.png) [@adam1](https://discourse.bokeh.org/u/adam1)\
**Post date:** [April 16, 2024, 9:20am UTC](https://discourse.bokeh.org/t/plots-with-same-sized-plot-areas-not-same-figure-size/11456/1 "2024-04-16T09:20:13Z")

</div>

I am trying to plots that have the same physical height and width of the plotted area (axes). The problem is that it seems the plot hight and width include axis labels. So, when the values on the y axis differ, say 0 to 100 on one plot and 0 to 10000 on the other, the added width of the label for 10000 causes the plot area to shrink a little horizontally so that it all still fits in.

so does anyone know of a way to have a plot area width and height that is fixed, and the size of the labels (or even a legend) would cause the figure height and width to change, rather than the other way around?

this figure is what i mean  
i added vertical red and blue lines to show that even though these plots have the same settings, the axis width of the upper one is shorter because the y labels are longer. the slight offset makes me physically ill.

 ![image](https://discourse-uploads.bokeh.org/original/2X/d/d655725af8a0a20d6d5b92a17b6b6b0252659543.png)

---

<div class="post-metadata">

**Author:** ![Jonas\_Grave\_Kristens](https://discourse.bokeh.org/user_avatar/discourse.bokeh.org/jonas_grave_kristens/32/6759_2.png) [@Jonas\_Grave\_Kristens](https://discourse.bokeh.org/u/Jonas_Grave_Kristens)\
**Post date:** [April 16, 2024, 5:04pm UTC](https://discourse.bokeh.org/t/plots-with-same-sized-plot-areas-not-same-figure-size/11456/2 "2024-04-16T17:04:14Z")

</div>

@adam1 Not sure why, you have not provided the code that produce what you observe. When I run the code below where I use [`column`](https://docs.bokeh.org/en/latest/docs/user_guide/basic/layouts.html) for layout of the two plots, I do not observe misalignment of the y-axis.

 ![Skærmbillede 2024-04-16 kl. 18.59.40](https://discourse-uploads.bokeh.org/original/2X/e/e42c3a4cdc8f6047b1737385574a35a9888c94c1.png)

If you can not use Bokeh layout options you can adjust [`min_border_left`](https://docs.bokeh.org/en/latest/docs/user_guide/styling/plots.html#border) that covers the width needed.

```auto
from bokeh.io import show
from bokeh.models import ColumnDataSource
from bokeh.plotting import figure
from bokeh.layouts import column

src = ColumnDataSource(data = {
	'x': [1, 2, 3],
	'y1': [10, 23, 16],
	'y2': [13456, 45262, 22222]	
})
p1 = figure(width = 400, height = 300)
p1.scatter(
	x = 'x', y = 'y1',
	marker = 'circle', size = 10,
	color = 'red', source = src
	)

p2 = figure(width = 400, height = 300)
p2.scatter(
	x = 'x', y = 'y2',
	marker = 'circle', size = 10,
	color = 'blue', source = src
	)

show(column([p1, p2]))

```

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads.bokeh.org/original/2X/1/14eb24f9e10e4e9b78e3f10f66c04ffa96446e5a.svg) [@system](https://discourse.bokeh.org/u/system)\
**Post date:** [July 15, 2024, 5:05pm UTC](https://discourse.bokeh.org/t/plots-with-same-sized-plot-areas-not-same-figure-size/11456/3 "2024-07-15T17:05:10Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
