2017-12-08 12 views
0

3 가지 색상의 3 가지 열에 단일 값을 갖는 라텍스 막 대형 차트를 만들려고합니다.라텍스 기둥 형 차트

\begin{tikzpicture} 
\begin{axis}[ 
x tick label style={ 
    /pgf/number format/1000 sep=}, 
ylabel=Accuracy, 
enlargelimits=0.05, 
legend style={at={(0.5,-0.15)}, 
    anchor=north,legend columns=-1}, 
ybar interval=0.7,] 
\addplot 
coordinates {(1930,80)}; 
\addplot 
    coordinates {(1930,80)}; 
\addplot 
coordinates {(1930,80)}; 
\legend{Far,Near,Here} 
\end{axis} 
\end{tikzpicture} 

답변

1

당신은 가짜 보이는 ybar interval 매개 변수 (예를 들어, ybar=5pt)를 ybar 크기를 추가하고 제거해야합니다 플롯 사이에 간격을 추가하는 방법을

\begin{tikzpicture} 
    \begin{axis}[ 
     ybar=5pt, 
     ylabel=Accuracy, 
     xtick=data, 
     legend style={at={(0.5,-0.15)}, anchor=north,legend columns=-1}, 
     x tick label style={/pgf/number format/1000 sep=}, 
     enlargelimits=0.05, 
    ] 
     \addplot coordinates {(1930,80)}; 
     \addplot coordinates {(1930,80)}; 
     \addplot coordinates {(1930,80)}; 
     \legend{Far,Near,Here} 
    \end{axis} 
\end{tikzpicture} 

enter image description here

+0

을 –

+0

당신을 'ybar' 매개 변수를 사용하여 막대 사이에 간격을 추가 할 수 있습니다. 나는 5pt의 예를 가지고 답을 갱신했다. – pchaigno