I can win an argument on any topic, against any opponent. For epigraphs, you may use a pair of underscores to make the paragraph italic in a block quote, e.g. If you prefer sans-serif fonts, use the function sans_serif() in tufte. There are a few other things in Tufte CSS that we have not mentioned so far. P geom_smooth(method = 'lm') facet_grid(~ gear) # `geom_smooth()` using formula 'y ~ x' P <- ggplot(mtcars, aes(wt, hp)) geom_point() Ggplot(mtcars2, aes(am, wt)) geom_boxplot() Ĭoord_flip() # a figure in the main column # a boxplot of weight vs transmission this figure We show three figures with no captions below in the margin, in the main column, and in full width, respectively. You do not have to assign captions to figures. For a practical document, you should not insert too many margin figures consecutively and make the margin crowded. We blended some tables in the above code chunk only as placeholders to make sure there is enough vertical space among the margin figures, otherwise they will be stacked tightly together. p geom_smooth(method = 'lm') # `geom_smooth()` using formula 'y ~ x' knitr::kable(head(iris, 5)) Sepal.Length Two plots in separate figure environments in the margin (the second plot). p knitr::kable(head(iris, 12)) Sepal.Length Two plots in separate figure environments in the margin (the first plot). Then two plots from the same code chunk placed in different figure environments: knitr::kable(head(iris, 15)) Sepal.Length P geom_smooth(method = 'lm') # `geom_smooth()` using formula 'y ~ x' Two plots in one figure environment in the margin. Similarly, two plots in the same figure environment in the margin: Next we show multiple plots in margin figures. You may have noticed that the two figures have different captions, and that is because we used a character vector of length 2 for the chunk option fig.cap (something like fig.cap = c('first plot', 'second plot')). Two plots in separate figure environments (the second plot). For general questions, you may ask them on StackOverflow. If you have any feature requests or find bugs in tufte, please do not hesitate to file them to.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |