quarto slides: figures do not appear in the next slide, but at the end and they appear all together

which is what I expect

  • code 1
  • figure 1
  • code 2
  • figure 2

what happens

  • code 1
  • code 2
  • figure 1
  • figure 2

Check this code and slides

---
title: "Test"

execute:
  echo: true
  warning: false
format:
  revealjs: 
    slide-number: true
---

```{r}
#if not installed, run next line
# install.packages("pacman")
pacman::p_load(tidyverse)
```


## Hello, There

This presentation will show you examples of what you can do with Quarto and [Reveal.js](https://revealjs.com), including:

-   Presenting code and LaTeX equations
-   Including computations in slide output
-   Image, video, and iframe backgrounds
-   Fancy transitions and animations
-   Printing to PDF

...and much more

## a code

```{r}
glimpse(mtcars)
```
## a plot
```{r}
mtcars %>% 
  ggplot(aes(x = as.factor(cyl), 
             y = mpg)) +
  geom_boxplot()
  
```
# in the same slide
```{r}
#| output-location: fragment 
mtcars %>% 
  ggplot(aes(x = as.factor(cyl), 
             y = mpg)) +
  geom_boxplot()
  
```

# in the next slide
the graphic should appear in the following slide
```{r}
#| output-location: slide 
mtcars %>% 
  ggplot(aes(x = as.factor(cyl), 
             y = mpg)) +
  geom_boxplot() +
  labs(title = "graph 1")
  
```

# in the next slide 2
the graphic should appear in the following slide
```{r}
#| output-location: slide 
mtcars %>% 
  ggplot(aes(x = as.factor(cyl), 
             y = mpg)) +
  geom_boxplot() +
  labs(title = "graph 2")
  
```

# Mixed



# in the next slide
the graphic should appear in the following slide
```{r}
#| output-location: slide 
mtcars %>% 
  ggplot(aes(x = as.factor(cyl), 
             y = mpg)) +
  geom_boxplot() +
  labs(title = "graph 3")
  
```

# in the same slide
```{r}
#| output-location: fragment 
mtcars %>% 
  ggplot(aes(x = as.factor(cyl), 
             y = mpg)) +
  geom_boxplot()
  
```

# in the next slide 4
the graphic should appear in the following slide
```{r}
#| output-location: slide 
mtcars %>% 
  ggplot(aes(x = as.factor(cyl), 
             y = mpg)) +
  geom_boxplot() +
  labs(title = "graph 4")
```

Which quarto version are you running ?

I think this could have been an issue but now fixed. It is working for me with last version

---
format: revealjs
execute:
  echo: true
---

```{r}
#| echo: false
#| include: false
library(ggplot2)
library(magrittr)
```

# in the next slide

the graphic should appear in the following slide

```{r}
#| output-location: slide 
mtcars %>% 
  ggplot(aes(x = as.factor(cyl), 
             y = mpg)) +
  geom_boxplot() +
  labs(title = "graph 1")
  
```

# Other content

Final slide

1 Like

SOLUTION: install the latest quarto version

just installed
quarto-1.0.35-linux-amd64.deb

and works!

---
format: revealjs
execute:
  echo: true
---
#| echo: false
#| include: false
library(ggplot2)
library(magrittr)

in the next slide

the graphic should appear in the following slide

#| output-location: slide 
mtcars %>% 
  ggplot(aes(x = as.factor(cyl), 
             y = mpg)) +
  geom_boxplot() +
  labs(title = "graph 1")
  

Other content

Final slide

#| output-location: slide 
mtcars %>% 
  ggplot(aes(x = as.factor(cyl), 
             y = mpg)) +
  geom_boxplot() +
  labs(title = "graph 2")
  

Output and expected output

Thank you

1 Like

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.