Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
Welcome to tex.sx! It's not necessary to begin your questions with a greeting. –  lockstep Mar 14 '11 at 23:17
    
but does 1 = 2? –  Nicholas Hamilton Jun 27 '13 at 21:51
add comment

2 Answers

up vote 10 down vote accepted

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.

share|improve this answer
add comment

\scalebox{0.5}{stuff}

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.

\scalebox{0.5}[0.25]{stuff}.

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

share|improve this answer
add comment

Your Answer

 
discard

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.