有人可以帮我将类似于上图(行间)的标签“第 1 个时期”、“第 2 个时期”……“第 n 个时期”添加到下图显示的时间线,并删除“1”、“2”、“3”……,“n-1”、“n”。
\documentclass[10pt,xcolor={table,dvipsnames},t]{beamer}
\subsection{Timeline}
\begin{frame}{Timeline}
\begin{tikzpicture}
\draw[line width=1pt] (0,0) -- node[below=1mm,pos=0.6,scale=2] {$\cdots$} (10,0)node[right=1mm]{(periods)};
\foreach \x/\y in {0/0}{
\draw[line width=1pt] (\x,-2mm)node[below](\x){\strut\y} -- (\x,2mm)node[above]{};
}
\foreach \x/\y in {1/1,2/2,3/3,9/$n-1$,10/$n$}{
\draw[line width=1pt] (\x,-2mm)node[below](\x){\strut\y} -- (\x,2mm)node[above]{};
}
\draw[-latex] (0,-7mm) -- +(0,-10mm)node[below]{$PV_{N\rvert I/Y}$};
\draw[-latex] (10,-7mm) -- +(0,-10mm)node[below]{$FV_{N\rvert I/Y}$};
\end{tikzpicture}
\end{frame}
答案1
也许这可以让你开始:
\documentclass[border=10mm]{standalone}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
\begin{document}
\begin{tikzpicture}
\draw[line width=1pt] (0,0) -- node[below=4mm, pos=0.6] {$\cdots$} (10,0) node[right=1mm] {(periods)};
\foreach \x in {0,...,3,9,10} {
\draw[line width=1pt] (\x,-2mm) -- (\x,2mm);
}
\foreach \x/\y in {
1/1\textsuperscript{st},
2/2\textsuperscript{nd},
3/3\textsuperscript{rd},
10/$n$\textsuperscript{th}} {
\draw[decorate, decoration={brace, mirror}] ([xshift=1pt]{\x-1},-2.75mm) -- ([xshift=-1pt]\x,-2.75mm) node[midway, below=1mm, align=center, font=\footnotesize] {\y \\ period};
}
\draw[-latex] (0,-5mm) -- +(0,-10mm) node[below] {$PV_{N\rvert I/Y}$};
\draw[-latex] (10,-5mm) -- +(0,-10mm) node[below] {$FV_{N\rvert I/Y}$};
\end{tikzpicture}
\end{document}