[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:

  \centering\caption{Example Gaussian Curves}\label{fig:gaussian}
    \psaxes[labels = none, ticks = none](5,0.5)
    \psGauss[mue=1, sigma=1]{0}{5}
    \psGauss[linecolor = blue, mue = 2, sigma = 1]{0}{5}

My attempt at panel a (but the figures don't line up):

  \centering\caption{More Example lines}\label{fig:lines}
    \psaxes[labels = none, ticks = none](6,2)
% \end{figure}

% \begin{figure}
%   \centering\caption{Example bar chart}\label{fig:bar}
% \psset{yunit=2cm,xunit=1}
\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)

What's the best way to line up the two figures in panel a?


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