[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: filling the area under a curve in gnuplot



On Sun, Jun 15, 2003 at 05:13:41PM +0200, martin f krafft wrote:
} Sorry for asking a gnuplot question here...
} 
} Is it possible to shade the area under a curve in 2D mode (plot)?
} How?

I don't know of a way of doing it from within gnuplot. If you want the
graph in some output format, however, I recommend writing it to EPS and
editing the PostScript by hand. From there you can use ghostscript to turn
it into whatever format you really want, if that isn't EPS.

This doesn't necessarily involve learning PostScript. You need to know
three things:

1) Somewhere, you need to replace a "stroke" with a "fill"
2) PostScript is stack-based, which means that arguments come before
   commands
3) You will almost certainly have to add a few "lineto" commands to the
   list of "lineto" commands that define the curve, since you need the
   corners of the graph area below the curve

} Thanks!
}  .''`.     martin f. krafft <madduck@debian.org>
Good luck!
--Greg



Reply to: