Graphics, Figures & Tablesobject 'scaling'

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Mini
Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm

object 'scaling'

Post by Mini »

Hello,

Just wanted to know,

say I had something like this:

Code: Select all

\begin{figure}[!htb]
    \begin{pspicture}(-5,-5)(10,10)
      \psaxes[linewidth=1.2pt, labels=all]{->}(0,0)(-5,-5)(10,10)
      \pscurve[showpoints=true](-5,-5)(1,0.25)(5,9)(10,10)
    \end{pspicture}
\end{figure}
How would I 'scale' this object so I can magnify it or shrink it in proportion as needed?

Thanks
Last edited by Mini on Fri Dec 10, 2010 5:20 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

object 'scaling'

Post by frabjous »

You should always post complete, compiliable examples. No one enjoys guessing what packages you're using.

You could use either \scalebox from graphicx or \psscalebox from pstricks (which you seem already to be using).

For example, to scale to 50% of the original size:

Code: Select all

\documentclass{article}
\usepackage{pst-plot,pst-text}
\begin{document}
\begin{figure}[!htb]
    \psscalebox{0.5}{%
    \begin{pspicture}(-5,-5)(10,10)
      \psaxes[linewidth=1.2pt, labels=all]{->}(0,0)(-5,-5)(10,10)
      \pscurve[showpoints=true](-5,-5)(1,0.25)(5,9)(10,10)
    \end{pspicture}}
\end{figure}
\end{document}
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

object 'scaling'

Post by localghost »

According to the pstricks manual (Section 4, p. 5 ff) you can explicitly set the unit register to scale your pictures.

Code: Select all

\psset{unit=0.5cm}

Thorsten
Post Reply