TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We are making a plot as follows:



        \draw[style=help lines, ystep=1, xstep=1] ;

        \draw (-.25,-.25) node[auto] {0};
        \draw[->] (\xmin,\ymin) -- (\xmax,\ymin) node[right] {$x$};
        \draw[->] (\xmin,\ymin) -- (\xmin,\ymax) node[above] {$f(x)$};

        \draw[color=red,smooth] plot [domain=0:8] (\x,{((\x-4)^2)/5+3)});

        \draw[dashed]  (2,0) node[below] {$x_1$} -- (2,3.8) node[up,left] {$f(x_1)$};
        \draw[dashed]  (7,0) node[below] {$x_1$} -- (7,4.8) node[up,right] {$f(x_2)$};

        \draw[dashed,orange]  (4,0) node[below] {$\alpha\,x_1+(1-\alpha)x_2$} -- (4,3) node[below] {$f(\alpha\,x_1+(1-\alpha)x_2)$};
        \draw[color=black,dashedd] (4,3) -- (4,4.2) node[up] {$\alpha f(x_1) + (1-\alpha)f(x_2)$};
        \draw[color=blue] (2,3.8) -- (7,4.8);

We want to achieve:

  1. The labels $f(x_1)$, ... needs to be smaller but more clear -- by bringing more color in them.
  2. Display that : $\alpha f(x_1) + (1-\alpha)f(x_2) \ge f (\alpha x_1 + (1-\alpha) x_2)$. Just the picture need to tell the story.
  3. Any idea to beautify this plot is very welcome.


share|improve this question

closed as too localized by Jake, Claudio Fiandrino, Marco Daniel, diabonas, zeroth Feb 17 '13 at 16:01

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Why do you load pgfplots and don't use it? pgfplots provides a enhanced axis environment and addplot command for advanced plotting. See manual – bloodworks Feb 16 '13 at 13:29
Try to avoid text over graphics? The orange color might be too light and another color might better accompany the other colors? – N.N. Feb 16 '13 at 13:31
Number 3 is too subjective for SE, please read the FAQ on don't-ask: "avoid asking subjective questions" – Camil Staps Feb 16 '13 at 13:32
Maybe you could use pgfplots legends to put move some formulas further away from the plots? – N.N. Feb 16 '13 at 14:03