Re: [R] Page width figures in Latex
bRotheRs (and sisteRs who might have responded after I posted this), My heartfelt thanks to you all. I had interpreted figure* as the command 'figure' with a wildcard after it, and assumed that I had to discover what arcane suffixes might be appended to figure. The following lines got the image on the page: \begin{figure*} \includegraphics[width=\textwidth]{hypertens.pdf} \caption{\label{figure:hypertens} Reported hypertension by age, sex and alcohol consumption} \end{figure*} Charlie, I might have been lucky that the figure was placed just after a page break, but it worked. The figure was centered on its own page, but at least I have gotten a working file. Also thanks for the pointer to the Latex wiki, I will definitely consult this if I must undertake this sort of thing again. Rolf, when I tried this: \usepackage{float} %in the wrapper file \begin{figure*}[H] \includegraphics[width=\textwidth]{hypertens.pdf} \caption{\label{figure:hypertens} Reported hypertension by age, sex and alcohol consumption} \end{figure*} the figure disappeared entirely. Without the asterisks, I got the single column figure again. Mike, when I tried your suggestion, the figure was there, but still in the single column format. This all conforms to my own little corollary to Murphy's Law: There are many more ways to get something wrong than to get it right Jim __ R-help@r-project.org 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.
Re: [R] Page width figures in Latex
Sharpie wrote: Jim Lemon wrote: bRotheRs sisteRs, I am once again attempting to learn enough Latex voodoo to get something done, and failing comically. The document RJAuthorguide.pdf mentions that one can get page width figures through the use of the figure* or table* environments, but despite considerable searching through the mail archives and reading Frank Harrell's discussion of Using Latex Figure Environments for Plots until my eyes went on strike, I am nowhere near a solution. Would anyone be kind enough to point me to the Idiot's Guide to Latex Figure Environments? Jim As far as I can recall, figure* and table* are used to create figures/tables that span the entire page when the rest of the document is in twocolumn or multicol mode. I.e. these environments allow you to break out of a multi-column layout to place a figure that acts like it was in a normal single-column layout. There are a bunch of caveats such as the figure/table will only appear at the top or bottom of a page and will not appear on the same page as the point at which it was declared in the source. That is to say, when you declare a figure* in a LaTeX document, one page break must pass before the environment actually gets set in your document- no matter what !h or H vodoo you pull. If your document is not using multiple columns, then you may want to specify the width of your figure when you place it using \includegraphics. In order to scale the figure so that it spans the entire page, set the width argument equal to \textwidth: \begin{figure} \centering \caption{A graph of x verses y along with a linear regression fit.} \label{fig:xVsY} \includegraphics[width=\textwidth]{/path/to/your/figure} \end{figure} One R-specific warning: by default, R includes relatively wide borders around plots, and those are included in the bounding box that is used when resizing to \textwidth. So you may find that your plot is not quite the full width unless you adjust the margins when you do your plot, or recalculate the bounding box. Duncan Murdoch Some good resources are: The LaTeX Wikibook: http://en.wikibooks.org/wiki/LaTeX Getting to Grips with LaTeX: http://www.andy-roberts.net/misc/latex/ Hope this helps! -Charlie - Charlie Sharpsteen Undergraduate-- Environmental Resources Engineering Humboldt State University __ R-help@r-project.org 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.
[R] Page width figures in Latex
bRotheRs sisteRs, I am once again attempting to learn enough Latex voodoo to get something done, and failing comically. The document RJAuthorguide.pdf mentions that one can get page width figures through the use of the figure* or table* environments, but despite considerable searching through the mail archives and reading Frank Harrell's discussion of Using Latex Figure Environments for Plots until my eyes went on strike, I am nowhere near a solution. Would anyone be kind enough to point me to the Idiot's Guide to Latex Figure Environments? Jim __ R-help@r-project.org 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.
Re: [R] Page width figures in Latex
Jim Lemon wrote: bRotheRs sisteRs, I am once again attempting to learn enough Latex voodoo to get something done, and failing comically. The document RJAuthorguide.pdf mentions that one can get page width figures through the use of the figure* or table* environments, but despite considerable searching through the mail archives and reading Frank Harrell's discussion of Using Latex Figure Environments for Plots until my eyes went on strike, I am nowhere near a solution. Would anyone be kind enough to point me to the Idiot's Guide to Latex Figure Environments? Jim As far as I can recall, figure* and table* are used to create figures/tables that span the entire page when the rest of the document is in twocolumn or multicol mode. I.e. these environments allow you to break out of a multi-column layout to place a figure that acts like it was in a normal single-column layout. There are a bunch of caveats such as the figure/table will only appear at the top or bottom of a page and will not appear on the same page as the point at which it was declared in the source. That is to say, when you declare a figure* in a LaTeX document, one page break must pass before the environment actually gets set in your document- no matter what !h or H vodoo you pull. If your document is not using multiple columns, then you may want to specify the width of your figure when you place it using \includegraphics. In order to scale the figure so that it spans the entire page, set the width argument equal to \textwidth: \begin{figure} \centering \caption{A graph of x verses y along with a linear regression fit.} \label{fig:xVsY} \includegraphics[width=\textwidth]{/path/to/your/figure} \end{figure} Some good resources are: The LaTeX Wikibook: http://en.wikibooks.org/wiki/LaTeX Getting to Grips with LaTeX: http://www.andy-roberts.net/misc/latex/ Hope this helps! -Charlie - Charlie Sharpsteen Undergraduate-- Environmental Resources Engineering Humboldt State University -- View this message in context: http://n4.nabble.com/Page-width-figures-in-Latex-tp1694612p1694673.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org 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.
Re: [R] Page width figures in Latex
On 29/03/2010, at 4:21 PM, Sharpie wrote: SNIP There are a bunch of caveats such as the figure/table will only appear at the top or bottom of a page and will not appear on the same page as the point at which it was declared in the source. That is to say, when you declare a figure* in a LaTeX document, one page break must pass before the environment actually gets set in your document- no matter what !h or H vodoo you pull. SNIP I'm not convinced that this is correct; I'm sure I have had floats (including figures) placed where I asked them to be placed. :-) Be that as is it were; if you put: \usepackage{float} in your preamble and then do \begin{figure}[H] whatever \end{figure} the figure will appear ***exactly*** where you put it --- provided of course that there is room for it there. Elsewise you'll get a page break just before the figure. cheers, Rolf Turner ## Attention: This e-mail message is privileged and confidential. If you are not the intended recipient please delete the message and notify the sender. Any views or opinions presented are solely those of the author. This e-mail has been scanned and cleared by MailMarshal www.marshalsoftware.com ## __ R-help@r-project.org 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.
Re: [R] Page width figures in Latex
On Mon, 29 Mar 2010 12:21:40 +1100, Jim Lemon j...@bitwrit.com.au wrote: bRotheRs sisteRs, I am once again attempting to learn enough Latex voodoo to get something done, and failing comically. The document RJAuthorguide.pdf mentions that one can get page width figures through the use of the figure* or table* environments, but despite considerable searching through the mail archives and reading Frank Harrell's discussion of Using Latex Figure Environments for Plots until my eyes went on strike, I am nowhere near a solution. Would anyone be kind enough to point me to the Idiot's Guide to Latex Figure Environments? Jim Jim, You need a good book on Latex. I like this one: http://www.amazon.com/Guide-LaTeX-4th-Helmut-Kopka/dp/0321173856/ref=sr_1_4?ie=UTF8s=booksqid=1269833347sr=8-4 The width of the figure is controlled by the \includegraphics statement, not any particular part of the environment specification. That assumes you have loaded the graphicx package. For example, \begin{figure}[!th] \begin{center} \includegraphics[width=\textwidth]{myfig.eps}\\ \end{center} \end{figure}% HTH, Mike __ R-help@r-project.org 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.
Re: [R] Page width figures in Latex
Rolf Turner wrote: On 29/03/2010, at 4:21 PM, Sharpie wrote: SNIP There are a bunch of caveats such as the figure/table will only appear at the top or bottom of a page and will not appear on the same page as the point at which it was declared in the source. That is to say, when you declare a figure* in a LaTeX document, one page break must pass before the environment actually gets set in your document- no matter what !h or H vodoo you pull. SNIP I'm not convinced that this is correct; I'm sure I have had floats (including figures) placed where I asked them to be placed. :-) Be that as is it were; if you put: \usepackage{float} in your preamble and then do \begin{figure}[H] whatever \end{figure} the figure will appear ***exactly*** where you put it --- provided of course that there is room for it there. Elsewise you'll get a page break just before the figure. cheers, Rolf Turner Aye, that is exactly true for the figure environment. However, I was referring to the figure* environment (note the asterisk) which is used when setting a figure that spans a full page in a document with multiple columns. Under these conditions, I recall there being some gotchas such as the figure having to appear at the top or bottom of the page and one pagebreak having to pass before it appears. -Charlie - Charlie Sharpsteen Undergraduate-- Environmental Resources Engineering Humboldt State University -- View this message in context: http://n4.nabble.com/Page-width-figures-in-Latex-tp1694612p1694686.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org 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.
Re: [R] Page width figures in Latex
Hi All you need to know to get started with figures (and even up to intermediate level)- Keith Reckdahl's Using Imported Graphics in LATEX and pdfLATEX Regards Duncan Duncan Mackay Department of Agronomy and Soil Science University of New England ARMIDALE NSW 2351 Email home: mac...@northnet.com.au At 13:37 29/03/2010, you wrote: On 29/03/2010, at 4:21 PM, Sharpie wrote: SNIP There are a bunch of caveats such as the figure/table will only appear at the top or bottom of a page and will not appear on the same page as the point at which it was declared in the source. That is to say, when you declare a figure* in a LaTeX document, one page break must pass before the environment actually gets set in your document- no matter what !h or H vodoo you pull. SNIP I'm not convinced that this is correct; I'm sure I have had floats (including figures) placed where I asked them to be placed. :-) Be that as is it were; if you put: \usepackage{float} in your preamble and then do \begin{figure}[H] whatever \end{figure} the figure will appear ***exactly*** where you put it --- provided of course that there is room for it there. Elsewise you'll get a page break just before the figure. cheers, Rolf Turner ## Attention: This e-mail message is privileged and confidential. If you are not the intended recipient please delete the message and notify the sender. Any views or opinions presented are solely those of the author. This e-mail has been scanned and cleared by MailMarshal www.marshalsoftware.com ## __ R-help@r-project.org 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. __ R-help@r-project.org 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.
Re: [R] Page width figures in Latex
On 03/29/2010 02:34 PM, Mike Prager wrote: ... \begin{figure}[!th] \begin{center} \includegraphics[width=\textwidth]{myfig.eps}\\ \end{center} \end{figure}% Hi Mike, I wrote too soon, for there was one combination that I had not tried: \begin{figure*}[!th] \includegraphics[width=\textwidth]{hypertens.pdf} \caption{\label{figure:hypertens} Reported hypertension by age, sex and alcohol consumption} \end{figure*} did exactly what I wanted. Thanks. Jim __ R-help@r-project.org 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.