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

Skip to content

Commit 2a9e66e

Browse files
committed
fixed a bug in unit processing -- thanks chris
svn path=/trunk/matplotlib/; revision=4457
1 parent 2c33f8b commit 2a9e66e

2 files changed

Lines changed: 14 additions & 12 deletions

File tree

lib/matplotlib/axes.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def _get_next_cycle_color(self):
182182

183183
def __call__(self, *args, **kwargs):
184184

185-
if self.axes.xaxis is not None and self.axes.xaxis is not None:
185+
if self.axes.xaxis is not None and self.axes.yaxis is not None:
186186
xunits = kwargs.pop( 'xunits', self.axes.xaxis.units)
187187
yunits = kwargs.pop( 'yunits', self.axes.yaxis.units)
188188
if xunits!=self.axes.xaxis.units:
@@ -1289,6 +1289,8 @@ def draw(self, renderer=None, inframe=False):
12891289
if self.axison and self._frameon: self.axesPatch.draw(renderer)
12901290
artists = []
12911291

1292+
1293+
12921294
if len(self.images)<=1 or renderer.option_image_nocomposite():
12931295
for im in self.images:
12941296
im.draw(renderer)
@@ -3313,7 +3315,7 @@ def make_iterable(x):
33133315
self.hold(holdstate) # restore previous hold state
33143316

33153317
if adjust_xlim:
3316-
xmin, xmax = self.dataLim.intervalx().get_bounds()
3318+
xmin, xmax = self.dataLim.intervalx().get_bounds()
33173319
xmin = npy.amin(width)
33183320
if xerr is not None:
33193321
xmin = xmin - npy.amax(xerr)

lib/matplotlib/mlab.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
* find - Return the indices where some condition is true;
1515
numpy.nonzero is similar but more general.
1616
17-
* polyfit - least squares best polynomial fit of x to y
18-
19-
* polyval - evaluate a vector for a vector of polynomial coeffs
2017
2118
* prctile - find the percentiles of a sequence
2219
@@ -29,11 +26,14 @@
2926
3027
The following are deprecated; please import directly from numpy
3128
(with care--function signatures may differ):
29+
3230
* conv - convolution (numpy.convolve)
3331
* corrcoef - The matrix of correlation coefficients
3432
* hist -- Histogram (numpy.histogram)
3533
* linspace -- Linear spaced array from min to max
3634
* meshgrid
35+
* polyfit - least squares best polynomial fit of x to y
36+
* polyval - evaluate a vector for a vector of polynomial coeffs
3737
* trapz - trapeziodal integration (trapz(x,y) -> numpy.trapz(y,x))
3838
* vander - the Vandermonde matrix
3939
@@ -46,13 +46,13 @@
4646
4747
= record array helper functions =
4848
49-
rec2csv : store record array in CSV file
50-
rec2excel : store record array in excel worksheet - required pyExcelerator
51-
rec2gtk : put record array in GTK treeview - requires gtk
52-
csv2rec : import record array from CSV file with type inspection
53-
rec_append_field : add a field/array to record array
54-
rec_drop_fields : drop fields from record array
55-
rec_join : join two record arrays on sequence of fields
49+
* rec2csv : store record array in CSV file
50+
* rec2excel : store record array in excel worksheet - required pyExcelerator
51+
* rec2gtk : put record array in GTK treeview - requires gtk
52+
* csv2rec : import record array from CSV file with type inspection
53+
* rec_append_field : add a field/array to record array
54+
* rec_drop_fields : drop fields from record array
55+
* rec_join : join two record arrays on sequence of fields
5656
5757
For the rec viewer clases (rec2csv, rec2excel and rec2gtk), there are
5858
a bunch of Format objects you can pass into the functions that will do

0 commit comments

Comments
 (0)