[pstricks] shading area under a curve
Arne Hallam
ahallam at iastate.edu
Sat Apr 7 02:16:25 CEST 2007
This did not work without \SpecialCoor for me.
Derek Collis wrote:
> 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
>>
>>
>>
> _______________________________________________
> pstricks mailing list
> pstricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
>
--
with all thy getting get understanding -- Proverbs 4:7.
In the wildness of speculation it has been suggested (of course more in jest than in earnest),that Europe ought to grow its corn in America, and devote itself solely to manufactures and commerce, as the best sort of division of the labour of the globe -- Thomas Malthus, An Essay on the Principle of Population Book III, Chapter XII.
Arne Hallam
Department of Economics
266 Heady Hall
Iowa State University
Ames, IA 50011
Work: 515-294-5861
FAX: 515-294-0221
Home: 515-292-8739
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20070406/34a79b3b/attachment.html
More information about the PSTricks
mailing list