Skip to content

Commit 98dc777

Browse files
committed
fixed whacky legend bug
svn path=/trunk/matplotlib/; revision=922
1 parent 64b67c4 commit 98dc777

File tree

5 files changed

+31
-6
lines changed

5 files changed

+31
-6
lines changed

CHANGELOG

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ New entries should be added at the top
2626
2005-01-27 Added Lee's patch for missing symbols \leq and \LEFTbracket
2727
to _mathtext_data - JDH
2828

29-
2005-01-26 Added Baptiste's two scales patch -- see help(twin) in the
29+
2005-01-26 Added Baptiste's two scales patch -- see help(twinx) in the
3030
pylab interface for more info. See also
3131
examples/two_scales.py
3232

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ clean:
1616
find . -name "_tmp*.py" | xargs rm -f;\
1717
find . \( -name "*~" -o -name "*.pyc" \) | xargs rm -f;\
1818
find examples \( -name "*.svg" -o -name "*.png" -o -name "*.ps" -o -name "*.jpg" -o -name "*.eps" -o -name "*.tar" -name "*.gz" \) | xargs rm -f
19-
find unit \( -name "*.png" -o -name "*.ps" -o -name "*.jpg" -o -name "*.eps" \) | xargs rm -f
19+
find unit \( -name "*.png" -o -name "*.ps" -o -name "*.eps" \) | xargs rm -f
2020
find . \( -name "#*" -o -name ".#*" -o -name ".*~" -o -name "*~" \) | xargs rm -f
2121

2222

TODO

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,3 +647,28 @@ ZeroDivisionError: SeparableTransformation::eval_scalars yin interval is zero; c
647647
-- add qt / gpl warning
648648

649649
-- Nil's xtick labeling bug
650+
651+
-- make a fig dict wrapper
652+
653+
-- plot items ala gnuplot
654+
FileItem, FuncItem, High level plot items
655+
656+
-- doc why figimage doesn't respond to nav
657+
658+
- imshow() bug: make a random 1024x1024 array, zoom in hard (to a 10x10
659+
square). All displayed area is white.
660+
661+
662+
-- Tk figure destruction bugs with mayavi. Already reported.
663+
664+
-- run in ipython with -backend
665+
666+
667+
- easy interactive logscaling x/y axes independently. (l->y, L->x) Button?
668+
669+
- grid on/off toggle (g key), button?
670+
671+
- measuring ruler? (see gnuplot's 'r' hotkey in X11).
672+
673+
- button to add text labels easily anywhere on the plot. A few drawing
674+
buttons as well for simple things? Circle/ellipse, box, arrows, etc.

lib/matplotlib/legend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ def _get_handles(self, handles, texts):
216216
if isinstance(handle, Line2D):
217217
ydata = (y-HEIGHT/2)*ones(self._xdata.shape, Float)
218218
legline = Line2D(self._xdata, ydata)
219-
self._set_artist_props(legline)
220219
legline.update_from(handle)
220+
self._set_artist_props(legline) # after update
221221
legline.set_markersize(self.markerscale*legline.get_markersize())
222222
legline.set_data_clipping(False)
223223
ret.append(legline)

lib/matplotlib/pylab.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1611,7 +1611,7 @@ def matshow(*args,**kw):
16111611
stretching. If the window dimensions can't accomodate this (extremely
16121612
tall/wide arrays), some stretching will inevitably occur.
16131613
1614-
matshow() calls imshow() with Aargs and **kwargs, but by default
1614+
matshow() calls imshow() with args and **kwargs, but by default
16151615
it sets interpolation='nearest' (unless you override it). All
16161616
other arguments and keywords are passed to imshow(), so see its
16171617
docstring for further details.
@@ -1631,7 +1631,7 @@ def samplemat(dims):
16311631
dimlist = [(12,12),(128,64),(64,512),(2048,256)]
16321632
16331633
1634-
for i, d in enumerate(dimlist):
1634+
for d in dimlist:
16351635
fig, ax, im = matshow(samplemat(d))
16361636
show()
16371637
@@ -1640,7 +1640,7 @@ def samplemat(dims):
16401640
arr = args[0]
16411641
w,h = figaspect(arr)
16421642
fig = figure(figsize=(w,h))
1643-
ax = fig.add_axes([0.0, 0.05, 0.8, 0.8])
1643+
ax = fig.add_axes([0.15, 0.09, 0.775, 0.775])
16441644

16451645
ax.xaxis.tick_top()
16461646
ax.title.set_y(1.05) # raise it up a bit for tick top

0 commit comments

Comments
 (0)