Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document single bar legend styles #490

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions doc/latex/pgfplots/pgfplots.reference.axisdescription.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1607,7 +1607,7 @@ \subsection{Legend Appearance}
\end{codeexample}
\end{stylekey}

\begin{pgfplotsxykeylist}{\x bar legend,\x bar interval legend}
\begin{pgfplotsxykeylist}{\x bar legend,\x bar interval legend,single \x bar legend}
These style keys redefine |legend image code| such that legends use |xbar|,
|ybar| or the |xbar interval| and |ybar interval| handlers.
%
Expand Down Expand Up @@ -1652,12 +1652,24 @@ \subsection{Legend Appearance}
plot coordinates {(0cm,0.8em) (5pt,0.6em) (10pt,0.6em)};
},
},
/pgfplots/ybar interval legend/.style=
/pgfplots/ybar interval legend/.style={
/pgfplots/legend image code/.code={
\draw [##1,/tikz/.cd,yshift=-0.2em,bar interval width=0.7,bar interval shift=0.5]
plot coordinates {(0cm,0.8em) (5pt,0.6em) (10pt,0.6em)};
},
},
/pgfplots/single xbar legend/.style={
/pgfplots/legend image code/.code={
\draw[##1,/tikz/.cd,bar width=6pt,yshift=0.2ex,bar shift=0pt]
plot coordinates {(0.8em,0pt)};
},
},
/pgfplots/single ybar legend/.style={
/pgfplots/legend image code/.code={
\draw[##1,/tikz/.cd,bar width=6pt,yshift=-0.2em,bar shift=0pt]
plot coordinates {(0pt,0.8em)};
},
},
}
\end{codeexample}
\end{pgfplotsxykeylist}
Expand Down