Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbe73ef4

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 parent56b4892 commitbe73ef4

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

‎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
raiseDeprecationWarning(
23182318
'hlines now uses a LineCollection and not a list of Line2D to draw; see API_CHANGES')
23192319

2320-
2321-
23222320
ifnotiterable(y):y= [y]
23232321
ifnotiterable(xmin):xmin= [xmin]
23242322
ifnotiterable(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
iforientation=='vertical':
3017+
self._process_unit_info(xdata=left,ydata=height,kwargs=kwargs)
30213018
iflog:
30223019
self.set_yscale('log')
30233020
# size width and bottom according to length of left
@@ -3033,6 +3030,7 @@ def make_iterable(x):
30333030
iflen(bottom)==1:
30343031
bottom*=nbars
30353032
eliforientation=='horizontal':
3033+
self._process_unit_info(xdata=width,ydata=bottom,kwargs=kwargs)
30363034
iflog:
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
ifnotlen(self):returnNone# nothing registered
120-
idx=id(x)
121-
cached=self._cached.get(idx)
122-
ifcachedisnotNone:returncached
120+
#DISABLEDidx = id(x)
121+
#DISABLEDcached = self._cached.get(idx)
122+
#DISABLEDif 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+
#DISABLEDself._cached[idx] = converter
139139
returnconverter
140140

141141

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp