Graphics, Figures & TablesPage turned sideways

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Page turned sideways

Post by svend_tveskaeg »

Hi all.

The following MWE induces quite a lot of head-scratching for me:

Code: Select all

% Compile using
%
% latex <filename>.tex
% dvips -Ppdf -D1200 <filename>.dvi
% ps2pdf <filename>.ps
%
% and open with Adobe Reader.

\documentclass{article}

\usepackage{pst-func}
\usepackage{animate}

\def\total{8}
\newcommand*{\binomdist}[1]{%
\def\succesP{#1}
\psset{xunit=1cm,yunit=10cm}
 \begin{pspicture}(-1.2,-0.1)(9.3,0.75)%
  \psaxes[labels=y,ticks=y,Dy=0.1,dy=0.1\psyunit]{->}(-0.5,0)(-0.5,0)(8.8,0.69)[$k$,0][$P(X = k)$,90]
  \psaxes[labels=x,ticks=x,xlabelOffset=0.5](-0.5,0)(-0.5,0)(8,0.69)
  \psBinomial[markZeros,printValue,comma,fillstyle=solid,fillcolor=blue!40,opacity=0.4,linestyle=solid,linecolor=black]{\total}{\succesP}
  \psBinomial[markZeros,fillstyle=solid,fillcolor=blue!40,opacity=0.4,linestyle=solid,linecolor=red]{\total}{\succesP}
  \rput(5,0.6){$p = \succesP$}
 \end{pspicture}
}

\begin{document}

\begin{figure}[htbp]
\centering
 \begin{animateinline}[poster=first,controls,palindrome]{1}
  \multiframe{7}{rA=0.2+0.1}{\binomdist{\rA}}
 \end{animateinline}
\end{figure}
\newpage

Test

\end{document}
Why is the first page turned sideways? :?

Thank you in advance!

Update
I have come to the conclusion that the problem has something to do with ps2pdf because the page is not turned sideways in the PS file.

Update 2
I found a solution: If I compile using

Code: Select all

latex <filename>.tex
dvips -Ppdf -D1200 <filename>.dvi
ps2pdf -dAutoRotatePages=/None <filename>.ps
all the pages are turned in the right direction.
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

Page turned sideways

Post by CrazyHorse »

svend_tveskaeg wrote:The following MWE induces quite a lot of head-scratching for me:
it is always a good idea to look first at http://tug.org/PSTricks/main.cgi
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Re: Page turned sideways

Post by svend_tveskaeg »

I see now that 5. woulk have saved me from a lot of headache. ;)

Thank you for the pointer.
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
Post Reply