Skip to content

Commit d8d5424

Browse files
authored
Merge pull request #490 from praffeck/doc-single-bar
document single bar legend styles
2 parents b1cae4d + f4046a3 commit d8d5424

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

doc/latex/pgfplots/pgfplots.reference.axisdescription.tex

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,7 +1607,7 @@ \subsection{Legend Appearance}
16071607
\end{codeexample}
16081608
\end{stylekey}
16091609

1610-
\begin{pgfplotsxykeylist}{\x bar legend,\x bar interval legend}
1610+
\begin{pgfplotsxykeylist}{\x bar legend,\x bar interval legend,single \x bar legend}
16111611
These style keys redefine |legend image code| such that legends use |xbar|,
16121612
|ybar| or the |xbar interval| and |ybar interval| handlers.
16131613
%
@@ -1652,12 +1652,24 @@ \subsection{Legend Appearance}
16521652
plot coordinates {(0cm,0.8em) (5pt,0.6em) (10pt,0.6em)};
16531653
},
16541654
},
1655-
/pgfplots/ybar interval legend/.style=
1655+
/pgfplots/ybar interval legend/.style={
16561656
/pgfplots/legend image code/.code={
16571657
\draw [##1,/tikz/.cd,yshift=-0.2em,bar interval width=0.7,bar interval shift=0.5]
16581658
plot coordinates {(0cm,0.8em) (5pt,0.6em) (10pt,0.6em)};
16591659
},
16601660
},
1661+
/pgfplots/single xbar legend/.style={
1662+
/pgfplots/legend image code/.code={
1663+
\draw[##1,/tikz/.cd,bar width=6pt,yshift=0.2ex,bar shift=0pt]
1664+
plot coordinates {(0.8em,0pt)};
1665+
},
1666+
},
1667+
/pgfplots/single ybar legend/.style={
1668+
/pgfplots/legend image code/.code={
1669+
\draw[##1,/tikz/.cd,bar width=6pt,yshift=-0.2em,bar shift=0pt]
1670+
plot coordinates {(0pt,0.8em)};
1671+
},
1672+
},
16611673
}
16621674
\end{codeexample}
16631675
\end{pgfplotsxykeylist}

0 commit comments

Comments
 (0)