Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit be73ef4

Browse files
author
James Evans
committed
Axes.bar: changed to process unit info after determining the orientation of the plot.
Registry.get_converter: Disabled caching of converter du to improper resolution. svn path=/trunk/matplotlib/; revision=3258
1 parent 56b4892 commit be73ef4

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

lib/matplotlib/axes.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2317,8 +2317,6 @@ def hlines(self, y, xmin, xmax, colors='k', linestyle='solid',
23172317
raise DeprecationWarning(
23182318
'hlines now uses a LineCollection and not a list of Line2D to draw; see API_CHANGES')
23192319

2320-
2321-
23222320
if not iterable(y): y = [y]
23232321
if not iterable(xmin): xmin = [xmin]
23242322
if not iterable(xmax): xmax = [xmax]
@@ -3013,11 +3011,10 @@ def make_iterable(x):
30133011
bottom = make_iterable(bottom)
30143012
linewidth = make_iterable(linewidth)
30153013

3016-
self._process_unit_info(xdata=left, ydata=height, kwargs=kwargs)
3017-
30183014
adjust_ylim = False
30193015
adjust_xlim = False
30203016
if orientation == 'vertical':
3017+
self._process_unit_info(xdata=left, ydata=height, kwargs=kwargs)
30213018
if log:
30223019
self.set_yscale('log')
30233020
# size width and bottom according to length of left
@@ -3033,6 +3030,7 @@ def make_iterable(x):
30333030
if len(bottom) == 1:
30343031
bottom *= nbars
30353032
elif orientation == 'horizontal':
3033+
self._process_unit_info(xdata=width, ydata=bottom, kwargs=kwargs)
30363034
if log:
30373035
self.set_xscale('log')
30383036
# size left and height according to length of bottom

lib/matplotlib/units.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ def get_converter(self, x):
117117
'get the converter interface instance for x, or None'
118118

119119
if not len(self): return None # nothing registered
120-
idx = id(x)
121-
cached = self._cached.get(idx)
122-
if cached is not None: return cached
120+
#DISABLED idx = id(x)
121+
#DISABLED cached = self._cached.get(idx)
122+
#DISABLED if cached is not None: return cached
123123

124124
converter = None
125125
classx = getattr(x, '__class__', None)
@@ -135,7 +135,7 @@ def get_converter(self, x):
135135
converter = self.get(classx)
136136

137137

138-
self._cached[idx] = converter
138+
#DISABLED self._cached[idx] = converter
139139
return converter
140140

141141

0 commit comments

Comments
 (0)