[pstricks] Shading the area between two \listplots

Herbert Voss LaTeX at zedat.fu-berlin.de
Wed May 25 16:28:07 CEST 2005


Alan Ristow wrote:

> 1. The white shading covers part of the x-axis, making the line appear 
> very thin compared to the other lines in the axes frame. (I'm not sure 
> why, because when I use a gray fill in place of the white fill this 
> does not seem to happen.)

draw again the axes frame

>
> 2. I have always disliked \psgrid in combination with psgraph because 
> it places the gridlines on top of the axes frame. If the color used 
> for the \psgrid differs from the color of the frame, then off-color 
> gridlines are printed on top of the frame in the final output. In the 
> code you provided above, for example, gray dots are visible on top of 
> the black axes frame.
>
> I've tried a few other things based on your example, so far with no 
> luck. If you have any other ideas I'd love to hear them, but I'm on a 
> deadline so for the short-term I will probably just go ahead and split 
> my data into two files.

try the following with the pstricks-add, v 2.54

% Shade the area between lines
\begin{psgraph}[axesstyle=frame,ticklinestyle=dotted,xticksize=0 10,%
   yticksize=0 10](0,0)(10,10){1.75in}{1.1in}%
   \readdata{\data}{test.dat}%
   \pscustom[fillstyle=solid,fillcolor=gray]{%
     \psline(0,0)(0,1)      % dummy lines for filling
     \listplot[plotNo=2,plotNoMax=2]{\data}%
     \listplot[plotNo=1,plotNoMax=2,ChangeOrder]{\data}% <----
   }
\end{psgraph}


Herbert





More information about the PSTricks mailing list