if I want to put fig1plot to the left, figYPplot to the right figYAaplot on the bottom. How to modify the following cod to do these? \begin{figure}[H] \centering \begin{minipage}[t]{0.5\textwidth} \centering <<label=fig1plot,fig=TRUE,echo=FALSE>><<fig1plot>> @ %\caption{Caption 1} \end{minipage} \begin{minipage}[t]{0.5\textwidth} \centering <<label=figYPplot,fig=TRUE,echo=FALSE>><<figYPplot>> @ %\caption{Caption 1} \end{minipage} \begin{minipage}[t]{1.0\textwidth} \centering <<label=figYAaplot,fig=TRUE,echo=FALSE>><<figYAaplot>> @ %\caption{Caption 1} \end{minipage} \caption{The first look at the relationship between variables in data set} \label{fig:one} \end{figure}
This is a LaTeX questions and has nothing to do neither RWinEdt nor WinEdt nor R. Hence chosen mailing list and chosen subject line are both inappropriate. Uwe Ligges Aimin Yan wrote:> if I want to put fig1plot to the left, figYPplot to the right > figYAaplot on the bottom. > How to modify the following cod to do these? > > > > \begin{figure}[H] > \centering > \begin{minipage}[t]{0.5\textwidth} > \centering > <<label=fig1plot,fig=TRUE,echo=FALSE>>> <<fig1plot>> > @ > %\caption{Caption 1} > \end{minipage} > \begin{minipage}[t]{0.5\textwidth} > \centering > <<label=figYPplot,fig=TRUE,echo=FALSE>>> <<figYPplot>> > @ > %\caption{Caption 1} > \end{minipage} > \begin{minipage}[t]{1.0\textwidth} > \centering > <<label=figYAaplot,fig=TRUE,echo=FALSE>>> <<figYAaplot>> > @ > %\caption{Caption 1} > \end{minipage} > \caption{The first look at the relationship between variables in data set} > \label{fig:one} > \end{figure} > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Aimin Yan wrote:> if I want to put fig1plot to the left, figYPplot to the right > figYAaplot on the bottom. > How to modify the following cod to do these? >There are several ways to arrange multiple figures. 1. Use LaTeX to organise separate figures Please read the documentation about package "subfigure" which works really well, and supports subcaptions. This approach does not involve modifying your R code (if indeed that is what you are using to generate your figures - you don't explicitly mention this) 2. Use R to organise your figures. Please read documentation on commands: par() eg: par(mfrow=c(2,2)) split.screen() layout() This approach generates one single "figure" made up of multiple figures. This single figure can then be incorporated into LaTeX in the usual fashion. Depending on what you are trying to achieve, both approaches can be mixed in the same document with good effect. Hope this helps, Mark -- Dr. Mark Wardle Clinical research fellow and Specialist Registrar in Neurology, C2-B2 link, Cardiff University, Heath Park, CARDIFF, CF14 4XN. UK
Aimin Yan wrote:> if I want to put fig1plot to the left, figYPplot to the right > figYAaplot on the bottom. > How to modify the following cod to do these?An example is below. I obviously won't include examples of how to use par() as these have been documented in detail almost everywhere, and if you feel the need to ask, then go and look in the documentation. \begin{figure} \centering \subfigure[Caption1]{ <<figureone, fig=TRUE,echo=FALSE>>hist(x) @ } \subfigure[Caption2]{ <<figuretwo, fig=TRUE, echo=FALSE>>hist(y) @ } \caption{Overall caption} \label{fig:label} \end{figure} Mark -- Dr. Mark Wardle Clinical research fellow and Specialist Registrar in Neurology, C2-B2 link, Cardiff University, Heath Park, CARDIFF, CF14 4XN. UK
Hello, I am new to R-WinEdt. Here is my code. If I don't want see output for summary(mp) in my final document, just want to run it. How to modify these code? Thanks, Aimin Yan <<R code,echo=FALSE>>library(MASS) options(contrasts=c("contr.treatment","contr.poly")) p5 <- read.csv("http://www.public.iastate.edu/~aiminy/data/p_5_2.csv") p5 <- read.csv("http://www.public.iastate.edu/~aiminy/data/p_5_2.csv") attach(p5) mp<-glm(Y~P-1,data=p5) summary(mp) @