[OS X TeX] Problem with geometry/PSTricks

Doris Wagner doris.wagner at mac.com
Sat May 31 21:05:06 CEST 2008


hi holger,

here are two modified files. in the first one,
I only inserted a psframebox. so you can see that the box is indeed  
set the right way, that is, left upper corner of psframebox equals  
left upper corner of the page. I guess your problem is a mathematical  
one: the range of the functions f and g for x\in[10;35] is such that I  
would choose other coordinates for the pspicture-environment. since I  
don't know what you want to visualize, I just played around a little  
(see second modified file below) an hope this helps you with your next  
steps.
if not, you can of course ask me again on this list, but in general  
with pstricks-problems it would be better to write to the pstricks- 
mailing-list.

\documentclass[12pt,landscape,a4paper]{article}
\usepackage[dvips,a4paper,landscape]{geometry}

\usepackage{pstricks,pstricks-add,pst-math}

\geometry{textwidth=27cm,top=0cm,textheight=20cm}
\newcommand{\f}{1/400*x^3-3/20*x^2+3*x-8}
\newcommand{\g}{1/400*x^3-3/20*x^2+3*x-22}


\begin{document}
\pagestyle{empty}
\psset{algebraic=true}

\psframebox{
\begin{pspicture}(10,0)(35,20)
	
\psplot{10}{30}{\f}%f
\psplot{10}{30}{\g}
		
\end{pspicture}
}
\end{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
second example


\documentclass[12pt,landscape,a4paper]{article}
\usepackage[dvips,a4paper,landscape]{geometry}

\usepackage{pstricks,pstricks-add,pst-math}

\geometry{textwidth=27cm,top=0cm,textheight=20cm}
\begin{document}
\newcommand{\f}{1/400*x^3-3/20*x^2+3*x-8}
\newcommand{\g}{1/400*x^3-3/20*x^2+3*x-22}

\pagestyle{empty}
\psset{algebraic=true}
\psset{unit=0.5cm}\psframebox{
\begin{pspicture*}(-5,-10)(35,20)
\psframe*[linecolor=red](10,0)(35,20)
	\psgrid[subgriddiv=1]
	\psaxes[linewidth=2pt,Dx=2,dx=2,dy=2,Dy=2]{->}(0,0)(-5,-9.5)(35,20)
\psplot{-5}{35}{\f}%f
\psplot{-5}{35}{\g}
		
\end{pspicture*}
}
\end{document}



More information about the macostex-archives mailing list