<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Myriad Pro">Hi Hamed,<br>
<br>
here an example file to experiment around a little and to be modified
to your special needs:<br>
<br>
<br>
\documentclass[12pt,a4paper]{article}<br>
\usepackage{geometry}<br>
\geometry{tmargin=1cm,bmargin=1cm}<br>
\usepackage{pst-plot}<br>
\begin{document}<br>
<br>
Without clipping<br>
<br>
\begin{pspicture}(-0.5,-1)(4,4)<br>
\psaxes(4,4)<br>
\psplot{0}{3}{3 x x mul 3 div sub}<br>
\psplot{0.5}{4}{2 x div}<br>
\end{pspicture}<br>
\hfill<br>
\begin{pspicture}(-0.5,-1)(4,4)<br>
\psframe*[linecolor=lightgray](4,4)<br>
\psaxes(4,4)<br>
\psplot{0.5}{4}{2 x div}<br>
\psplot{0}{3}{3 x x mul 3 div sub}<br>
\end{pspicture}<br>
<br>
Without and with \verb|\psclip|<br>
<br>
\begin{pspicture}(-0.5,-1)(4,4)<br>
\psaxes(4,4)<br>
\pscustom[linecolor=red]{%<br>
\psplot{0.5}{4}{2 x div}<br>
\lineto(4,4)}<br>
\pscustom[linecolor=blue]{%<br>
\psplot{0}{3}{3 x x mul 3 div sub}<br>
\lineto(0,0)}<br>
\end{pspicture}<br>
\hfill<br>
\begin{pspicture}(-0.5,-1)(4,4)<br>
\psaxes(4,4)<br>
\begin{psclip}{%<br>
\pscustom[linecolor=red]{%<br>
\psplot{0.5}{4}{2 x div}<br>
\lineto(4,4)}<br>
\pscustom[linecolor=blue]{%<br>
\psplot{0}{3}{3 x x mul 3 div sub}<br>
\lineto(0,0)%<br>
}%<br>
}<br>
\psframe*[linecolor=lightgray](4,4)<br>
\end{psclip}%<br>
\end{pspicture}<br>
<br>
The next two versions are wrong,<br>
but this is important to understand why... (both with \verb|\psclip|<br>
<br>
\begin{pspicture}(-0.5,-1)(4,4)<br>
\psaxes(4,4)<br>
\begin{psclip}{\pscustom[linecolor=red]{%<br>
\psplot{0.5}{4}{2 x div}}<br>
\pscustom[linecolor=blue]{%<br>
\psplot{0}{3}{3 x x mul 3 div sub}}}<br>
\psframe*[linecolor=lightgray](4,4)<br>
\end{psclip}%<br>
\end{pspicture}<br>
\hfill<br>
\begin{pspicture}(-0.5,-1)(4,4)<br>
\psaxes(4,4)<br>
\begin{psclip}{\pscustom[linecolor=red]{%<br>
\psplot{0.5}{4}{2 x div}}<br>
\pscustom[linecolor=blue]{%<br>
\psplot{0}{3}{3 x x mul 3 div sub}}}<br>
\psframe*[linecolor=lightgray](4,4)<br>
\end{psclip}%<br>
\psline[linecolor=green](0,3)(3,0)<br>
\end{pspicture}<br>
<br>
<br>
\begin{pspicture}(-0.5,-1)(4,4)<br>
\psaxes(4,4)<br>
\begin{psclip}{\pscustom[linecolor=red]{%<br>
\psplot{0.5}{4}{2 x div}<br>
\lineto(4,4)}<br>
\pscustom[linecolor=blue]{%<br>
\psplot{0}{3}{3 x x mul 3 div sub}<br>
\lineto(0,0)}}<br>
\psframe*[linecolor=lightgray](4,4)<br>
\end{psclip}%<br>
\psplot{0}{3}{3 x x mul 3 div sub}<br>
\psplot{0.5}{4}{2 x div}<br>
\end{pspicture}<br>
\hfill<br>
\begin{pspicture}(-0.5,-1)(4,4)<br>
\psaxes(4,4)<br>
\begin{psclip}{\pscustom[linestyle=none]{%<br>
\psplot{0.5}{4}{2 x div}<br>
\lineto(4,4)}<br>
\pscustom[linestyle=none]{%<br>
\psplot{0}{3}{3 x x mul 3 div sub}<br>
\lineto(0,0)}}<br>
\psframe*[linecolor=lightgray](4,4)<br>
\end{psclip}%<br>
\psplot{0}{3}{3 x x mul 3 div sub}<br>
\psplot{0.5}{4}{2 x div}<br>
\end{pspicture}<br>
<br>
\end{document} <br>
<br>
<br>
These examples are setup on<br>
<br>
<a class="moz-txt-link-freetext" href="http://tug.org/PSTricks/main.cgi?file=Examples/clip">http://tug.org/PSTricks/main.cgi?file=Examples/clip</a><br>
<br>
Regards,<br>
<br>
Juergen<br>
</font><br>
Hamed wrote:
<blockquote cite="mid:200706112054.l5BKsk121507@tug.org" type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Microsoft Sans Serif";
        panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Microsoft Sans Serif";
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="Section1">
<p class="MsoNormal"><font face="Microsoft Sans Serif" size="2"><span
style="font-size: 10pt; font-family: "Microsoft Sans Serif";">Hi,<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Microsoft Sans Serif" size="2"><span
style="font-size: 10pt; font-family: "Microsoft Sans Serif";">Can we
do it for a
region bounded by two curve like the region bounded by y=x and
y=x^2 for example. Thanks a lot.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Microsoft Sans Serif" size="2"><span
style="font-size: 10pt; font-family: "Microsoft Sans Serif";"><o:p> </o:p></span></font></p>
</div>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
pstricks mailing list
<a class="moz-txt-link-abbreviated" href="mailto:pstricks@tug.org">pstricks@tug.org</a>
<a class="moz-txt-link-freetext" href="http://tug.org/mailman/listinfo/pstricks">http://tug.org/mailman/listinfo/pstricks</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="65">--
jürgen gilg
austr. 59
70376 stuttgart
tel 0711-59 27 88
e-mail <a class="moz-txt-link-abbreviated" href="mailto:gilg@acrotex.net">gilg@acrotex.net</a>
webpage <a class="moz-txt-link-abbreviated" href="http://www.acrotex.net">www.acrotex.net</a>
<a class="moz-txt-link-abbreviated" href="http://www.gilligan-online.de">www.gilligan-online.de</a></pre>
</body>
</html>