Graphics, Figures & Tablespst-3dplot | Different Viewpoint Angles for two Figures

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
nordbeck
Posts: 4
Joined: Wed Aug 29, 2012 4:42 pm

pst-3dplot | Different Viewpoint Angles for two Figures

Post by nordbeck »

Hi!

When I have two (or more) pst-3dplot figures on the same page, it does not matter what values i give the parameters Alpha and Beta (using \psset) in the second figure. Instead the values given in the first figure will be used. I guess this is a bug. Anyone that knows how to fix it?

Thanks!
Patrik

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

User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

pst-3dplot | Different Viewpoint Angles for two Figures

Post by Stefan Kottwitz »

Hi Patrik,

welcome to the board!

The question is quite abstract. Perhaps post a Infominimal working example with such two figures. We could test it, figure out if it's a bug and perhaps provide a fix.

Stefan
LaTeX.org admin
nordbeck
Posts: 4
Joined: Wed Aug 29, 2012 4:42 pm

pst-3dplot | Different Viewpoint Angles for two Figures

Post by nordbeck »

Thanks for your quick response!

I have not figured out how to include code nicely (sorry for that!), so i hope my "copy and paste" will work. Here the parameter "Alpha" in the second pspicture do not work. If you active \pagebreak (take away %), then it works. Further, if you skip the \pstThreeDCorr line in the first pspicture, then it works without pagebreak. Seems very strange to me! Do you get the same result? Hope you see what I mean.

Thanks again!
Patrik

Code: Select all

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

\begin{document}
  \begin{pspicture}(0,0)(5,5)
    \psset{Alpha=125,Beta=20}%
    \pstThreeDCoor[xMin=-1,xMax=4,yMin=-1,yMax=4,zMin=-1,zMax=3,linecolor=black, nameX=$ $, nameY=$ $,nameZ=$ $]%
  \end{pspicture}

%  \pagebreak[4]

  \begin{pspicture}(0,0)(5,5)
    \psset{Alpha=155,Beta=12}%
    \parametricplotThreeD[xPlotpoints=200,linewidth=0.6pt,plotstyle=curve,linestyle=dashed](25,205){t cos 3 mul t sin 3 mul 0}%
    \parametricplotThreeD[xPlotpoints=200,linewidth=0.6pt,plotstyle=curve,linestyle=solid](205,385){t cos 3 mul t sin 3 mul 0}%
    \parametricplotThreeD[xPlotpoints=200,linewidth=0.6pt,plotstyle=curve](-1,1){t 25 cos mul 3 mul t 25 sin mul 3 mul 1 t t mul sub sqrt 3 mul}%
  \end{pspicture}
\end{document}
Last edited by localghost on Sun Sep 02, 2012 5:16 pm, edited 2 times in total.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

pst-3dplot | Different Viewpoint Angles for two Figures

Post by Stefan Kottwitz »

Hi Patrik,

I got this output:
plot.png
plot.png (4.29 KiB) Viewed 3894 times
Do you get different pictures?

I used pst-3dplot.tex 2011/03/01 v1.94. Which one are you using? You can see it in the .log file if you add \listfiles to your preamble.

Stefan
LaTeX.org admin
nordbeck
Posts: 4
Joined: Wed Aug 29, 2012 4:42 pm

pst-3dplot | Different Viewpoint Angles for two Figures

Post by nordbeck »

Hi again!

No, I do not get your output; yours is correct (my second figure is viewed with \Alpha=125 and not \Alpha=150 as it should). I use the same version of pst-3dplot. It seems to be the \pstThreeDCoor in the first figure that is the problem. I can write other commands there without affecting the second figure.

If it is of any use I use MiKTeX 2.9 on Windows XP.

Thanks again for your help!
Patrik
nordbeck
Posts: 4
Joined: Wed Aug 29, 2012 4:42 pm

pst-3dplot | Different Viewpoint Angles for two Figures

Post by nordbeck »

Hi again!

We found out a "solution" to our problem. Put the \pstThreeDCoor line first, before the other commands. Also put a \pstThreeDCoor line in every picture on the page; if you don't want it, write linecolor=white.

Strange that Stefan_K did not experience the same problem, I still think it is a bug somewhere.

Thanks!
Patrik
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

pst-3dplot | Different Viewpoint Angles for two Figures

Post by localghost »

nordbeck wrote:[…]Strange that Stefan_K did not experience the same problem, I still think it is a bug somewhere. […]
A bug is most likely. And to my astonishment I get the false output with the most current version pst-3dplot.tex 2012/06/07 v1.97 `PST-3dplot' (hv) (see attachment). So this is definitely worth a note to the package maintainer. Actually he is a member of this this board, but you should nevertheless drop him a line.
Attachments
The resulting output of the provided example.
The resulting output of the provided example.
pst-3dplot-viewpoint-angles.png (6.91 KiB) Viewed 3867 times
Post Reply