TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm doing a slide presentation with LaTeX, and some slides show only graphics. I created those graphics using R. But in those slides, the graphic size is too big and a part of the graphic does not appear in the slide, like it's been cropped. Is there any command in LaTeX that can make the graphic smaller in the slide?

share|improve this question
you can set the size of the graphic as an option, e.g.\includegraphics[width=0.5\textwidth]{mygraph} will scale the graph so that it is half of the current text width (and scale the height by the some amount). check the documentation for the graphicx package for this and other options available – prettygully Nov 21 '11 at 2:38
I had the same problem. R Markdown to produce beamer presentation, wanted to include png images not created by R within the markdown doc. No control over size. A workable solution is to use the png library in R to read the images and plot inside a R chunk, giving you control over size via fig.width and fig.height. From this answer on stackoverflow – andybega Feb 16 '15 at 17:21

The \includegraphics command from the graphicx package can take a number of optional arguments, such as scale, width, and height. You can use these to get the desired size- a MWE follows



share|improve this answer
This doesn't work if you are trying to create beamer slides with R markdown. See my comment on the question for a solution. – andybega Feb 16 '15 at 17:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.