1

How could I achieve that? (TikZ preferably)

enter image description here

I tried with \draw[blue] plot[smooth] coordinates {(0,0) (3.5,4) (5.5,7)}; but It's not super efficient and doesn't exactly produce the result.

Any help?

Thanks

5
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. As a gift of bienvenue, you can find below an answer to your need.
    – SebGlav
    Commented Mar 2, 2022 at 11:32
  • Hm, "super-linear"? So far I know only linear function 😎
    – Zarko
    Commented Mar 2, 2022 at 12:54
  • Do you have any set of data that you want to use?
    – hola
    Commented Mar 2, 2022 at 22:02
  • @hola No, the lecture class slide didn't provide any data, It was just arbitrary to show how speed could evolve.
    – Mordecai
    Commented Mar 3, 2022 at 19:36
  • @Zarko Hehe, but It exists :P
    – Mordecai
    Commented Mar 3, 2022 at 19:36

1 Answer 1

7

Use Bézier curves.

Bézier curves

\documentclass[tikz,border=3.14mm]{standalone}

\begin{document}
    \begin{tikzpicture}[
        font=\sffamily\scriptsize,
        lbl/.style={
            rectangle,
            draw,
            text width=1.8cm,
            align=center,
            inner sep=2pt
            }
        ]
        
        \draw[<->] (0,6) |- (6,0) node[pos=0.1,left] {S\textsubscript{p}} node[pos=0.75,below] {\# of processors};
        \draw (0,0) -- (5,5) coordinate[pos=0.9] (A);
        \draw[red,thick] (0,0) .. controls ++(3,3) and ++(-1,-0.1) .. (5.5,3) coordinate[pos=0.6] (B);
        \draw[olive,thick] (0,0) .. controls ++(3,3) and ++(-.2,-1) .. (3.5,5.5) coordinate[pos=0.7] (C);
        
        \draw[<-] (A) --++ (0.75,-0.5) node[lbl,below] {linear speedup};
        \draw[<-] (B) --++ (0.5,-1) node[lbl,below] {sub-linear speedup (common)};
        \draw[<-] (C) --++ (-1.5,0.5) node[lbl,above] {super-linear speedup (wonderful)};
    \end{tikzpicture}
\end{document}
0

You must log in to answer this question.

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