You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i've been trying to squeeze a table (on the left) and a map (on the right), having the latter pushed all the way to the right. fig-align seems to be overridden by something else, as the code with or without it renders exactly the same.
also playing with the layout of the page does not seem to work.
The map should be placed all the way to the right.
I tried all combinations listed in the Overflowing Content section here (https://quarto.org/docs/authoring/article-layout.html#overflowing-content), but to no avail.
Please bear in mind that the output should render in multiple formats, such as Word, PDF, or PowerPoint.
The table is correctly aligned on the left, and with the correct margin.
But on the right, the map is central, and with large margin.
{{< pagebreak >}}
Distribution of fake_value across european countries
#| layout: [[20, 80]]
#| fig-width: 13
#| fig-height: 8
#| fig-align: right
# gisco_2020_institutions_map
gisco_2020_map <- gisco_2020 |>
ggplot() +
geom_sf(shape = 21, col = "black", size = 0.1,
aes(fill=fake_val)) +
ggrepel::geom_text_repel(
aes(label = cntr_id,
geometry = geometry),
stat = "sf_coordinates") +
coord_sf(xlim=c(-30, 32), ylim=c(35, 70)) +
theme(legend.position = "top",
axis.title = element_blank(),
axis.ticks = element_blank(),
axis.text.x = element_blank(),
axis.text.y = element_blank(),
plot.margin = unit(c(0, 0, 0, 0), "cm"))
# table on the left
gisco_2020 |>
as.data.frame() |>
dplyr::select(cntr_id, cntr_name, fake_val) |>
knitr::kable()
# plot on the right
gisco_2020_map
{{< pagebreak >}}
Playing with the page layout does not seem to help either, as the margins which were set above are ignored below and the map itself shrinks.
#| layout-nrow: 1
#| page-layout: full
#| fig-width: 8
#| fig-align: right
# gisco_2020_institutions_map
gisco_2020_map <- gisco_2020 |>
ggplot() +
geom_sf(shape = 21, col = "black", size = 0.1,
aes(fill=fake_val)) +
ggrepel::geom_text_repel(
aes(label = cntr_id,
geometry = geometry),
stat = "sf_coordinates") +
coord_sf(xlim=c(-30, 32), ylim=c(35, 70)) +
theme(legend.position = "top",
axis.title = element_blank(),
axis.ticks = element_blank(),
axis.text.x = element_blank(),
axis.text.y = element_blank(),
plot.margin = unit(c(0, 0, 0, 0), "cm"))
# table on the left
gisco_2020 |>
as.data.frame() |>
dplyr::select(cntr_id, cntr_name, fake_val) |>
knitr::kable()
# plot on the right
gisco_2020_map
staleIssues open for 30+ days without providing a "working" reproducible example
1 participant
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, i've been trying to squeeze a table (on the left) and a map (on the right), having the latter pushed all the way to the right.
fig-align
seems to be overridden by something else, as the code with or without it renders exactly the same.also playing with the layout of the page does not seem to work.
title: "Untitled"
format:
pdf:
classoption: [landscape]
geometry:
execute:
echo: false
warning: false
The map should be placed all the way to the right.
I tried all combinations listed in the
Overflowing Content
section here (https://quarto.org/docs/authoring/article-layout.html#overflowing-content), but to no avail.Please bear in mind that the output should render in multiple formats, such as Word, PDF, or PowerPoint.
The table is correctly aligned on the left, and with the correct margin.
But on the right, the map is central, and with large margin.
{{< pagebreak >}}
Distribution of
fake_value
across european countries{{< pagebreak >}}
Playing with the page layout does not seem to help either, as the margins which were set above are ignored below and the map itself shrinks.
{{< pagebreak >}}
Beta Was this translation helpful? Give feedback.
All reactions