在分组条形图上添加点 - Latex

在分组条形图上添加点 - Latex

我正在尝试在分组条形图上添加一个蓝点。有什么方法可以实现吗?

这是我的乳胶代码:

\documentclass{article}
\usepackage{pgfplots}
\usepackage{filecontents}

\begin{filecontents*}{book.data}
in  Unemployement   
01 7.8
02 9
03 8.9 
04 9.1
05 9.7 
06 9.6 
07 10.8
08 11.7
09 10.3
10 9.8
11 11
12 10.9 
13 9.1
14 9.7 
15 9.6 
16 10.8
17 11.7
18 10.3
\end{filecontents*}

%\pgfplotsset{compat=1.13}
\begin{document}
\begin{center}
  \begin{tikzpicture}
    \pgfplotsset{lineplot/.style={blue,mark=*}}  
    \begin{axis}[
        width=\textwidth,height=75mm,% <- added
        x tick label style={/pgf/number format/1000 sep=},
        ylabel={Wins},
        xlabel= {Game set},
        %enlargelimits=0.05,% <- commented, default is .1
        legend style={
          at={(0,1)},
          anchor=north west,% <- changed
          %legend columns=-1% <- commented
        },
        nodes near coords,
        every node near coord/.append style={font=\tiny},
        %nodes near coords align={vertical},% <- commented, default
        ybar=0pt,%<- changed
        bar width=13pt% <- added
      ]
      \addplot
        coordinates {(01,3) (02,2)
          (03,1) (04,2) (05,1) (06,4) (07,3) (08,2) (09,3)};
      \addplot
        coordinates {(01,1) (02,2) 
          (03,1) (04,0) (05,2) (06,3) (07,2) (08,1) (09,2)};
      \legend{HM, HH}
    \end{axis}
    
    \begin{axis}[
            xmin = 0,
            xmax = 20,
            axis y line=right,
            axis x line=none,
            width= \textwidth,
            height = 0.6\textwidth,
            ymajorgrids = true,
            enlarge x limits=0.01,
            axis line style={},
            ylabel = {score},
            xmajorgrids,
            scaled y ticks = false,
            ymin=6, ymax=12,
    ]
    \addplot [lineplot] table[x expr=\coordindex+1,y=Unemployement] {book.data};
    \end{axis}    
  \end{tikzpicture}
\end{center}
\end{document}

相关内容