我的代码:
\documentclass{scrartcl}
\usepackage{tikz}
\usetikzlibrary{datavisualization.formats.functions}
\begin{document}
\begin{tikzpicture}
\datavisualization[
scientific axes,
visualize as smooth line/.list = {
degressiv,
linear,
progressiv
},
style sheet = vary dashing,
degressiv = {
label in legend = {text = degressiv}
},
linear = {
label in legend = {text = linear}
},
progressiv = {
label in legend = {text = progressiv}
}
]
data[set = degressiv] {
x, y
0, 0
.45, .75
1, 1
}
data[set = linear] {
x, y
0, 0
1, 1
}
data[set = progressiv] {
x, y
0, 0
.6, .25
1, 1
};
\end{tikzpicture}
\end{document}
生成:
我希望:
我该怎么做?
提前感谢您的努力!
答案1
我刚刚在最后添加了两行。
\documentclass{scrartcl}
\usepackage{tikz}
\usetikzlibrary{datavisualization.formats.functions}
\begin{document}
\begin{tikzpicture}
\datavisualization[
scientific axes,
visualize as smooth line/.list = {
degressiv,
linear,
progressiv
},
style sheet = vary dashing,
degressiv = {
label in legend = {text = degressiv},
},
linear = {
label in legend = {text = linear}
},
progressiv = {
label in legend = {text = progressiv},
}
]
data[set = degressiv] {
x, y
0, 0
.45, .75
1, 1
}
data[set = linear] {
x, y
0, 0
1, 1
}
data[set = progressiv] {
x, y
0, 0
.6, .25
1, 1
}
info{
\node(Ustar) at (visualization cs: x=0.1, y=0.8) {$U^*$};
\node(U) at (visualization cs: x=0.8, y=0.1) {$U$};
};
\end{tikzpicture}
\end{document}