这是我的第一幅图,我尝试用谷歌搜索了半个小时,但还是无法弄清楚如何修复我复制此图的尝试。有人能帮帮我吗?
这就是我得到的:
迄今为止的错误:
- 抛物线 (2,2) 节点 [pos=0.8, right=10pt] {erfahren};定位不起作用,无论如何,寓言都是错误的
- 我找不到如何绘制这些寓言,例如 -((x-2)^2)+2
先感谢您 !
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\draw (0,0) -- (5,0) node[pos=0.5,below=14pt] {Zeit$\rightarrow$};
\draw (0,0) -- (0,3) node[pos=0.5, left=10pt][text width=2cm]{$\uparrow$\\Emotionale\\Insensität};
\draw (0,0) parabola (2,2)node[pos=0.8, right=10pt] {erfahren};
\draw[dashed] (0,0) parabola (3,2)node[pos=0.5, right=10pt] {vorhergesagt};
\end{tikzpicture}
\end{document}
答案1
使用一点 TikZ:
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
% Time axis
\draw (0,0) -- node[below=1cm] {Time $\to$} (6,0);
% Emotional axis
\draw (0,0) -- node[left] {\parbox{2cm}{\centering $\uparrow$ \\ Emotional \\ intensity}} (0,4);
% Time ticks
\foreach \x [count=\j] in {0.2,3,4.5,6} {
\draw (\x,0) coordinate (t\j) -- (\x,-0.1cm) node[below] (tt\j) {Time \j};
}
\node[below] at (tt1.south) {(Emotional event)};
% Curves
\draw (t1) .. controls +(1,2) .. node[above right] {Experienced} (t2);
\draw[dashed] (t1) .. controls +(1,4) .. node[above right] {Predicted} (t4);
\end{tikzpicture}
\end{document}