The footer on the previous slide directs you to the qmd file to see the code, but …
You can also see some of it right here:
## Incremental Lists and fragments {background-color="#fcecc0"}Using "fragments", you can change when items appear on the slide.:::: {.columns}::: {.column width="60%"}:::{.fragment .fade-in}::::::::: {.column width="40%"}::: {.fragment}The Métis National Committee declared a provisional government on December 8, 1869, with Riel becoming its president on the 27th.::::::::::
Notice how this “Code” tab has too much text for the space on this slide? Look for scrollable: true in the YAML header in the qmd file. Change it, then see what happens!
Code chunks
Incorporate your code, plots, and analyses directly into your Quarto outputs
#| cache: truelibrary(tidyverse)library(MetBrewer)plot2 <-ggplot(mtcars, aes(hp, mpg, color =as.character(cyl))) +geom_point(size=5) +geom_smooth(method ="lm", se =FALSE, linetype ="dashed", color ="black") +theme_minimal() +scale_color_manual(values =met.brewer('VanGogh2')) +labs(title ="Relationship Between Horsepower and MPG by Cylinder Count",x ="Horsepower",y ="Miles per Gallon (MPG)",color ="Cylinder count" ) +theme(legend.position =c(0.8, 0.8),axis.title =element_text(size =16),legend.title =element_text(size =14),legend.box.background =element_rect(fill ='#fae9ca', color ='gray'))plot2
Code highlighting
New Code:
#| cache: truelibrary(tidyverse)library(MetBrewer)plot2 <-ggplot(mtcars, aes(hp, mpg, color =as.character(cyl))) +geom_point(size=5) +geom_smooth(method ="lm", se =FALSE, linetype ="dashed", color ="black") +theme_minimal() +scale_color_manual(values =met.brewer('VanGogh2')) +labs(title ="Relationship Between Horsepower and MPG by Cylinder Count",x ="Horsepower",y ="Miles per Gallon (MPG)",color ="Cylinder count" ) +theme(legend.position =c(0.8, 0.8),axis.title =element_text(size =16),legend.title =element_text(size =14),legend.box.background =element_rect(fill ='#fae9ca', color ='gray'))plot2
Absolute Positioning
::: {.fragment fragment-index=1 .absolute top=150 left=600 width="400" height="auto"}::: {.fragment .semi-fade-out fragment-index=5} your plot in an R chunk ::::::
Create a “fenced div” that contains your fragment settings and your absolute position settings.
Create another fenced div for this plot’s second fragment setting (semi-fade-out on click 5)
Insert your plot (or image or text or tabset or anything!)
Divs and spans are HTML-speak. Quarto looks best when the user plays around with these. A future tutorial will cover divs and spans in Quarto