I want to draw the attached graph in LATEX. But i could not. Please help me.enter image description here

  • 3
    With package pgfplot this should be relative simple. First, you manual accompanied with package, then determine functions for your graphs, and on basis of numerous examples given in the manual construct minimal working example ant provide it to SE. Then some can more easy help you.
    – Zarko
    Commented Jul 31, 2014 at 8:05
  • 3
    Welcome to TeX.SX! You write: "but I could not". Please let us know what you have tried. How should we help you without this information. And you should give much more information: Are the colours important, the differing fonts, the arrow heads...
    – LaRiFaRi
    Commented Jul 31, 2014 at 8:26

5 Answers 5


You can use the pgfplots package to render that plot, because I did not have your functions, I used some sample functions (the same functions the others have used in their answers to your question). You can use this code as a template to produce your own plots.

Note that the pgfplots package manual is so perfect, has many different examples (and options) and easy to read. I am a basic user of LaTeX, but in a short period of time, I understood how should I work with the package.



    axis lines = center,
    \addplot [red, thick] {4};
    \node at (axis cs:5,4) [pin={60:$y=\frac{A}{\alpha+d}$},inner sep=0pt] {};
    \addplot [blue, thick] {2^(-x/2+3)-2};
    \addplot [green, thick] {4*(1-1.2^(-3*x+1))};
    \addplot [black, mark = *] coordinates {( 4, 0)} node[pin=-60:{$M_C^*$},inner sep=0pt] {};
    \addplot [black, mark = *] coordinates {( 0.33, 0)} node[pin=-60:{$M_C$},inner sep=0pt] {};
    \addplot [black, mark = *] coordinates {( 1.832835, 2.23858)} node[pin=-2:{$(M_3^*, Y^*)$},inner sep=0pt] {};

and here is the output:

enter image description here

You can use lualatex alongside this package too. See the previous edit of my answer to see an example of how to use it with pgfplots package and how complicated functions can be plotted. Regarding a comment to this answer:

lualatex can be considered as a way to avoid memory restrictions (often needed) or to avoid numerical inaccuracies (almost never necessary).

P.S. Because a bounty is started on this question, I edited my answer to have an output which looks like the other answers on the question but using a different LaTeX code. For previous codes please see the revisions of my answer.

  • 1
    Good answer! Just for the records: note that you do not need lualatex here - it is sufficient to use \addplot [solid, thick] {x^2}; and \addplot [dashed, thick] {x^3};, respectively. Commented Aug 5, 2014 at 19:29
  • @ChristianFeuersänger After I finish my thesis, I really want to spend some time to learn more about the lualatex and pgfplots. I should again thank you that introduced me this package for latex.
    – enthu
    Commented Aug 5, 2014 at 19:31
  • You are welcome. My best wishes for your thesis! Regarding the interaction of pgfplots and lualatex: lualatex can be considered as a way to avoid memory restrictions (often needed) or to avoid numerical inaccuracies (almost never necessary). For all other cases, you do not need it. This holds for all versions of pgfplots up to and including 1.10 (the current stable). Commented Aug 5, 2014 at 20:05
  • @ChristianFeuersänger Thanks, I edited my answer to both make the answer code easier/simpler and to mention a little information about lualatex.
    – enthu
    Commented Aug 5, 2014 at 20:19

Here is a tikz-ish version of Please don't touch's answer. I think the code doesn't need more explanation, but in doubt just ask.

Updated Version - See version history

\documentclass[border=5mm, 12pt, tikz]{standalone}
\usetikzlibrary{calc, intersections, arrows, shapes, positioning, fit, backgrounds}

