答案1
ybar
欢迎。此类图可以通过中的图获得pgfplots
。我的问题是,我得到的值与您似乎得到的值相差甚远,但就标准化而言,这个值相当接近。
\documentclass[tikz,border=3mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16,width=14cm,height=6cm}
\begin{document}
\begin{tikzpicture}
\begin{axis}[ybar,
domain=1950:2012,xmin=1948,xmax=2014,
samples=63,bar width=2pt,
xticklabel style={rotate=90,font=\tiny,
/pgf/number format/set thousands separator=},
xtick={1950,1951,...,2012}
]
\addplot {6029.7*pow(1.031,x)/(6.72*x+259.4)};
\end{axis}
\end{tikzpicture}%
\end{document}
人们可以手动调整标准化。
\documentclass[tikz,border=3mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16,width=14cm,height=6cm}
\begin{document}
\begin{tikzpicture}[declare function={f(\x)=6029.7*pow(1.031,\x)/(6.72*\x+259.4);}]
\begin{axis}[ybar,
domain=1950:2012,xmin=1948,xmax=2014,
ymin=19,ymax=64,
samples=63,bar width=3pt,
xticklabel style={rotate=90,font=\small,
/pgf/number format/set thousands separator=},
xtick={1950,1952,...,2012},
ytick={20,30,...,70},minor y tick num=4,
yminorgrids,ymajorgrids,
title={$\displaystyle\frac{P(t)}{N(t)}=\frac{6029.7\cdot 1.031^t}{6.72\,t+259.4}$},
title style={anchor=north,at={(0.5,0.95)},fill=white}
]
\addplot {f(x)*47/f(2012)+15};
\end{axis}
\end{tikzpicture}%
\end{document}