3

The original diagram:

original

My try:

\documentclass{scrartcl}
\usepackage{
            tikz,
            amsmath
           }

\usetikzlibrary{datavisualization.formats.functions}

\begin{document}

  \begin{tikzpicture}

    \datavisualization[
                       scientific axes = {clean,
                                          standard labels
                                         },
                       x axis = {
                                 include value = {
                                                  0.35,
                                                  2.15
                                                 },
                                 grid = {minor = {at = {
                                                        1,
                                                        1.5
                                                       }}},
                                 label = $t$
                                },
                       y axis = {
                                 include value = {
                                                  -.25,
                                                  1
                                                 },
                                 label = Schadstoffkonzentration
                                },
                       data/format = function,
                       visualize as smooth line/.list = {
                                                         HC,
                                                         CO,
                                                         NO_x
                                                        },
                       style sheet = vary dashing,
                       HC = {label in legend = {text = HC}},
                       CO = {label in legend = {text = CO}},
                       NO_x = {label in legend = {text = NO$_{\text x}$}}
                      ]
    data[set = HC] {
                    var x : interval[.5:2];
                    func y = exp(-3 * \value x) + .15;
                   }
    data[set = CO] {
                    var x : interval[.5:2];
                    func y = exp(-\value x) + .15;}
    data[set = NO_x] {
                      var x : interval[.75:2];
                      func y = ln(\value x) + .15;
                     }
    info {
          \draw
            (visualization cs: x = 1.25, y = .8) node {schadstoffarme Verbrennung};
         };

  \end{tikzpicture}

\end{document}

Gives:

result Tasks:

  1. Completely remove the ticks.
  2. Improve the info.
  3. Maybe some optimization of the whole code.

Something like this:

wish

Also completely different solutions, which solve the whole task are welcome!

Thank you for your help and effort in advance!

  • 2
    Dat indentation tho... – percusse Jul 29 '18 at 15:49
  • Hello @percusse! I don't understand what you mean? Could you please explain it. – Su-47 Aug 3 '18 at 3:28
3

OK, task one is easy, just add ticks=none. For the others I have some simple proposals, but I will be happy to respond to feedback. And you should talk to @CarLaTeX, who has a really efficient car. ;-)

\documentclass{scrartcl}
\usepackage{
            tikz,
            amsmath
           }

\usetikzlibrary{datavisualization.formats.functions}

\begin{document}

  \begin{tikzpicture}

    \datavisualization[
                       scientific axes = {clean,
                                          standard labels
                                         },
                       x axis = {
                                 include value = {
                                                  0.35,
                                                  2.15
                                                 },
                                 grid = {minor = {at = {
                                                        1,
                                                        1.5
                                                       }}},
                                 label = $t$,
                                 ticks=none %<-added
                                },
                       y axis = {
                                 include value = {
                                                  -.25,
                                                  1
                                                 },
                                 label = Schadstoffkonzentration,
                                 ticks=none %<-added
                                },
                       data/format = function,
                       visualize as smooth line/.list = {
                                                         HC,
                                                         CO,
                                                         NO_x
                                                        },
                       style sheet = vary dashing,
                       HC = {label in legend = {text = HC}},
                       CO = {label in legend = {text = CO}},
                       NO_x = {label in legend = {text = NO$_{\text x}$}}
                      ]
    data[set = HC] {
                    var x : interval[.5:2];
                    func y = exp(-3 * \value x) + .15;
                   }
    data[set = CO] {
                    var x : interval[.5:2];
                    func y = exp(-\value x) + .15;}
    data[set = NO_x] {
                      var x : interval[.75:2];
                      func y = ln(\value x) + .15;
                     }
    info {
          \draw
            (visualization cs: x = 1.25, y = 1.1) node[font=\small] {schadstoffarme Verbrennung};
         };

  \end{tikzpicture}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.