vertical padding in legend

Hi List,

Attached is a closeup of two legends on a 2-panel figure. The first
legend has 10 plots listed, the second has 1. I have set each legend
identically: loc='upper right', pad=.3, handlelen=.1, handletextsep=.05.
But it seems that while the horizontal padding is the same, the vertical
padding is too large in the first legend, and too small in the second.
The only difference between the two I am aware of is the number of plots
listed (not contained in the axes, but listed in the legends). I'm using version 0.98.3 on windows. Any ideas?

legend_vpad.png

ยทยทยท

--
Christopher Brown, Ph.D.
Department of Speech and Hearing Science
Arizona State University

Christopher Brown wrote:

Hi List,

Attached is a closeup of two legends on a 2-panel figure. The first
legend has 10 plots listed, the second has 1. I have set each legend
identically: loc='upper right', pad=.3, handlelen=.1, handletextsep=.05.
But it seems that while the horizontal padding is the same, the vertical
padding is too large in the first legend, and too small in the second.
The only difference between the two I am aware of is the number of plots
listed (not contained in the axes, but listed in the legends). I'm using version 0.98.3 on windows. Any ideas?

This looks to me like a design flaw: the pad is "fractional" (fraction of legend box size), when logically it should be in something like units of legend text height, or possibly in points. This might be easy enough to change, although for backwards compatibility we would need to use a new kwarg.

Eric