柱状图和折线图叠加?

发布于 2022-12-12 10:31:02
关注者
0
被浏览
1.3k
1 个回答
LaTeXStudio
LaTeXStudio 2022-12-12
这家伙很懒,什么也没写!

excel?还是 tikz?tikz 可以用 pgfplots 宏包:

\documentclass[border=3mm]{standalone}
    \usepackage{pgfplots}

\begin{document}
    \begin{tikzpicture}
\begin{axis}[
    title=Title,
    width=7.8cm,
    enlargelimits=0.15,
    legend style={at={(0.5,-0.15)},
      anchor=north,legend columns=-1},
    ylabel={Pages},
    bar width=7mm, y=4mm,
    symbolic x coords={Firm 1, Firm 2, Firm 3, Firm 4, Firm 5},
    xtick=data,
    x tick label style={rotate=45,anchor=east},
    nodes near coords align={vertical},
    ]
\addplot[ybar, nodes near coords, fill=black!10] 
    coordinates {(Firm 1,3) (Firm 2,7) (Firm 3,8) (Firm 4,13) (Firm 5,16)};
\addplot[draw=blue,ultra thick,smooth] 
    coordinates {(Firm 1,3) (Firm 2,7) (Firm 3,8) (Firm 4,13) (Firm 5,16)};
\end{axis}
    \end{tikzpicture}
\end{document}

image.png

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览