[pstricks] Two plots with common axis in one subfigure
Joel J. Adamson <adamsonj@email.unc.edu>
adamsonj at email.unc.edu
Mon Apr 20 17:54:11 CEST 2009
Dear PSTricks,
I am trying to design a figure that has two panels, one with two graphs
with a common set of axes (one is a population age-distribution, and the
other is a plot of some functions of age). The other panel is a
distribution (using pst-func), but does not require common axes with the
other two.
Panel b:
\begin{figure}
\centering\caption{Example Gaussian Curves}\label{fig:gaussian}
\psset{yunit=10cm,xunit=2}
\begin{pspicture}(0,0)(1,1)
\psaxes[labels = none, ticks = none](5,0.5)
\psGauss[mue=1, sigma=1]{0}{5}
\psGauss[linecolor = blue, mue = 2, sigma = 1]{0}{5}
\end{pspicture}
\end{figure}
My attempt at panel a (but the figures don't line up):
\begin{figure}
\centering\caption{More Example lines}\label{fig:lines}
\begin{pspicture}(0,0)(6,6)
\psset{yunit=2cm,xunit=1}
\psaxes[labels = none, ticks = none](6,2)
\rput(0.5,-0.5){$\alpha_1$}
\psline{-}(1.5,0)(6,1)
\rput(2.5,-0.5){$\alpha_2$}
\psline{-}(3.5,0)(6,2)
\end{pspicture}
% \end{figure}
% \begin{figure}
% \centering\caption{Example bar chart}\label{fig:bar}
% \psset{yunit=2cm,xunit=1}
\begin{pspicture}(0,0)(5,1)
\readpsbardata{\mydata}{data.txt}
\psbarchart[chartstyle = cluster,
barcolsep = 0,
barsep = 0,
barstyle = {gray,gray,gray,gray,gray,gray},
showpoints = false]{\mydata}
\psaxes[labels = none, ticks = none](6,0.65)
\end{pspicture}
\end{figure}
What's the best way to line up the two figures in panel a?
Thanks!
Joel
--
Joel J. Adamson -- http://www.unc.edu/~adamsonj
University of North Carolina at Chapel Hill
CB #3280, Coker Hall
Chapel Hill, NC 27599-3280
More information about the PSTricks
mailing list