MWE:
\documentclass{scrartcl}
\usepackage{tikz}
\usetikzlibrary{datavisualization.formats.functions}
\begin{document}
\begin{tikzpicture}
\datavisualization[
scientific axes={clean},
all axes = grid,
x axis = {
min value = 0,
ticks = {
major = {
also at = 1.5 as $T_0$,
at = 2 as $T_0 + T_1$
},
stack
},
label = $t$
},
y axis = {
min value = 0,
ticks = {major = {also at = 4.5 as $K$}},
label = $y(t)$
},
visualize as smooth line/.list = {
curve,
line 1,
line 2
},
line 2 = {style = dashed}
]
data[
set = curve,
format = function
] {
var x : interval[1.5 : 6];
func y = 9/2 * (1 - exp(3 - 2 * \value x));
}
data[set = line 1] {
x, y
1.5, 0
2, 4.5
}
data[set = line 2] {
x, y
2, 4.5
2, 0
};
\end{tikzpicture}
\end{document}
at = 2 as $T_0 + T_1$ completely disabling the other ticks and ignores also at = 1.5 as $T_0$:
If I change the line 16 to also at = 2 as $T_0 + T_1$ than I get
So, how can one get the custom tick text without disabling/overpainting the automatically generated ticks? The second question is how can be T_0 and T_0 + T_1 placed without overlapping?
Thank you for your help and effort in advance!





1.5and2are removed. I wish to let the automatically generated ticks and only replace/add new ticks (with labels) by1.5and2, like nearly done in the below answer. I also don't want to set all ticks manually. – Su-47 Jan 09 '20 at 20:13datavisualization, because I have no experience withpgfplotsand like said in theTikZ & PGFmanual on page 337 ispgfplotsan alternative for thedatavisualizationnot a replacement. – Su-47 Jan 09 '20 at 20:19