Dear all,
When I want to modify the drawing scale, I am confused with where the best place to declare \psset{unit=dim} is. Whether it should be declared before \begin{pspicture}, after \begin{pspicture}, or in pspicture's option.
Please let me know the differences.
regards,
Hayashi
Document Classes ⇒ Where should I declare \psset{unit=dim} ?
-
- Posts: 66
- Joined: Tue Oct 07, 2008 9:39 am
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Where should I declare \psset{unit=dim} ?
You presumably have some pspicture environments which demand different scales. I assume that you put those into a figure environment. You can insert the settings for the units inside this float environment to keep the settings local. Take this as an example.
This is a setting for the whole pspicture environment, which could also be done as optional key value in its option list. However, there might be cases where it can be necessary to change the scaling inside the picture. Then you can put the setup command inside the pspicture environment wherever it is needed. The unit value can also be set as optional parameter for every drawing command.
Best regards
Thorsten¹
Code: Select all
\begin{figure}[!ht]
\centering
\psset{unit=0.5cm}
\begin{pspicture}[showgrid=true](-4,-3)(4,3)
\end{pspicture}
\caption{Example for scaling a PSTricks picture}\label{fig:scale}
\end{figure}
Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 66
- Joined: Tue Oct 07, 2008 9:39 am
Re: Where should I declare \psset{unit=dim} ?
Thank you localhost for replying.
regards,
Hayashi
regards,
Hayashi