[pstricks] shading area under a curve
Derek Collis
iscah3141 at earthlink.net
Sat Apr 7 00:05:41 CEST 2007
Herbert,
Many thanks. I find this works without the SpecialCoor command as well.
Derek
Herbert Voss wrote:
> Derek Collis schrieb:
>
>> This is good, now can I ask one more question: How can I graph say,
>> y=log x, and shade the region between x=3 and x=4, but without
>> evaluating log 3 and log 4 to give the y-coordinates of the lines x=3
>> and x=4. Is there a way to graph the boundary lines of the shaded region
>> from (3,0) to (3, the point on log x) and (4,0) to (4, the point on log x).
>>
>>
>
>
> use \SpecialCoor
>
> \documentclass{article}
> \usepackage{pst-plot}
> \SpecialCoor
>
> \pagestyle{empty}
> \begin{document}
>
> \psset{yunit=2}
> \begin{pspicture}(-.5,-2)(5,1)
> \psplot[linewidth=1pt,linecolor=blue]{0.01}{5}{x log}
> \pscustom[fillstyle=solid,fillcolor=cyan,linestyle=none]{%
> \psline(3,0)(!3 dup log)
> \psplot{3}{4}{x log}
> \psline(!4 dup log)(4,0)}
> \psaxes{->}(0,0)(-.5,-2)(5,1)
> \end{pspicture}
>
> \end{document}
>
>
> Herbert
> _______________________________________________
> pstricks mailing list
> pstricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
>
>
More information about the PSTricks
mailing list