\begin{tikzpicture}[domain=-1:10, samples=250]
 % Function definitions
  % Plots, clipped draw area
  \clip (-1,-2) rectangle (10,8);
  \draw[ultra thick, blue, name path=ff] plot ({\x}, {\f});
  \draw[ultra thick, red,  name path=fg] plot ({\x}, \g) node [black, above left] {$Y=\frac{A}{\alpha+d}$};
  \draw[ultra thick, green!75!black, name path=fh] plot  ({\x}, {\h});
  % Axes
  \draw [thick, ->, >=triangle 45, name path global=yaxis] (0,-2) -- (0,8) node [above] {$Y$};
  \draw [thick, ->, >=triangle 45, name path global=xaxis] (-2,0) -- (10,0) node [right] {$M$};
  % Intersections
  \fill [name intersections={of=ff and xaxis}] (intersection-1) circle (.1cm) node [below=.5cm] {$M_c^*$};
  \fill [name intersections={of=fh and xaxis}] (intersection-1) circle (.1cm) node [below=.5cm] {$M_c$};
  \fill [name intersections={of=ff and fh}] (intersection-1) circle (.1cm) node [right=.5cm] {$M_3^*,Y^*$};

 % Legend
 \begin{scope}[text width=4cm, node distance=0cm]
  \node at (10,8) [below left, blue] (y1) {$\bullet$ $y=2^{-x/2+3}-2$}; 
  \node [below=of y1, red] (y2) {$\bullet$ $y=4$};
  \node [below=of y2, green!75!black] (y3) {$\bullet$ $y=4(1-1.2^{-3x+1})$};
 \begin{scope}[on background layer]
  \node [rectangle, draw, thick, fit=(y1) (y2) (y3)] () {};

Resulting image


Run with xelatex


\psaxes[labelFontSize=\scriptstyle,ticksize=0 4pt]{->}(0,0)(-2,-2)(8,8)[$M$,-90][$Y$,0]
\psline[linecolor=red](-2,4)(8,4) \uput[90](7,4){$Y=\dfrac{A}{\alpha+d}$}
\psintersect[name=D, showpoints]{A}{B}\uput[0](D1){$M_3^*,Y^*$}
\psintersect[name=E, showpoints]{A}{C}\uput[-45](E1){$M_c$}


enter image description here

  • where did you introduce the functions to be plotted in your code?
    – enthu
    Commented Aug 5, 2014 at 8:07
  • 1
    – user2478
    Commented Aug 5, 2014 at 8:35
  • A typo is detected. The syntax is \psplot{start}{end}{function}. Commented Aug 6, 2014 at 6:10




\FPeval\XOL{0-1/3} % of DeltaX
\FPeval\XOR{1/3} % of DeltaX
\FPeval\YOB{0-1/2} % of DeltaY
\FPeval\YOT{1/2} % of DeltaY







    \color{NavyBlue}\rule{12pt}{1pt} & \color{NavyBlue} $y=2^{-x/2+3}-2$ \\
    \color{Red}\rule{12pt}{1pt} & \color{Red} $y=4$ \\
    \color{ForestGreen}\rule{12pt}{1pt} & \color{ForestGreen} $y=4(1-1.2^{-3x+1})$
    \uput[90](-1,\g){$Y=\frac{A}{\alpha + d}$}

enter image description here


And here's a simple version in plain Metapost. Most of this is explained in the Metapost introduction, and all of it in the Metapost manual.

enter image description here

Note in particular that you don't need to know the formulas for the curves. You can just sketch them using the direction notation as shown, and use intersectionpoint to find the point where they cross.

prologues := 3;
outputtemplate := "%j%c.eps";


u := 1.3cm;
minx = -2u; maxx = 6u;
miny = -2u; maxy = 4u;
h = 2u;

path x.axis, y.axis, curve[];

x.axis = (minx,0) -- (maxx,0);
y.axis = (0,miny) -- (0,maxy);

label.top(btex $Y$ etex, (0,maxy));
label.rt (btex $M$ etex, (maxx,0));

curve1 = (-1u, miny) {dir  70} .. {dir   3} (maxx,.9h);
curve2 = (-1u, maxy) {dir -80} .. {dir -10} (maxx,-1u);

drawarrow x.axis withcolor .67 red;
drawarrow y.axis withcolor .67 red;

draw (minx,h) -- (maxx,h) dashed evenly scaled .8;
label.urt(btex $\displaystyle Y={A\over\alpha+d}$ etex,(minx,h));

draw curve1;
draw curve2;

dotlabel.lrt (btex $M_c$   etex, x.axis intersectionpoint curve1);
dotlabel.llft(btex $M_c^*$ etex, x.axis intersectionpoint curve2);

% do the last dot label by hand to avoid over printing the curves
z1 = curve1 intersectionpoint curve2;
fill fullcircle scaled dotlabeldiam shifted z1;
label(btex $\quad(M_3^*,Y^*)$ etex, z1 + 26 right);


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .