Graphics, Figures & TablesHow to avoid pst-3dplot renders output with wrong position?

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
yoyoimut
Posts: 120
Joined: Mon Oct 19, 2009 6:58 am

How to avoid pst-3dplot renders output with wrong position?

Post by yoyoimut »

Hi everyone,

I am trying to use pst-3dplot. However for the first attempt, I got a bad result. The rendered outputs are not properly positioned as shown below.
pst-3dplot renders outputs with wrong position.
pst-3dplot renders outputs with wrong position.
pst3dplot.jpg (54.85 KiB) Viewed 2264 times
Here is my minimal code:

Code: Select all

\documentclass{article}
\usepackage{pst-3dplot,lipsum}
\begin{document}

\lipsum[1-2]
%\begin{minipage}{\linewidth}
\bgroup
\psset{unit=1cm}
\begin{pspicture}(-1,-2)(4,2)
\pstThreeDCoor[Alpha=-60,Beta=30,
			linewidth=1pt,
			linecolor=blue,
			IIIDticks,
			IIIDticksize=0.1]
\end{pspicture}
\egroup
%\end{minipage}
\lipsum[1-2]
\end{document}

Thank you in advance.


regards,

yuko

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

yoyoimut
Posts: 120
Joined: Mon Oct 19, 2009 6:58 am

Re: How to avoid pst-3dplot renders output with wrong position?

Post by yoyoimut »

By enlarging the pspicture interval, the output is well positioned.

Thank myself.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

How to avoid pst-3dplot renders output with wrong position?

Post by localghost »

In order to avoid such effects you can use an optional argument for the pspicture environment to check whether you have reserved enough space.

Code: Select all

\documentclass{minimal}
\usepackage{pst-3dplot,pstricks-add}

\begin{document}
  \begin{pspicture}[showgrid=true](-1,-2)(4,2)
    \pstThreeDCoor[%
      Alpha=-60,Beta=30,
      linewidth=1pt,
      linecolor=blue,
      IIIDticks,
      IIIDticksize=0.1
    ]
  \end{pspicture}
\end{document}
The grid helps to compose a picture and shows you if your graphical elements protrude the reserved area.


Best regards
Thorsten
yoyoimut
Posts: 120
Joined: Mon Oct 19, 2009 6:58 am

Re: How to avoid pst-3dplot renders output with wrong position?

Post by yoyoimut »

thanks localghost,

I agree that setting showgrid to true can help us see the reserved canvas.

To avoid improper positioning, we can use the starred version of pspicture.
Any object outside the canvas will not be rendered in the starred version of pspicture.



Thank you.


yuko
Post Reply