# plot legend : increase its area

So my question in general is what is the method to change the precise area of the rectangle used in pgf plots? Yes, to make it larger ...

MWE: a typical bar chart

\documentclass{standalone}\usepackage{pgfplots}
\usetikzlibrary{patterns}\begin{document}%
\begin{tikzpicture}%
\pgfplotsset{every axis legend/.append style={width=40pt,height=30pt,at={(0.96,0.72)},% (0.96,0.72) |-> (1,0.8) defaults this
anchor=south east}}%
\begin{axis}[grid=major,ybar,
width=384pt,x tick style={ultra thick, draw=black},height=384pt,y tick style={ultra thick, draw=black},legend image code/.code={\draw[#1] (-4pt,-4pt) rectangle (14pt,14pt);}]
every node near coord/.style={inner ysep=8pt},
error bars/.cd,y dir=both,y explicit] table [y error=error] {%
x   y       error    label
1   30  2           1};
\draw ({rel axis cs:0,0}|-{axis cs:0,0}) -- ({rel axis cs:1,0}|-{axis cs:0,0});
\legend{\raisebox{8pt}{blah},%
}\end{axis}\end{tikzpicture}\end{document}


edit:

If the legend is basically a matrix, then the separation of entries and the distributed height can be increased, but what about adding a thick white border? (Assume I put in draw=none inside legend style.) How does one increase the white space horizontal from the left and the right of the matrix entries, while keeping them were they are, so the box becomes larger but they do not move? Also from the top and the bottom, while keeping the matrix entries in place. Is it possible, or would this require drawing a white rectangle behind the legend to do this, because no parameter can do this automatically in the legend box itself?

-
Also, I did not find by searching the particular parameters but I must assume there are some built in. width and height did not compile, though they work for the axis itself. –  Guido Jorg Jul 27 at 9:51

Legend box is a TikZ matrix so matrix node options apply to it.

\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.10}
\begin{tikzpicture}%
\begin{axis}[legend style={minimum height=3cm,column sep=4cm}]

@GuidoJorg Use inner xsep,inner ysep and inner sep keys (for both at the same) time. Also add line width=1mm –  percusse Jul 27 at 12:53