While the below two graphs are rendered in the same container div
, it seems the axis labeling (amongst the other things???) is causing the actual render area to be smaller on the top plot
When the axis is modified this somewhat corrects:
Ultimately I'm wondering if its possible to make the plot areas be exactly the same width (regardless of axis titles/labels/etc)?
Here's the relevant code that goes with the above explanation:
...
html.Div([
html.Div(
id="row-1-2",
children=[
html.Div(
[
dcc.Graph(
id='plot1',
style={"height": "20vh", "margin": "0px"},
),
],
className="twelve columns",
)
],
className="row",
style={"margin": "0px"},
),
html.Div(
id="row-2-2",
children=[
html.Div(
[
dcc.Graph(
id='plot2',
style={"height": "20vh", "margin": "0px"},
),
],
className="twelve columns",
)
],
className="row",
style={"margin": "0px"},
),
], className="three columns"),
...
Try to use CSS property width to render same width graph sizes like -
html.Div([
html.Div(
id="row-1-2",
children=[
html.Div(
[
dcc.Graph(
id='plot1',
style={"height": "20vh", "width":"80vw", margin": "0px"},
),
],
className="twelve columns",
)
],
className="row",
style={"margin": "0px"},
),
html.Div(
id="row-2-2",
children=[
html.Div(
[
dcc.Graph(
id='plot2',
style={"height": "20vh", "width":"80vw", "margin": "0px"},
),
],
className="twelve columns",
)
],
className="row",
style={"margin": "0px"},
),
], className="three columns"),
...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.