I am relatively new to LaTeX and I was playing around with figures and came across the scalebox command. This apparently lets you scale a graph that you create or import into your LaTeX document by a certain amount. How do you know how much scalebox will scale your figure by? I read somewhere that typing \scalebox{0.5} scales a graph to 0.8 times the original size. Is there any way to figure out what fraction of the original size your graph will become?

  • Welcome to tex.sx! It's not necessary to begin your questions with a greeting.
    – lockstep
    Mar 14 '11 at 23:17
  • 1
    but does 1 = 2? Jun 27 '13 at 21:51
  • 2
    which package you need to input "\scalebox" ?
    – wonderich
    Mar 28 '19 at 22:24
  • @wonderich it looks like adjustbox, but that lists dependencies and it is not clear exactly which are automatically loaded, and which are not. Nov 19 '19 at 0:49

It is not true that \scalebox{0.5} of the graphics package scales a graph to 0.8 times of the original size. It scales it simply by this factor, as Ian Thompson already said in his answer.

Note that their is also \resizebox{<width>}{<height>}{<content>} which allows you to scale the image to a given size. This can be more useful for adjusting bigger graphics or pictures: \resizebox{\textwidth}{!}{<content>} scales the content directly to the size of the main text. The ! for the height states that it should scale with the width. See my answer to Quickest way to include graphics for more explanation about scale vs. direct width/height.

See the graphics/x manual for the other commands like \rotatebox. Note that if you want to resize images you can use the optional arguments of \includegraphics[height=<height>,width=<width>,angle=<angle>,keepaspectratio]{<filename>}.

For other things like diagrams drawn using TeX commands (pgf/tikz, pstricks, etc.) there is the adjustbox package which gives you \adjustbox{height=<height>,width=<width>,angle=<angle>,keepaspectratio}{<TeX content>} or the similar and very new gincltex which allows you to include .tex files like images using \includegraphics.



scales stuff by 1/2 in the horizontal direction, and 1/2 in the vertical direction, so the result will be 1/4 the original size. A vertical scaling that is different from the horizontal scaling can be specified with an optional argument, e.g.


Applying this command will scale horizontally by 0.5 and vertically by 0.25.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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