[pstricks] psset and absolute lengths (fwd)

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Fri Apr 11 23:27:21 CEST 2003


Richard schrieb:

> Thanks. I had something like the following in mind and your suggestions
> below helped me figure out how this could be implemented. Try resizing
> the viewing rectangle via the macro \VR in the first image and watch the
> tick marks. ;-> Thanks for the tips.

attached a solution with the pstricks psaxes and grid options.
You can change all values to variables max/min, too.

Herbert

\documentclass{article}
\usepackage{pst-plot}

\begin{document}
\psset{xunit=0.75cm,yunit=0.15}
\begin{pspicture}(-6,-5)(6,36)
   \footnotesize%
   \psaxes[linewidth=0.5pt,%
   	showorigin=true,%
   	Dx=2,Dy=5,Ox=-6,Oy=-5](-6,-5)(6,36)
   \psaxes[linewidth=1pt,%
   	ticks=none,labels=none,%
   	showorigin=false,%
   	Dx=2,Dy=5]{<->}(0,0)(-6,-5)(6,36)
	\psplot[linewidth=2pt]{-6}{6}{x dup mul}
   \rput[l](0.5,32){$y=x^2$}
   \psframe[linewidth=0.5pt](-6,-5)(6,36)
   \normalsize
\end{pspicture}%

\vspace{1cm}

\begin{pspicture}(-6,-5)(6,35)
   \psgrid[subgriddiv=0,gridlabels=0pt,%
	subgridwidth=0.1pt,%
	xunit=2,yunit=5](-3,-1)(3,7)
   \footnotesize%
   \psaxes[linewidth=0.5pt,%
   	showorigin=true,%
   	Dx=2,Dy=5,Ox=-6,Oy=-5](-6,-5)(6,35)
   \psaxes[linewidth=1pt,%
   	ticks=none,labels=none,%
   	showorigin=false,%
   	Dx=2,Dy=5]{<->}(0,0)(-6,-5)(6,35)
   \psclip{\psframe(-6,-5)(6,35)}
   	\psplot[linewidth=2pt]{-6}{6}{x dup mul}
   \endpsclip
   \rput[l](0.5,32){$y=x^2$}
\end{pspicture}
\end{document}




More information about the PSTricks mailing list