[pstricks] Minipage and Pstricks -> xAxis undefined.

Hans Henrik Sievertsen hhsievertsen at gmail.com
Mon Nov 12 13:48:48 CET 2007

Hi,
Im quite new to pstricks, but already fascinated. I'm very thankful for the
great package and documentation. But I have a small problem, and I can't
find any solution for it in the documentation or mailing-list.

I have to pstricks figures, that I want to place next to each other. For the
moment I'm using \minipage, and it is working all fine. But I find, that som
features from \pstricks are not possible in the \minipage environment. F.
ex. creating two y-axes or using "nEnd" in a listplot.

Is it possible to get the full functionality of pstricks in \minipage? Or
can I use another set up? I have tried subfloat, with the same setup.

Here is an example:

\begin{figure}[h]
\hfill
\begin{minipage}[t]{.45\textwidth}
\psset{xunit=0.75 mm}
\pspicture(0,0)(160,6)
\psaxes[Dx=10,dx=0.75 cm,Ox=0,Dy=0.005
,dy=1cm,tickstyle=below,ticksize=5pt](20,0.25)(160,6.25)
\psaxes[xAxis=false,tickstyle=top,Dy=0.005
,dy=1cm,tickstyle=below,ticksize=5pt](160,0.25)(160,6.25)
\listplot[linecolor=black,linewidth=1pt, nEnd=140]{\data}
\endpspicture
\caption{Kaplan-Meier Hazard rates from open unemployment into ALMP}
\end{minipage}
\hfill
\begin{minipage}[t]{.45\textwidth}
\psset{xunit=0.375 mm}
\pspicture(0,0)(160,8)
\psaxes[Dx=10,dx=0.375 cm,Ox=0,Dy=0.01
,dy=1cm,tickstyle=below,ticksize=5pt](20,1)(160,8)
\psaxes[xAxis=false,tickstyle=top,Dy=0.01
,dy=1cm,tickstyle=below,ticksize=-5pt](160,1)(160,8)
\listplot[linecolor=black,linewidth=1pt, nEnd=140]{\dataa}
\listplot[linestyle=dashed,linewidth=1pt, nEnd=140]{\datab}
\psline[linestyle=dashed,linewidth=1pt](50,0.25)(70,0.25)
\rput(60,0){Participants}
\psline[linewidth=1pt](100,0.25)(120,0.25)
\rput(110,0){Non-participants}  \label{int}
\caption{Unemployment in 2005}
\end{minipage}
\hfill
\end{figure}

The first error message reads:
! keyval: xAxis undefined.
\KV at error #1->....

When I place the two figures above each others as separate figures,
everything works fine.

Can anyone help?