I know how to use pscustom to fill the area between two curves but how can I fill only, say, a rectangle below part of a curve plotted with a .dat file?

What I did was to generate two .dat files, one with my curve and other with a line on x-axis, which I called the groundData.



Since the data.dat file have information on several curves the plotNo and plotNoMax options help to pick the correct one. When I do this, instead of a rectangle below part of the curve (the part over the segment of line on the x-axis) I get two triangles with touching vertices as if the last point of data.dat was being connected to the first point in groundData.dat. The changeorder option was supposed to take care of this but it seems to have the same effect as if it was not there.

Can you help me? Thank you.

  • We might try to help, if we had the data files and a full compilable code…
    – Bernard
    Mar 5, 2017 at 23:43

1 Answer 1


You can use some of the \listplot parameter:

\pstScalePoints(1,1){1000 div}{1000 div}
\psaxes[Dx=200,dx=2.5cm,Dy=100,ticksize=0 5pt,tickstyle=inner,
  \psline(0.2,0)(0.2,10)% 10 is only a guess


enter image description here

With linecap=2 there is drawn a straight line from (0.2,10) to the value of the data. And the same for the right side from data end to (0.8,10)

The data file is part of your TeX installation. It uses values from 0..994 for x and 0..256500 for y. Should be simply adopted to your data area.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .