I modified the code from here. I tried two ways.
1. (source):
\documentclass{scrartcl}
\usepackage{tikz}
\usepackage[per-mode = fraction]{siunitx}
\usetikzlibrary{datavisualization.formats.functions,
decorations.markings
}
\begin{document}
\begin{tikzpicture}
\datavisualization[scientific axes = {clean,
end labels
},
x axis = {label = $\frac{v}{\si{\cubic\m\per\kg}}$},
y axis = {label = $\frac{p}{\si{\bar}}$},
data/format = function,
visualize as smooth line/.list = {isentropic_press,
isobaric,
isentropic_decompress
},
style sheet = vary dashing,
every visualizer/.style = {decoration = {markings,
mark = at position .5 with {\arrow{>}}
}
},
isentropic_press = {label in legend = {text = isentrope Verdichtung}},
isobaric = {label in legend = {text = isobare Abkühlung}},
isentropic_decompress = {label in legend = {text = isentrope Entspannung}}
]
data[set = isentropic_press] {var x : interval[.5 : 2];
func y = 1 / \value x ^ 1.4;
}
data[set = isobaric] {var x : interval[.5 : 1];
func y = 1 / .5 ^ 1.4;
}
data[set = isentropic_decompress] {var x : interval[1 : 2];
func y = 1 / (\value x - .5) ^ 1.4;%-.5: shifts the function by - 0.5 to the right
}
%accents important points
info {\draw (visualization cs:x = 2,
y = {(1 / 2 ^ 1.4)}
) circle [radius = 1pt]
node [right,
font = \footnotesize
] {1};
}
info {\draw (visualization cs:x = .5,
y = {(1 / .5 ^ 1.4)}
) circle [radius = 1pt]
node [above,
font = \footnotesize
] {2};
}
info {\draw (visualization cs:x = 1,
y = {(1 / .5 ^ 1.4)}
) circle [radius = 1pt]
node [above,
font = \footnotesize
] {3};
}
info {\draw (visualization cs:x = 2,
y = {(1 / 1.5 ^ 1.4)}
) circle [radius = 1pt]
node [right,
font = \footnotesize
] {4};
};
\end{tikzpicture}
\end{document}
2. (source):
\documentclass{scrartcl}
\usepackage{tikz}
\usepackage[per-mode = fraction]{siunitx}
\usetikzlibrary{datavisualization.formats.functions,
decorations.markings
}
\begin{document}
\makeatletter
\tikzset{nomorepostaction/.code = {\let\tikz@postactions\pgfutil@empty}}
\makeatother
\begin{tikzpicture}
\datavisualization[scientific axes = {clean,
end labels
},
x axis = {label = $\frac{v}{\si{\cubic\m\per\kg}}$},
y axis = {label = $\frac{p}{\si{\bar}}$},
data/format = function,
visualize as smooth line/.list = {isentropic_press,
isobaric,
isentropic_decompress
},
style sheet = vary dashing,
every visualizer/.style = {postaction = {nomorepostaction,
decorate,
decoration = {markings,
mark = at position .5 with {\arrow{>}}
}
}
},
isentropic_press = {label in legend = {text = isentrope Verdichtung}},
isobaric = {label in legend = {text = isobare Abkühlung}},
isentropic_decompress = {label in legend = {text = isentrope Entspannung}}
]
data[set = isentropic_press] {var x : interval[.5 : 2];
func y = 1 / \value x ^ 1.4;
}
data[set = isobaric] {var x : interval[.5 : 1];
func y = 1 / .5 ^ 1.4;
}
data[set = isentropic_decompress] {var x : interval[1 : 2];
func y = 1 / (\value x - .5) ^ 1.4;%-.5: shifts the function by - 0.5 to the right
}
%accents important points
info {\draw (visualization cs:x = 2,
y = {(1 / 2 ^ 1.4)}
) circle [radius = 1pt]
node [right,
font = \footnotesize
] {1};
}
info {\draw (visualization cs:x = .5,
y = {(1 / .5 ^ 1.4)}
) circle [radius = 1pt]
node [above,
font = \footnotesize
] {2};
}
info {\draw (visualization cs:x = 1,
y = {(1 / .5 ^ 1.4)}
) circle [radius = 1pt]
node [above,
font = \footnotesize
] {3};
}
info {\draw (visualization cs:x = 2,
y = {(1 / 1.5 ^ 1.4)}
) circle [radius = 1pt]
node [right,
font = \footnotesize
] {4};
};
\end{tikzpicture}
\end{document}
But the result in both cases is the same:
What do I wrong? How can I do something like this (arrow tips nearly between to points):
Thank you for your help and effort in advance!




TikZ. I don't have experience withpgfplots. But any solution is better as no solution! Maybe can someone of the professionals help us. – Su-47 Apr 30 '17 at 12:28pgfplots: If you're familiar withTikZ, you shouldn't have much trouble feeling at home inpgfplots, since they're both based onpgfunderneath anyway. Documentation is good as well. Still, I'd be curious about an answer to your actual question, if for no other reason than it bugs me that I've not gotten it to work. :D Good luck! – alpenwasser Apr 30 '17 at 13:39