Thanks to this question I know how to align plots of same width next to each other, but I would like to have my first plot much wider than the second one (same height though, and the second plot needs to be square).
This post game me an idea to play with plot layout
. So here is my code:
\documentclass{article}
\begin{document}
Side by side images:
\begin{figure}[htpb]
<<test, echo=FALSE, out.width='1\\linewidth'>>=
par(mar=c(2,2,.1,.1),cex.lab=.95,cex.axis=.9,mgp=c(2,.7,0),tcl=-.3)
layout(t(matrix(c(1,2))), widths=c(10,2), heights=c(2,2), TRUE)
plot(1:100)
plot(1:10)
@
\end{figure}
Ta da!
\end{document}
And here is the pdf I get:
So if it's the right approach, how can I get rid of the space at the top and the bottom? And if it's not, what the right one?
Thanks in advance.