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
<< plot1, echo = FALSE, fig.cap = "Sample Data" >>=
qplot(data = df, x = x, y = y, geom = "point", xlab = "x values", ylab = "y values")
@
It puts it in a figure environment. But what if I want it in a marginfigure environment? Is there some option that can be specified? Or, do I split into two parts: a code chunk to make the pdf, and then an empty code chunk to place the figure in the document, like this one from the manual:
unfortunately \begin{figure} is currently hard-coded, but that is a very good question, and I have also been considering how to support other environments like figure* or marginfigure; I'll decide how to do it soon since you brought it up
Appreciated Yihui. What got me thinking about this was actually margintable and using xtable. xtable has some ability to pass in alternate LaTeX environments through it's argument floating.environment. In fact, someone has asked that margintable be added to xtable (https://r-forge.r-project.org/tracker/?func=detail&atid=4864&aid=2168&group_id=1228) You might be able to get some ideas there. Thanks for considering it.
It is actually very easy to add the support to customize the figure environment; I was just struggling on whether to introduce a new option (already too many options). Finally I decided to add fig.env, e.g. fig.env='marginfigure'.
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.
If I have this code
It puts it in a figure environment. But what if I want it in a marginfigure environment? Is there some option that can be specified? Or, do I split into two parts: a code chunk to make the pdf, and then an empty code chunk to place the figure in the document, like this one from the manual:
Just wondering if there is an option I missed that would make this a one step process. Thanks, Bryan
The text was updated successfully, but these errors were encountered: