From: <ef...@us...> - 2008-01-24 18:19:23
|
Revision: 4894 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4894&view=rev Author: efiring Date: 2008-01-24 10:15:56 -0800 (Thu, 24 Jan 2008) Log Message: ----------- Change tabs to spaces, except in pyparsing.py Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/__init__.py trunk/matplotlib/lib/matplotlib/_mathtext_data.py trunk/matplotlib/lib/matplotlib/_pylab_helpers.py trunk/matplotlib/lib/matplotlib/afm.py trunk/matplotlib/lib/matplotlib/agg.py trunk/matplotlib/lib/matplotlib/artist.py trunk/matplotlib/lib/matplotlib/axes.py trunk/matplotlib/lib/matplotlib/axis.py trunk/matplotlib/lib/matplotlib/backend_bases.py trunk/matplotlib/lib/matplotlib/cbook.py trunk/matplotlib/lib/matplotlib/cm.py trunk/matplotlib/lib/matplotlib/collections.py trunk/matplotlib/lib/matplotlib/colorbar.py trunk/matplotlib/lib/matplotlib/colors.py trunk/matplotlib/lib/matplotlib/contour.py trunk/matplotlib/lib/matplotlib/dates.py trunk/matplotlib/lib/matplotlib/dviread.py trunk/matplotlib/lib/matplotlib/figure.py trunk/matplotlib/lib/matplotlib/finance.py trunk/matplotlib/lib/matplotlib/font_manager.py trunk/matplotlib/lib/matplotlib/image.py trunk/matplotlib/lib/matplotlib/lines.py trunk/matplotlib/lib/matplotlib/mlab.py trunk/matplotlib/lib/matplotlib/mpl.py trunk/matplotlib/lib/matplotlib/patches.py trunk/matplotlib/lib/matplotlib/path.py trunk/matplotlib/lib/matplotlib/pylab.py trunk/matplotlib/lib/matplotlib/pyplot.py trunk/matplotlib/lib/matplotlib/quiver.py trunk/matplotlib/lib/matplotlib/table.py trunk/matplotlib/lib/matplotlib/text.py trunk/matplotlib/lib/matplotlib/transforms.py trunk/matplotlib/lib/matplotlib/type1font.py trunk/matplotlib/lib/matplotlib/units.py trunk/matplotlib/lib/matplotlib/windowing.py Modified: trunk/matplotlib/lib/matplotlib/__init__.py =================================================================== --- trunk/matplotlib/lib/matplotlib/__init__.py 2008-01-23 22:35:10 UTC (rev 4893) +++ trunk/matplotlib/lib/matplotlib/__init__.py 2008-01-24 18:15:56 UTC (rev 4894) @@ -113,8 +113,8 @@ if not _python23: def enumerate(seq): - for i in range(len(seq)): - yield i, seq[i] + for i in range(len(seq)): + yield i, seq[i] def is_string_like(obj): @@ -803,4 +803,3 @@ verbose.report('units is %s'%rcParams['units']) verbose.report('platform is %s'%sys.platform) verbose.report('loaded modules: %s'%sys.modules.keys(), 'debug') - Modified: trunk/matplotlib/lib/matplotlib/_mathtext_data.py =================================================================== --- trunk/matplotlib/lib/matplotlib/_mathtext_data.py 2008-01-23 22:35:10 UTC (rev 4893) +++ trunk/matplotlib/lib/matplotlib/_mathtext_data.py 2008-01-24 18:15:56 UTC (rev 4894) @@ -2472,5 +2472,3 @@ (0x0061, 0x007a, 'rm', 0x1d68a) # a-z ], } - - Modified: trunk/matplotlib/lib/matplotlib/_pylab_helpers.py =================================================================== --- trunk/matplotlib/lib/matplotlib/_pylab_helpers.py 2008-01-23 22:35:10 UTC (rev 4893) +++ trunk/matplotlib/lib/matplotlib/_pylab_helpers.py 2008-01-24 18:15:56 UTC (rev 4894) @@ -57,4 +57,3 @@ Gcf._activeQue.append(manager) Gcf.figs[manager.num] = manager set_active = staticmethod(set_active) - Modified: trunk/matplotlib/lib/matplotlib/afm.py =================================================================== --- trunk/matplotlib/lib/matplotlib/afm.py 2008-01-23 22:35:10 UTC (rev 4893) +++ trunk/matplotlib/lib/matplotlib/afm.py 2008-01-24 18:15:56 UTC (rev 4894) @@ -55,7 +55,7 @@ def _sanity_check(fh): """ - Check if the file at least looks like AFM. + Check if the file at least looks like AFM. If not, raise RuntimeError. """ @@ -125,9 +125,9 @@ #print '%-s\t%-d line :: %-s' % ( fh.name, len(lst), line ) key = lst[0] if len( lst ) == 2: - val = lst[1] + val = lst[1] else: - val = '' + val = '' #key, val = line.split(' ', 1) try: d[key] = headerConverters[key](val) except ValueError: @@ -377,7 +377,7 @@ Return the string bounding box """ return self.get_str_bbox_and_descent(s)[:4] - + def get_name_char(self, c, isord=False): """ Get the name of the character, ie, ';' is 'semicolon' @@ -401,7 +401,7 @@ """ wx, bbox = self._metrics_by_name[name] return wx - + def get_height_char(self, c, isord=False): """ Get the height of character c from the bounding box. This is @@ -426,7 +426,7 @@ """ try: return self._kern[ (name1, name2) ] except: return 0 - + def get_fontname(self): "Return the font name, eg, Times-Roman" return self._header['FontName'] @@ -472,8 +472,8 @@ not specified in AFM file. """ return self._header.get('StdVW', None) - + if __name__=='__main__': #pathname = '/usr/local/lib/R/afm/' pathname = '/usr/local/share/fonts/afms/adobe' @@ -482,6 +482,3 @@ fh = file(os.path.join(pathname,fname)) afm = AFM(fh) w,h = afm.string_width_height('John Hunter is the Man!') - - - Modified: trunk/matplotlib/lib/matplotlib/agg.py =================================================================== --- trunk/matplotlib/lib/matplotlib/agg.py 2008-01-23 22:35:10 UTC (rev 4893) +++ trunk/matplotlib/lib/matplotlib/agg.py 2008-01-24 18:15:56 UTC (rev 4894) @@ -100,7 +100,7 @@ __swig_setmethods__["y"] = _agg.point_type_y_set __swig_getmethods__["y"] = _agg.point_type_y_get if _newclass:y = _swig_property(_agg.point_type_y_get, _agg.point_type_y_set) - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_point_type(*args) try: self.this.append(this) except: self.this = this @@ -126,7 +126,7 @@ __swig_setmethods__["cmd"] = _agg.vertex_type_cmd_set __swig_getmethods__["cmd"] = _agg.vertex_type_cmd_get if _newclass:cmd = _swig_property(_agg.vertex_type_cmd_get, _agg.vertex_type_cmd_set) - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_vertex_type(*args) try: self.this.append(this) except: self.this = this @@ -153,7 +153,7 @@ __swig_setmethods__["y2"] = _agg.rect_y2_set __swig_getmethods__["y2"] = _agg.rect_y2_get if _newclass:y2 = _swig_property(_agg.rect_y2_get, _agg.rect_y2_set) - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_rect(*args) try: self.this.append(this) except: self.this = this @@ -183,7 +183,7 @@ __swig_setmethods__["y2"] = _agg.rect_d_y2_set __swig_getmethods__["y2"] = _agg.rect_d_y2_get if _newclass:y2 = _swig_property(_agg.rect_d_y2_get, _agg.rect_d_y2_set) - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_rect_d(*args) try: self.this.append(this) except: self.this = this @@ -211,7 +211,7 @@ __swig_setmethods__["data"] = _agg.binary_data_data_set __swig_getmethods__["data"] = _agg.binary_data_data_get if _newclass:data = _swig_property(_agg.binary_data_data_get, _agg.binary_data_data_set) - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_binary_data(*args) try: self.this.append(this) except: self.this = this @@ -226,7 +226,7 @@ __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, buffer, name) __repr__ = _swig_repr - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_buffer(*args) try: self.this.append(this) except: self.this = this @@ -258,7 +258,7 @@ G = _agg.order_rgb_G B = _agg.order_rgb_B rgb_tag = _agg.order_rgb_rgb_tag - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_order_rgb(*args) try: self.this.append(this) except: self.this = this @@ -277,7 +277,7 @@ G = _agg.order_bgr_G R = _agg.order_bgr_R rgb_tag = _agg.order_bgr_rgb_tag - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_order_bgr(*args) try: self.this.append(this) except: self.this = this @@ -297,7 +297,7 @@ B = _agg.order_rgba_B A = _agg.order_rgba_A rgba_tag = _agg.order_rgba_rgba_tag - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_order_rgba(*args) try: self.this.append(this) except: self.this = this @@ -317,7 +317,7 @@ G = _agg.order_argb_G B = _agg.order_argb_B rgba_tag = _agg.order_argb_rgba_tag - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_order_argb(*args) try: self.this.append(this) except: self.this = this @@ -337,7 +337,7 @@ G = _agg.order_abgr_G R = _agg.order_abgr_R rgba_tag = _agg.order_abgr_rgba_tag - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_order_abgr(*args) try: self.this.append(this) except: self.this = this @@ -357,7 +357,7 @@ R = _agg.order_bgra_R A = _agg.order_bgra_A rgba_tag = _agg.order_bgra_rgba_tag - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_order_bgra(*args) try: self.this.append(this) except: self.this = this @@ -394,7 +394,7 @@ if _newclass:no_color = staticmethod(_agg.rgba_no_color) __swig_getmethods__["from_wavelength"] = lambda x: _agg.rgba_from_wavelength if _newclass:from_wavelength = staticmethod(_agg.rgba_from_wavelength) - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_rgba(*args) try: self.this.append(this) except: self.this = this @@ -426,7 +426,7 @@ __swig_setmethods__["a"] = _agg.rgba8_a_set __swig_getmethods__["a"] = _agg.rgba8_a_get if _newclass:a = _swig_property(_agg.rgba8_a_get, _agg.rgba8_a_set) - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_rgba8(*args) try: self.this.append(this) except: self.this = this @@ -472,7 +472,7 @@ __swig_setmethods__["a"] = _agg.rgba16_a_set __swig_getmethods__["a"] = _agg.rgba16_a_get if _newclass:a = _swig_property(_agg.rgba16_a_get, _agg.rgba16_a_set) - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_rgba16(*args) try: self.this.append(this) except: self.this = this @@ -500,7 +500,7 @@ __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, trans_affine, name) __repr__ = _swig_repr - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_trans_affine(*args) try: self.this.append(this) except: self.this = this @@ -543,7 +543,7 @@ for _s in [trans_affine]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) __getattr__ = lambda self, name: _swig_getattr(self, trans_affine_rotation, name) __repr__ = _swig_repr - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_trans_affine_rotation(*args) try: self.this.append(this) except: self.this = this @@ -560,7 +560,7 @@ for _s in [trans_affine]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) __getattr__ = lambda self, name: _swig_getattr(self, trans_affine_scaling, name) __repr__ = _swig_repr - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_trans_affine_scaling(*args) try: self.this.append(this) except: self.this = this @@ -577,7 +577,7 @@ for _s in [trans_affine]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) __getattr__ = lambda self, name: _swig_getattr(self, trans_affine_translation, name) __repr__ = _swig_repr - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_trans_affine_translation(*args) try: self.this.append(this) except: self.this = this @@ -594,7 +594,7 @@ for _s in [trans_affine]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) __getattr__ = lambda self, name: _swig_getattr(self, trans_affine_skewing, name) __repr__ = _swig_repr - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_trans_affine_skewing(*args) try: self.this.append(this) except: self.this = this @@ -611,7 +611,7 @@ __repr__ = _swig_repr __swig_destroy__ = _agg.delete_path_storage __del__ = lambda self : None; - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_path_storage(*args) try: self.this.append(this) except: self.this = this @@ -663,7 +663,7 @@ __repr__ = _swig_repr __swig_destroy__ = _agg.delete_rendering_buffer __del__ = lambda self : None; - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_rendering_buffer(*args) try: self.this.append(this) except: self.this = this @@ -719,7 +719,7 @@ __swig_setmethods__["c"] = _agg.pixel64_type_c_set __swig_getmethods__["c"] = _agg.pixel64_type_c_get if _newclass:c = _swig_property(_agg.pixel64_type_c_get, _agg.pixel64_type_c_set) - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_pixel64_type(*args) try: self.this.append(this) except: self.this = this @@ -737,7 +737,7 @@ base_shift = _agg.pixel_format_rgba_base_shift base_size = _agg.pixel_format_rgba_base_size base_mask = _agg.pixel_format_rgba_base_mask - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_pixel_format_rgba(*args) try: self.this.append(this) except: self.this = this @@ -772,7 +772,7 @@ __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, renderer_base_rgba, name) __repr__ = _swig_repr - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_renderer_base_rgba(*args) try: self.this.append(this) except: self.this = this @@ -829,7 +829,7 @@ __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, conv_curve_path, name) __repr__ = _swig_repr - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_conv_curve_path(*args) try: self.this.append(this) except: self.this = this @@ -848,7 +848,7 @@ __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, conv_curve_trans, name) __repr__ = _swig_repr - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_conv_curve_trans(*args) try: self.this.append(this) except: self.this = this @@ -867,7 +867,7 @@ __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, conv_transform_path, name) __repr__ = _swig_repr - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_conv_transform_path(*args) try: self.this.append(this) except: self.this = this @@ -886,7 +886,7 @@ __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, conv_transform_curve, name) __repr__ = _swig_repr - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_conv_transform_curve(*args) try: self.this.append(this) except: self.this = this @@ -905,7 +905,7 @@ __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, vcgen_stroke, name) __repr__ = _swig_repr - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_vcgen_stroke(*args) try: self.this.append(this) except: self.this = this @@ -938,7 +938,7 @@ def prepare_src(*args): return _agg.null_markers_prepare_src(*args) def rewind(*args): return _agg.null_markers_rewind(*args) def vertex(*args): return _agg.null_markers_vertex(*args) - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_null_markers(*args) try: self.this.append(this) except: self.this = this @@ -953,7 +953,7 @@ __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, conv_adaptor_vcgen_path, name) __repr__ = _swig_repr - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_conv_adaptor_vcgen_path(*args) try: self.this.append(this) except: self.this = this @@ -973,7 +973,7 @@ __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, conv_adaptor_vcgen_transpath, name) __repr__ = _swig_repr - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_conv_adaptor_vcgen_transpath(*args) try: self.this.append(this) except: self.this = this @@ -993,7 +993,7 @@ __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, conv_adaptor_vcgen_curve, name) __repr__ = _swig_repr - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_conv_adaptor_vcgen_curve(*args) try: self.this.append(this) except: self.this = this @@ -1013,7 +1013,7 @@ __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, conv_adaptor_vcgen_transcurve, name) __repr__ = _swig_repr - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_conv_adaptor_vcgen_transcurve(*args) try: self.this.append(this) except: self.this = this @@ -1033,7 +1033,7 @@ __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, conv_adaptor_vcgen_curvetrans, name) __repr__ = _swig_repr - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_conv_adaptor_vcgen_curvetrans(*args) try: self.this.append(this) except: self.this = this @@ -1055,7 +1055,7 @@ for _s in [conv_adaptor_vcgen_path]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) __getattr__ = lambda self, name: _swig_getattr(self, conv_stroke_path, name) __repr__ = _swig_repr - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_conv_stroke_path(*args) try: self.this.append(this) except: self.this = this @@ -1081,7 +1081,7 @@ for _s in [conv_adaptor_vcgen_transpath]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) __getattr__ = lambda self, name: _swig_getattr(self, conv_stroke_transpath, name) __repr__ = _swig_repr - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_conv_stroke_transpath(*args) try: self.this.append(this) except: self.this = this @@ -1107,7 +1107,7 @@ for _s in [conv_adaptor_vcgen_curve]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) __getattr__ = lambda self, name: _swig_getattr(self, conv_stroke_curve, name) __repr__ = _swig_repr - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_conv_stroke_curve(*args) try: self.this.append(this) except: self.this = this @@ -1131,7 +1131,7 @@ __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, conv_stroke_transcurve, name) __repr__ = _swig_repr - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_conv_stroke_transcurve(*args) try: self.this.append(this) except: self.this = this @@ -1155,7 +1155,7 @@ __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, conv_stroke_curvetrans, name) __repr__ = _swig_repr - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_conv_stroke_curvetrans(*args) try: self.this.append(this) except: self.this = this @@ -1179,7 +1179,7 @@ __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, rasterizer_scanline_aa, name) __repr__ = _swig_repr - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_rasterizer_scanline_aa(*args) try: self.this.append(this) except: self.this = this @@ -1214,7 +1214,7 @@ __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, renderer_scanline_aa_solid_rgba, name) __repr__ = _swig_repr - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_renderer_scanline_aa_solid_rgba(*args) try: self.this.append(this) except: self.this = this @@ -1234,7 +1234,7 @@ __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, renderer_scanline_bin_solid_rgba, name) __repr__ = _swig_repr - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_renderer_scanline_bin_solid_rgba(*args) try: self.this.append(this) except: self.this = this @@ -1256,7 +1256,7 @@ __repr__ = _swig_repr __swig_destroy__ = _agg.delete_scanline_p8 __del__ = lambda self : None; - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_scanline_p8(*args) try: self.this.append(this) except: self.this = this @@ -1280,7 +1280,7 @@ __repr__ = _swig_repr __swig_destroy__ = _agg.delete_scanline_bin __del__ = lambda self : None; - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_scanline_bin(*args) try: self.this.append(this) except: self.this = this @@ -1303,7 +1303,7 @@ __repr__ = _swig_repr __swig_destroy__ = _agg.delete_scanline32_bin __del__ = lambda self : None; - def __init__(self, *args): + def __init__(self, *args): this = _agg.new_scanline32_bin(*args) try: self.this.append(this) except: self.this = this @@ -1320,5 +1320,3 @@ render_scanlines_rgba = _agg.render_scanlines_rgba render_scanlines_bin_rgba = _agg.render_scanlines_bin_rgba - - Modified: trunk/matplotlib/lib/matplotlib/artist.py =================================================================== --- trunk/matplotlib/lib/matplotlib/artist.py 2008-01-23 22:35:10 UTC (rev 4893) +++ trunk/matplotlib/lib/matplotlib/artist.py 2008-01-24 18:15:56 UTC (rev 4894) @@ -299,7 +299,7 @@ For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to None. - + ACCEPTS: a Path instance and a Transform instance, a Patch instance, or None """ @@ -316,14 +316,14 @@ path.get_path(), path.get_transform()) success = True - + if path is None: self._clippath = None success = True elif isinstance(path, Path): self._clippath = TransformedPath(path, transform) success = True - + if not success: print type(path), type(transform) raise TypeError("Invalid arguments to set_clip_path") @@ -366,7 +366,7 @@ if self._clippath is not None: return self._clippath.get_transformed_path_and_affine() return None, None - + def set_clip_on(self, b): """ Set whether artist uses clipping Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-01-23 22:35:10 UTC (rev 4893) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-01-24 18:15:56 UTC (rev 4894) @@ -491,10 +491,10 @@ self._sharex = sharex self._sharey = sharey - if sharex is not None: - self._shared_x_axes.join(self, sharex) + if sharex is not None: + self._shared_x_axes.join(self, sharex) if sharey is not None: - self._shared_y_axes.join(self, sharey) + self._shared_y_axes.join(self, sharey) self.set_label(label) self.set_figure(fig) @@ -550,7 +550,7 @@ self.bbox = mtransforms.TransformedBbox(self._position, fig.transFigure) #these will be updated later as data is added - self.dataLim = mtransforms.Bbox.unit() + self.dataLim = mtransforms.Bbox.unit() self.viewLim = mtransforms.Bbox.unit() self.transScale = mtransforms.TransformWrapper(mtransforms.IdentityTransform()) @@ -718,7 +718,7 @@ if not isinstance(pos, mtransforms.BboxBase): pos = mtransforms.Bbox.from_bounds(*pos) if which in ('both', 'active'): - self._position.set(pos) + self._position.set(pos) if which in ('both', 'original'): self._originalPosition.set(pos) @@ -748,7 +748,7 @@ self.xaxis.cla() self.yaxis.cla() - self.ignore_existing_data_limits = True + self.ignore_existing_data_limits = True self.callbacks = cbook.CallbackRegistry(('xlim_changed', 'ylim_changed')) if self._sharex is not None: @@ -1329,7 +1329,7 @@ #### Drawing def draw(self, renderer=None, inframe=False): "Draw everything (plot lines, axes, labels)" - if renderer is None: + if renderer is None: renderer = self._cachedRenderer if renderer is None: @@ -1390,8 +1390,8 @@ if self.axison and self._frameon: artists.append(self.axesFrame) - dsu = [ (a.zorder, i, a) for i, a in enumerate(artists) - if not a.get_animated() ] + dsu = [ (a.zorder, i, a) for i, a in enumerate(artists) + if not a.get_animated() ] dsu.sort() for zorder, i, a in dsu: @@ -1568,9 +1568,9 @@ "Returns the x-axis numerical bounds in the form of lowerBound < upperBound" left, right = self.get_xlim() if left < right: - return left, right + return left, right else: - return right, left + return right, left def set_xbound(self, lower=None, upper=None): """Set the lower and upper numerical bounds of the x-axis. @@ -1643,11 +1643,11 @@ self.viewLim.intervalx = (xmin, xmax) if emit: - self.callbacks.process('xlim_changed', self) - # Call all of the other x-axes that are shared with this one - for other in self._shared_x_axes.get_siblings(self): - if other is not self: - other.set_xlim(self.viewLim.intervalx, emit=False) + self.callbacks.process('xlim_changed', self) + # Call all of the other x-axes that are shared with this one + for other in self._shared_x_axes.get_siblings(self): + if other is not self: + other.set_xlim(self.viewLim.intervalx, emit=False) if other.figure != self.figure and other.figure.canvas is not None: other.figure.canvas.draw_idle() @@ -1656,7 +1656,7 @@ def get_xscale(self): 'return the xaxis scale string: %s' % ( ", ".join(mscale.get_scale_names())) - return self.xaxis.get_scale() + return self.xaxis.get_scale() def set_xscale(self, value, **kwargs): """ @@ -1727,9 +1727,9 @@ "Returns the y-axis numerical bounds in the form of lowerBound < upperBound" left, right = self.get_ylim() if left < right: - return left, right + return left, right else: - return right, left + return right, left def set_ybound(self, lower=None, upper=None): """Set the lower and upper numerical bounds of the y-axis. @@ -1799,11 +1799,11 @@ self.viewLim.intervaly = (ymin, ymax) if emit: - self.callbacks.process('ylim_changed', self) - # Call all of the other y-axes that are shared with this one - for other in self._shared_y_axes.get_siblings(self): - if other is not self: - other.set_ylim(self.viewLim.intervaly, emit=False) + self.callbacks.process('ylim_changed', self) + # Call all of the other y-axes that are shared with this one + for other in self._shared_y_axes.get_siblings(self): + if other is not self: + other.set_ylim(self.viewLim.intervaly, emit=False) if other.figure != self.figure and other.figure.canvas is not None: other.figure.canvas.draw_idle() return ymin, ymax @@ -5709,5 +5709,3 @@ # warning, probably breaks inverted axis self.set_xlim((0.1*minx, maxx)) """ - - Modified: trunk/matplotlib/lib/matplotlib/axis.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axis.py 2008-01-23 22:35:10 UTC (rev 4893) +++ trunk/matplotlib/lib/matplotlib/axis.py 2008-01-24 18:15:56 UTC (rev 4894) @@ -1122,7 +1122,7 @@ horizontalalignment='center', ) label.set_transform( blended_transform_factory( - self.axes.transAxes, IdentityTransform() )) + self.axes.transAxes, IdentityTransform() )) self._set_artist_props(label) self.label_position='bottom' @@ -1137,7 +1137,7 @@ horizontalalignment='right', ) offsetText.set_transform( blended_transform_factory( - self.axes.transAxes, IdentityTransform() )) + self.axes.transAxes, IdentityTransform() )) self._set_artist_props(offsetText) self.offset_text_position='bottom' return offsetText @@ -1356,7 +1356,7 @@ rotation='vertical', ) label.set_transform( blended_transform_factory( - IdentityTransform(), self.axes.transAxes) ) + IdentityTransform(), self.axes.transAxes) ) self._set_artist_props(label) self.label_position='left' @@ -1371,7 +1371,7 @@ horizontalalignment = 'left', ) offsetText.set_transform(blended_transform_factory( - self.axes.transAxes, IdentityTransform()) ) + self.axes.transAxes, IdentityTransform()) ) self._set_artist_props(offsetText) self.offset_text_position='left' return offsetText @@ -1557,5 +1557,3 @@ else: Vmin, Vmax = self.get_data_interval() self.axes.dataLim.intervaly = min(vmin, Vmin), max(vmax, Vmax) - - Modified: trunk/matplotlib/lib/matplotlib/backend_bases.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backend_bases.py 2008-01-23 22:35:10 UTC (rev 4893) +++ trunk/matplotlib/lib/matplotlib/backend_bases.py 2008-01-24 18:15:56 UTC (rev 4894) @@ -48,9 +48,9 @@ pass def draw_path(self, gc, path, transform, rgbFace=None): - """ + """ Draws a Path instance using the given affine transform. - """ + """ raise NotImplementedError def draw_markers(self, gc, marker_path, marker_trans, path, trans, rgbFace=None): @@ -642,7 +642,7 @@ self.inaxes = axes_list[0] try: - xdata, ydata = self.inaxes.transData.inverted().transform_point((x, y)) + xdata, ydata = self.inaxes.transData.inverted().transform_point((x, y)) except ValueError: self.xdata = None self.ydata = None @@ -1466,7 +1466,7 @@ lims.append( (xmin, xmax, ymin, ymax) ) # Store both the original and modified positions pos.append( ( - a.get_position(True).frozen(), + a.get_position(True).frozen(), a.get_position().frozen() ) ) self._views.push(lims) self._positions.push(pos) @@ -1515,7 +1515,7 @@ x0, y0, x1, y1 = lim.extents # zoom to rect - inverse = a.transData.inverted() + inverse = a.transData.inverted() lastx, lasty = inverse.transform_point( (lastx, lasty) ) x, y = inverse.transform_point( (x, y) ) Xmin,Xmax=a.get_xlim() @@ -1661,5 +1661,3 @@ def set_history_buttons(self): 'enable or disable back/forward button' pass - - Modified: trunk/matplotlib/lib/matplotlib/cbook.py =================================================================== --- trunk/matplotlib/lib/matplotlib/cbook.py 2008-01-23 22:35:10 UTC (rev 4893) +++ trunk/matplotlib/lib/matplotlib/cbook.py 2008-01-24 18:15:56 UTC (rev 4894) @@ -182,25 +182,25 @@ return s class Bunch: - """ - Often we want to just collect a bunch of stuff together, naming each - item of the bunch; a dictionary's OK for that, but a small do- nothing - class is even handier, and prettier to use. Whenever you want to - group a few variables: + """ + Often we want to just collect a bunch of stuff together, naming each + item of the bunch; a dictionary's OK for that, but a small do- nothing + class is even handier, and prettier to use. Whenever you want to + group a few variables: - >>> point = Bunch(datum=2, squared=4, coord=12) - >>> point.datum + >>> point = Bunch(datum=2, squared=4, coord=12) + >>> point.datum - By: Alex Martelli - From: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52308 - """ - def __init__(self, **kwds): - self.__dict__.update(kwds) + By: Alex Martelli + From: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52308 + """ + def __init__(self, **kwds): + self.__dict__.update(kwds) def unique(x): - 'Return a list of unique elements of x' - return dict([ (val, 1) for val in x]).keys() + 'Return a list of unique elements of x' + return dict([ (val, 1) for val in x]).keys() def iterable(obj): try: len(obj) @@ -266,55 +266,55 @@ if scalarp(item): yield item else: for subitem in flatten(item, scalarp): - yield subitem + yield subitem class Sorter: - """ + """ - Sort by attribute or item + Sort by attribute or item - Example usage: - sort = Sorter() + Example usage: + sort = Sorter() - list = [(1, 2), (4, 8), (0, 3)] - dict = [{'a': 3, 'b': 4}, {'a': 5, 'b': 2}, {'a': 0, 'b': 0}, - {'a': 9, 'b': 9}] + list = [(1, 2), (4, 8), (0, 3)] + dict = [{'a': 3, 'b': 4}, {'a': 5, 'b': 2}, {'a': 0, 'b': 0}, + {'a': 9, 'b': 9}] - sort(list) # default sort - sort(list, 1) # sort by index 1 - sort(dict, 'a') # sort a list of dicts by key 'a' + sort(list) # default sort + sort(list, 1) # sort by index 1 + sort(dict, 'a') # sort a list of dicts by key 'a' - """ + """ - def _helper(self, data, aux, inplace): - aux.sort() - result = [data[i] for junk, i in aux] - if inplace: data[:] = result - return result + def _helper(self, data, aux, inplace): + aux.sort() + result = [data[i] for junk, i in aux] + if inplace: data[:] = result + return result - def byItem(self, data, itemindex=None, inplace=1): - if itemindex is None: - if inplace: - data.sort() - result = data - else: - result = data[:] - result.sort() - return result - else: - aux = [(data[i][itemindex], i) for i in range(len(data))] - return self._helper(data, aux, inplace) + def byItem(self, data, itemindex=None, inplace=1): + if itemindex is None: + if inplace: + data.sort() + result = data + else: + result = data[:] + result.sort() + return result + else: + aux = [(data[i][itemindex], i) for i in range(len(data))] + return self._helper(data, aux, inplace) - def byAttribute(self, data, attributename, inplace=1): - aux = [(getattr(data[i],attributename),i) for i in range(len(data))] - return self._helper(data, aux, inplace) + def byAttribute(self, data, attributename, inplace=1): + aux = [(getattr(data[i],attributename),i) for i in range(len(data))] + return self._helper(data, aux, inplace) - # a couple of handy synonyms - sort = byItem - __call__ = byItem + # a couple of handy synonyms + sort = byItem + __call__ = byItem @@ -398,11 +398,11 @@ def mkdirs(newdir, mode=0777): - try: os.makedirs(newdir, mode) - except OSError, err: - # Reraise the error unless it's about an already existing directory - if err.errno != errno.EEXIST or not os.path.isdir(newdir): - raise + try: os.makedirs(newdir, mode) + except OSError, err: + # Reraise the error unless it's about an already existing directory + if err.errno != errno.EEXIST or not os.path.isdir(newdir): + raise class GetRealpathAndStat: @@ -456,7 +456,7 @@ return self.data def __get_item__(self, i): - return self.data[i % len(self.data)] + return self.data[i % len(self.data)] # use enumerate builtin if available, else use python version @@ -501,16 +501,16 @@ def get_split_ind(seq, N): - """seq is a list of words. Return the index into seq such that - len(' '.join(seq[:ind])<=N - """ + """seq is a list of words. Return the index into seq such that + len(' '.join(seq[:ind])<=N + """ - sLen = 0 - # todo: use Alex's xrange pattern from the cbook for efficiency - for (word, ind) in zip(seq, range(len(seq))): - sLen += len(word) + 1 # +1 to account for the len(' ') - if sLen>=N: return ind - return len(seq) + sLen = 0 + # todo: use Alex's xrange pattern from the cbook for efficiency + for (word, ind) in zip(seq, range(len(seq))): + sLen += len(word) + 1 # +1 to account for the len(' ') + if sLen>=N: return ind + return len(seq) def wrap(prefix, text, cols): @@ -630,20 +630,20 @@ def pieces(seq, num=2): - "Break up the seq into num tuples" - start = 0 - while 1: - item = seq[start:start+num] - if not len(item): break - yield item - start += num + "Break up the seq into num tuples" + start = 0 + while 1: + item = seq[start:start+num] + if not len(item): break + yield item + start += num def exception_to_str(s = None): - sh = StringIO.StringIO() - if s is not None: print >>sh, s - traceback.print_exc(file=sh) - return sh.getvalue() + sh = StringIO.StringIO() + if s is not None: print >>sh, s + traceback.print_exc(file=sh) + return sh.getvalue() def allequal(seq): @@ -995,59 +995,59 @@ False """ def __init__(self, init=[]): - mapping = self._mapping = {} - for x in init: - mapping[x] = [x] + mapping = self._mapping = {} + for x in init: + mapping[x] = [x] def __contains__(self, item): return item in self._mapping def join(self, a, *args): - """ - Join given arguments into the same set. - Accepts one or more arguments. - """ - mapping = self._mapping - set_a = mapping.setdefault(a, [a]) + """ + Join given arguments into the same set. + Accepts one or more arguments. + """ + mapping = self._mapping + set_a = mapping.setdefault(a, [a]) - for arg in args: - set_b = mapping.get(arg) - if set_b is None: - set_a.append(arg) - mapping[arg] = set_a - elif set_b is not set_a: - if len(set_b) > len(set_a): - set_a, set_b = set_b, set_a - set_a.extend(set_b) - for elem in set_b: - mapping[elem] = set_a + for arg in args: + set_b = mapping.get(arg) + if set_b is None: + set_a.append(arg) + mapping[arg] = set_a + elif set_b is not set_a: + if len(set_b) > len(set_a): + set_a, set_b = set_b, set_a + set_a.extend(set_b) + for elem in set_b: + mapping[elem] = set_a def joined(self, a, b): - """ - Returns True if a and b are members of the same set. - """ - mapping = self._mapping - try: - return mapping[a] is mapping[b] - except KeyError: - return False + """ + Returns True if a and b are members of the same set. + """ + mapping = self._mapping + try: + return mapping[a] is mapping[b] + except KeyError: + return False def __iter__(self): - """ - Returns an iterator yielding each of the disjoint sets as a list. - """ - seen = set() - for elem, group in self._mapping.iteritems(): - if elem not in seen: - yield group - seen.update(group) + """ + Returns an iterator yielding each of the disjoint sets as a list. + """ + seen = set() + for elem, group in self._mapping.iteritems(): + if elem not in seen: + yield group + seen.update(group) def get_siblings(self, a): - """ - Returns all of the items joined with the given item, including - itself. - """ - return self._mapping.get(a, [a]) + """ + Returns all of the items joined with the given item, including + itself. + """ + return self._mapping.get(a, [a]) def simple_linear_interpolation(a, steps): Modified: trunk/matplotlib/lib/matplotlib/cm.py =================================================================== --- trunk/matplotlib/lib/matplotlib/cm.py 2008-01-23 22:35:10 UTC (rev 4893) +++ trunk/matplotlib/lib/matplotlib/cm.py 2008-01-24 18:15:56 UTC (rev 4894) @@ -194,4 +194,3 @@ observer.notify(self) for key in self.update_dict: self.update_dict[key] = True - Modified: trunk/matplotlib/lib/matplotlib/collections.py =================================================================== --- trunk/matplotlib/lib/matplotlib/collections.py 2008-01-23 22:35:10 UTC (rev 4893) +++ trunk/matplotlib/lib/matplotlib/collections.py 2008-01-24 18:15:56 UTC (rev 4894) @@ -709,4 +709,3 @@ 'StarPolygonCollection'): artist.kwdocd[k] = patchstr artist.kwdocd['LineCollection'] = artist.kwdoc(LineCollection) - Modified: trunk/matplotlib/lib/matplotlib/colorbar.py =================================================================== --- trunk/matplotlib/lib/matplotlib/colorbar.py 2008-01-23 22:35:10 UTC (rev 4893) +++ trunk/matplotlib/lib/matplotlib/colorbar.py 2008-01-24 18:15:56 UTC (rev 4894) @@ -670,4 +670,3 @@ self.set_aspect(aspect, anchor=anchor, adjustable='box') ''' - Modified: trunk/matplotlib/lib/matplotlib/colors.py =================================================================== --- trunk/matplotlib/lib/matplotlib/colors.py 2008-01-23 22:35:10 UTC (rev 4893) +++ trunk/matplotlib/lib/matplotlib/colors.py 2008-01-24 18:15:56 UTC (rev 4894) @@ -699,4 +699,3 @@ # compatibility with earlier class names that violated convention: normalize = Normalize no_norm = NoNorm - Modified: trunk/matplotlib/lib/matplotlib/contour.py =================================================================== --- trunk/matplotlib/lib/matplotlib/contour.py 2008-01-23 22:35:10 UTC (rev 4893) +++ trunk/matplotlib/lib/matplotlib/contour.py 2008-01-24 18:15:56 UTC (rev 4894) @@ -365,7 +365,7 @@ additions.append(path.Path(new[1])) paths.extend(additions) - + class ContourSet(cm.ScalarMappable, ContourLabeler): """ Create and store a set of contour lines or filled regions. @@ -396,7 +396,7 @@ self.filled = kwargs.get('filled', False) self.linewidths = kwargs.get('linewidths', None) self.linestyles = kwargs.get('linestyles', 'solid') - + self.alpha = kwargs.get('alpha', 1.0) self.origin = kwargs.get('origin', None) self.extent = kwargs.get('extent', None) @@ -705,7 +705,7 @@ linewidths = [linewidths] * Nlev tlinewidths = [(w,) for w in linewidths] return tlinewidths - + def _process_linestyles(self): linestyles = self.linestyles Nlev = len(self.levels) @@ -839,5 +839,3 @@ removed. Chunking introduces artifacts at the chunk boundaries unless antialiased = False """ - - Modified: trunk/matplotlib/lib/matplotlib/dates.py =================================================================== --- trunk/matplotlib/lib/matplotlib/dates.py 2008-01-23 22:35:10 UTC (rev 4893) +++ trunk/matplotlib/lib/matplotlib/dates.py 2008-01-24 18:15:56 UTC (rev 4894) @@ -1066,6 +1066,3 @@ #for t in ticks: print formatter(t) for t in dates: print formatter(t) - - - Modified: trunk/matplotlib/lib/matplotlib/dviread.py =================================================================== --- trunk/matplotlib/lib/matplotlib/dviread.py 2008-01-23 22:35:10 UTC (rev 4893) +++ trunk/matplotlib/lib/matplotlib/dviread.py 2008-01-24 18:15:56 UTC (rev 4894) @@ -99,13 +99,13 @@ descent=maxy-maxy_pure) d = self.dpi / (72.27 * 2**16) # from TeX's "scaled points" to dpi units - text = [ ((x-minx)*d, (maxy-y)*d, f, g, w*d) + text = [ ((x-minx)*d, (maxy-y)*d, f, g, w*d) for (x,y,f,g,w) in self.text ] boxes = [ ((x-minx)*d, (maxy-y)*d, h*d, w*d) for (x,y,h,w) in self.boxes ] - return mpl_cbook.Bunch(text=text, boxes=boxes, - width=(maxx-minx)*d, - height=(maxy_pure-miny)*d, + return mpl_cbook.Bunch(text=text, boxes=boxes, + width=(maxx-minx)*d, + height=(maxy_pure-miny)*d, descent=(maxy-maxy_pure)*d) def _read(self): @@ -118,8 +118,8 @@ self._dispatch(byte) # if self.state == _dvistate.inpage: # matplotlib.verbose.report( -# 'Dvi._read: after %d at %f,%f' % -# (byte, self.h, self.v), +# 'Dvi._read: after %d at %f,%f' % +# (byte, self.h, self.v), # 'debug-annoying') if byte == 140: # end of page return True @@ -248,10 +248,10 @@ raise ValueError, "misplaced put_char in dvi file" font = self.fonts[self.f] if font._vf is None: - self.text.append((self.h, self.v, font, char, + self.text.append((self.h, self.v, font, char, font._width_of(char))) # matplotlib.verbose.report( -# 'Dvi._put_char: %d,%d %d' %(self.h, self.v, char), +# 'Dvi._put_char: %d,%d %d' %(self.h, self.v, char), # 'debug-annoying') else: scale = font._scale @@ -350,7 +350,7 @@ def _xxx(self, special): matplotlib.verbose.report( 'Dvi._xxx: encountered special: %s' - % ''.join([(32 <= ord(ch) < 127) and ch + % ''.join([(32 <= ord(ch) < 127) and ch or '<%02x>' % ord(ch) for ch in special]), 'debug') @@ -420,7 +420,7 @@ class Vf(Dvi): """ A virtual font (*.vf file) containing subroutines for dvi files. - + Usage: vf = Vf(filename) glyph = vf[code] @@ -528,7 +528,7 @@ Attributes: checksum: for verifying against dvi file design_size: design size of the font (in what units?) - width[i]: width of character #i, needs to be scaled + width[i]: width of character #i, needs to be scaled by the factor specified in the dvi file (this is a dict because indexing may not start from 0) height[i], depth[i]: height and depth of character #i @@ -559,7 +559,7 @@ self.width, self.height, self.depth = {}, {}, {} widths, heights, depths = \ - [ struct.unpack('!%dI' % (len(x)/4), x) + [ struct.unpack('!%dI' % (len(x)/4), x) for x in (widths, heights, depths) ] for i in range(ec-bc): self.width[bc+i] = _fix2comp(widths[ord(char_info[4*i])]) @@ -590,7 +590,7 @@ But the user may have configured these files differently. """ __slots__ = ('_font',) - + def __init__(self, filename): self._font = {} file = open(filename, 'rt') @@ -612,7 +612,7 @@ """Parse each line into words.""" for line in file: line = line.strip() - if line == '' or line.startswith('%'): + if line == '' or line.startswith('%'): continue words, pos = [], 0 while pos < len(line): @@ -660,7 +660,7 @@ assert filename is None filename = word self._font[texname] = mpl_cbook.Bunch( - texname=texname, psname=psname, effects=effects, + texname=texname, psname=psname, effects=effects, encoding=encoding, filename=filename) class Encoding(object): @@ -670,7 +670,7 @@ PostScript. Usage (subject to change): - for name in Encoding(filename): + for name in Encoding(filename): whatever(name) """ __slots__ = ('encoding',) @@ -698,7 +698,7 @@ if state == 0: # Expecting something like /FooEncoding [ - if '[' in line: + if '[' in line: state = 1 line = line[line.index('[')+1:].strip() @@ -766,10 +766,10 @@ cache[texname] = result return result -def _tfmfile(texname): +def _tfmfile(texname): return _fontfile(texname, Tfm, '.tfm', _tfmcache) -def _vffile(texname): +def _vffile(texname): return _fontfile(texname, Vf, '.vf', _vfcache) @@ -792,5 +792,3 @@ print x,y,c, 32 <= c < 128 and chr(c) or '.', w for x,y,w,h in page.boxes: print x,y,'BOX',w,h - - Modified: trunk/matplotlib/lib/matplotlib/figure.py =================================================================== --- trunk/matplotlib/lib/matplotlib/figure.py 2008-01-23 22:35:10 UTC (rev 4893) +++ trunk/matplotlib/lib/matplotlib/figure.py 2008-01-24 18:15:56 UTC (rev 4894) @@ -122,10 +122,10 @@ if facecolor is None: facecolor = rcParams['figure.facecolor'] if edgecolor is None: edgecolor = rcParams['figure.edgecolor'] - self._dpi_scale_trans = Affine2D() + self._dpi_scale_trans = Affine2D() self.dpi = dpi - self.bbox_inches = Bbox.from_bounds(0, 0, *figsize) - self.bbox = TransformedBbox(self.bbox_inches, self._dpi_scale_trans) + self.bbox_inches = Bbox.from_bounds(0, 0, *figsize) + self.bbox = TransformedBbox(self.bbox_inches, self._dpi_scale_trans) self.frameon = frameon @@ -154,10 +154,10 @@ self._autoLayout = rcParams['figure.autolayout'] def _get_dpi(self): - return self._dpi + return self._dpi def _set_dpi(self, dpi): - self._dpi = dpi - self._dpi_scale_trans.clear().scale(dpi, dpi) + self._dpi = dpi + self._dpi_scale_trans.clear().scale(dpi, dpi) dpi = property(_get_dpi, _set_dpi) def enable_auto_layout(self, setting=True): @@ -334,8 +334,8 @@ else: w,h = args - dpival = self.dpi - self.bbox_inches.p1 = w, h + dpival = self.dpi + self.bbox_inches.p1 = w, h if forward: dpival = self.dpi @@ -358,7 +358,7 @@ def get_figwidth(self): 'Return the figwidth as a float' - return self.bbox_inches.width + return self.bbox_inches.width def get_figheight(self): 'Return the figheight as a float' @@ -394,7 +394,7 @@ ACCEPTS: float """ - self.dpi = val + self.dpi = val def set_figwidth(self, val): """ @@ -402,7 +402,7 @@ ACCEPTS: float """ - self.bbox_inches.x1 = val + self.bbox_inches.x1 = val def set_figheight(self, val): """ @@ -410,7 +410,7 @@ ACCEPTS: float """ - self.bbox_inches.y1 = val + self.bbox_inches.y1 = val def set_frameon(self, b): """ Modified: trunk/matplotlib/lib/matplotlib/finance.py =================================================================== --- trunk/matplotlib/lib/matplotlib/finance.py 2008-01-23 22:35:10 UTC (rev 4893) +++ trunk/matplotlib/lib/matplotlib/finance.py 2008-01-24 18:15:56 UTC (rev 4894) @@ -692,6 +692,3 @@ # add these last ax.add_collection(barCollection) return barCollection - - - Modified: trunk/matplotlib/lib/matplotlib/font_manager.py =================================================================== --- trunk/matplotlib/lib/matplotlib/font_manager.py 2008-01-23 22:35:10 UTC (rev 4893) +++ trunk/matplotlib/lib/matplotlib/font_manager.py 2008-01-24 18:15:56 UTC (rev 4894) @@ -1139,4 +1139,3 @@ _rebuild() font = fontManager.findfont(prop, **kw) return font - Modified: trunk/matplotlib/lib/matplotlib/image.py =================================================================== --- trunk/matplotlib/lib/matplotlib/image.py 2008-01-23 22:35:10 UTC (rev 4893) +++ trunk/matplotlib/lib/matplotlib/image.py 2008-01-24 18:15:56 UTC (rev 4894) @@ -357,7 +357,7 @@ if len(A.shape) == 3 and A.shape[2] not in [1, 3, 4]: raise TypeError("3D arrays must have three (RGB) or four (RGBA) color components") if len(A.shape) == 3 and A.shape[2] == 1: - A.shape = A.shape[0:2] + A.shape = A.shape[0:2] if len(A.shape) == 2: if A.dtype != npy.uint8: A = (self.cmap(self.norm(A))*255).astype(npy.uint8) Modified: trunk/matplotlib/lib/matplotlib/lines.py =================================================================== --- trunk/matplotlib/lib/matplotlib/lines.py 2008-01-23 22:35:10 UTC (rev 4893) +++ trunk/matplotlib/lib/matplotlib/lines.py 2008-01-24 18:15:56 UTC (rev 4894) @@ -426,8 +426,8 @@ self._xy = ma.concatenate((x, y), 1) else: self._xy = npy.concatenate((x, y), 1) - self._x = self._xy[:, 0] # just a view - self._y = self._xy[:, 1] # just a view + self._x = self._xy[:, 0] # just a view + self._y = self._xy[:, 1] # just a view # Masked arrays are now handled by the Path class itself self._path = Path(self._xy) @@ -693,7 +693,7 @@ def _draw_solid(self, renderer, gc, path, trans): gc.set_linestyle('solid') - renderer.draw_path(gc, path, trans) + renderer.draw_path(gc, path, trans) def _draw_steps_pre(self, renderer, gc, path, trans): @@ -737,255 +737,255 @@ if self._dashSeq is not None: gc.set_dashes(0, self._dashSeq) - renderer.draw_path(gc, path, trans) + renderer.draw_path(gc, path, trans) def _draw_dash_dot(self, renderer, gc, path, trans): gc.set_linestyle('dashdot') - renderer.draw_path(gc, path, trans) + renderer.draw_path(gc, path, trans) def _draw_dotted(self, renderer, gc, path, trans): gc.set_linestyle('dotted') - renderer.draw_path(gc, path, trans) + renderer.draw_path(gc, path, trans) def _draw_point(self, renderer, gc, path, path_trans): w = renderer.points_to_pixels(self._markersize) * \ - self._point_size_reduction * 0.5 + self._point_size_reduction * 0.5 rgbFace = self._get_rgb_face() - transform = Affine2D().scale(w) - renderer.draw_markers( - gc, Path.unit_circle(), transform, path, path_trans, - rgbFace) + transform = Affine2D().scale(w) + renderer.draw_markers( + gc, Path.unit_circle(), transform, path, path_trans, + rgbFace) _draw_pixel_transform = Affine2D().translate(-0.5, -0.5) def _draw_pixel(self, renderer, gc, path, path_trans): - rgbFace = self._get_rgb_face() - renderer.draw_markers(gc, Path.unit_rectangle(), + rgbFace = self._get_rgb_face() + renderer.draw_markers(gc, Path.unit_rectangle(), self._draw_pixel_transform, - path, path_trans, rgbFace) + path, path_trans, rgbFace) def _draw_circle(self, renderer, gc, path, path_trans): w = renderer.points_to_pixels(self._markersize) * 0.5 rgbFace = self._get_rgb_face() - transform = Affine2D().scale(w, w) - renderer.draw_markers( - gc, Path.unit_circle(), transform, path, path_trans, - rgbFace) + transform = Affine2D().scale(w, w) + renderer.draw_markers( + gc, Path.unit_circle(), transform, path, path_trans, + rgbFace) _triangle_path = Path([[0.0, 1.0], [-1.0, -1.0], [1.0, -1.0], [0.0, 1.0]]) def _draw_triangle_up(self, renderer, gc, path, path_trans): offset = 0.5*renderer.points_to_pixels(self._markersize) - transform = Affine2D().scale(offset, offset) + transform = Affine2D().scale(offset, offset) rgbFace = self._get_rgb_face() - renderer.draw_markers(gc, self._triangle_path, transform, - path, path_trans, rgbFace) + renderer.draw_markers(gc, self._triangle_path, transform, + path, path_trans, rgbFace) def _draw_triangle_down(self, renderer, gc, path, path_trans): offset = 0.5*renderer.points_to_pixels(self._markersize) - transform = Affine2D().scale(offset, -offset) + transform = Affine2D().scale(offset, -offset) rgbFace = self._get_rgb_face() - renderer.draw_markers(gc, self._triangle_path, transform, - path, path_trans, rgbFace) + renderer.draw_markers(gc, self._triangle_path, transform, + path, path_trans, rgbFace) def _draw_triangle_left(self, renderer, gc, path, path_trans): offset = 0.5*renderer.points_to_pixels(self._markersize) - transform = Affine2D().scale(offset, offset).rotate_deg(90) + transform = Affine2D().scale(offset, offset).rotate_deg(90) rgbFace = self._get_rgb_face() - renderer.draw_markers(gc, self._triangle_path, transform, - path, path_trans, rgbFace) + renderer.draw_markers(gc, self._triangle_path, transform, + path, path_trans, rgbFace) def _draw_triangle_right(self, renderer, gc, path, path_trans): offset = 0.5*renderer.points_to_pixels(self._markersize) - transform = Affine2D().scale(offset, offset).rotate_deg(-90) + transform = Affine2D().scale(offset, offset).rotate_deg(-90) rgbFace = self._get_rgb_face() - renderer.draw_markers(gc, self._triangle_path, transform, - path, path_trans, rgbFace) + renderer.draw_markers(gc, self._triangle_path, transform, + path, path_trans, rgbFace) def _draw_square(self, renderer, gc, path, path_trans): side = renderer.points_to_pixels(self._markersize) - transform = Affine2D().translate(-0.5, -0.5).scale(side) + transform = Affine2D().translate(-0.5, -0.5).scale(side) rgbFace = self._get_rgb_face() - renderer.draw_markers(gc, Path.unit_rectangle(), transform, - path, path_trans, rgbFace) + renderer.draw_markers(gc, Path.unit_rectangle(), transform, + path, path_trans, rgbFace) def _draw_diamond(self, renderer, gc, path, path_trans): side = renderer.points_to_pixels(self._markersize) - transform = Affine2D().translate(-0.5, -0.5).rotate_deg(45).scale(side) + transform = Affine2D().translate(-0.5, -0.5).rotate_deg(45).scale(side) rgbFac... [truncated message content] |