
\documentclass{book}
\usepackage{pstricks,pst-plot}
\usepackage{tikz}
\usepackage{verbatim}
\usepackage{pgfplots}

\usepackage{amsmath,pgfkeys,diagbox}
\usepackage{mathabx}
\usepackage{xepersian}
\settextfont{IRLotus}
\setdigitfont{IRLotus}
\begin{comment}

\usetikzlibrary{positioning,decorations.pathreplacing,matrix}
\usetikzlibrary{mindmap,trees,shadows}
\usetikzlibrary{patterns}




\end{comment}

\usetikzlibrary{arrows,calc}
\usepackage{relsize}
\newcommand\LM{\ensuremath{\mathit{LM}}}
\newcommand\IS{\ensuremath{\mathit{IS}}}
\begin{document}

\begin{center}


\begin{tikzpicture}[
        scale=1,
        IS/.style={blue, thick},
        LM/.style={red, thick},
        axis/.style={very thick,<->, line join=miter},
        important line/.style={thick}, dashed line/.style={dashed, thin},
        every node/.style={color=black},
        dot/.style={circle,fill=black,minimum size=4pt,inner sep=0pt,
            outer sep=-1pt},
    ]


% تعیین نقاط انتهایی محور های مختصات
\node [left] at (-4.1,.1) {$i+g$};
\node [style=->] at (4.2,.1) {$y$};
\node [style=->] at (0,3.2) {$r$};
\node [style=->] at (0,-3.2) {$s+t$};
\coordinate(l)at(-4,0);
\coordinate(r)at(4,0);
\coordinate(t)at(0,3);
\coordinate(b)at(0,-3);
% رسم محور ها
\draw[line width=1.5pt,scale=3,red] (l) -- (r);
\draw[line width=1.5pt,scale=3,red] (t) -- (b);
% رسم منحنی ها و خطوط با نقاط کمکی 
% رسم سهمی ربع اول
\draw[line width=1pt,scale=1] (.7,3) .. controls (1,2) and (1.5,1) .. (3,.5);

%رسم سهمی جابجا شده ربع اول

\draw[line width=1pt,scale=1,xshift=.4cm, yshift=.3cm, IS, blue!60]  (.7,2.7) .. controls (1,2) and (1.5,1) .. (2.6,.6);


% رسم سهمی ربع دوم
\draw[line width=1pt,scale=1] (-.7,3) .. controls (-1,2) and (-1.5,1) .. (-3,.5);

%\draw[line width=1pt,scale=1,xshift=-.4cm, yshift=.3cm, IS, blue!60] (-.7,2.7) .. controls (-1,2) and (-1.5,1) .. (-2.6,.6);

% رسم خط ربع سوم
\draw[line width=1pt,scale=1.5] (-2,-2) .. controls (0,0) and (0,0) .. (0,0);
% رسم خط ربع چهارم
\draw[line width=1pt,scale=1.5] (2,-2) .. controls (0,0) and (0,0) .. (0,0);
\draw[line width=1pt,scale=1.5] (2.1,-1.5) .. controls (0,0) and (0,0) .. (0,0);
% رسم خط g ربع دوم و سوم
\draw[line width=1pt,scale=1,red!100] (-.7,0) .. controls (-.7,2)  .. (-.7,3);
%\draw[line width=1pt,scale=1,blue!100] (-1.1,0) .. controls (-1.1,2)  .. (-1.1,3);

%تعیین مختصات نقاط روی سهمی ربع اول
\coordinate(a_1) at (1,2.5);

\draw[dashed,line width=.5pt,red](1.5,1.5)--(1.5,-1.5);
\draw[dashed,line width=.5pt,red](2.1,1.5)--(2.1,-1.5)--(-0,-1.5)--(-1.5,-1.5)--(-1.5,1.5)--cycle;


%\draw[dashed,line width=.2pt,red](2,2)--(2,0)--(2,-2)--(-2,-2)--(-2,2)--cycle;
\node [anchor=north] at (3.8,-1.8) {$(s+t)_0$};
\node [anchor=north,bend left,] at (3.5,-2.5) {$(s+t)_1$};
\node [anchor=north,bend left,scale=.7] at (.5,-1.1) {$(s+t)_0$};
\node [scale=.8,anchor=north,bend left=45] at (-3,2) {$I(r)+g$};
\node [scale=.8,bend left=45] at (-3,-2) {$i+g=s+t$};
\node [style=->] at (-.35,2) {$\longleftrightarrow$};
\node [anchor=south,bend left,] at (-.35,1.5) {$g$};
\node [anchor=south,bend left,] at (.7,3) {$I_1$};
\node [anchor=south,bend left,] at (1.1,3) {$I_0$};
\node [anchor=north,bend left,] at (3.3,1.2) {$S_0$};
\node [anchor=north,bend left,] at (3.3,.8) {$S_1$};
\fill[fill=green!20!white,draw=green!50!black,thick] (0,0) -- (-.2,-.2) arc (-137:-160:.5) -- cycle;

\node [anchor=south,bend left,] at (-.5,-.4) {$45^0$};
\draw[dotted,step=1] (-4,-4) grid (4,4);

\end{tikzpicture}





\end{center}




\end{document}

