SourceForge logo
SourceForge logo
Menu

matplotlib-checkins — Commit notification. DO NOT POST to this list, just subscribe to it.

You can subscribe to this list here.

2007 Jan
Feb
Mar
Apr
May
Jun
Jul
(115)
Aug
(120)
Sep
(137)
Oct
(170)
Nov
(461)
Dec
(263)
2008 Jan
(120)
Feb
(74)
Mar
(35)
Apr
(74)
May
(245)
Jun
(356)
Jul
(240)
Aug
(115)
Sep
(78)
Oct
(225)
Nov
(98)
Dec
(271)
2009 Jan
(132)
Feb
(84)
Mar
(74)
Apr
(56)
May
(90)
Jun
(79)
Jul
(83)
Aug
(296)
Sep
(214)
Oct
(76)
Nov
(82)
Dec
(66)
2010 Jan
(46)
Feb
(58)
Mar
(51)
Apr
(77)
May
(58)
Jun
(126)
Jul
(128)
Aug
(64)
Sep
(50)
Oct
(44)
Nov
(48)
Dec
(54)
2011 Jan
(68)
Feb
(52)
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
(1)
2018 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S


1
(3)
2
(2)
3
(5)
4
(1)
5
6
7
(6)
8
(3)
9
(7)
10
(6)
11
(14)
12
(6)
13
(10)
14
(6)
15
16
17
(15)
18
(6)
19
(1)
20
(4)
21
(8)
22
(9)
23
(12)
24
(35)
25
(21)
26
(14)
27
(11)
28
(9)
29
(11)
30
(6)
31
(9)


Showing results of 240

<< < 1 2 3 4 5 .. 10 > >> (Page 3 of 10)
From: <pki...@us...> - 2008年07月26日 19:24:30
Revision: 5891
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5891&view=rev
Author: pkienzle
Date: 2008年07月26日 19:24:28 +0000 (2008年7月26日)
Log Message:
-----------
Fix contains() for collections, moving common code from draw() into a function
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/collections.py
Modified: trunk/matplotlib/lib/matplotlib/collections.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/collections.py	2008年07月26日 19:22:44 UTC (rev 5890)
+++ trunk/matplotlib/lib/matplotlib/collections.py	2008年07月26日 19:24:28 UTC (rev 5891)
@@ -148,9 +148,9 @@
 result = result.inverse_transformed(transData)
 return result
 
- def draw(self, renderer):
- if not self.get_visible(): return
- renderer.open_group(self.__class__.__name__)
+ def _prepare_points(self):
+ """Point prep for drawing and hit testing"""
+
 transform = self.get_transform()
 transOffset = self._transOffset
 offsets = self._offsets
@@ -171,12 +171,6 @@
 
 offsets = np.asarray(offsets, np.float_)
 
- self.update_scalarmappable()
-
- clippath, clippath_trans = self.get_transformed_clip_path_and_affine()
- if clippath_trans is not None:
- clippath_trans = clippath_trans.frozen()
-
 if not transform.is_affine:
 paths = [transform.transform_path_non_affine(path) for path in paths]
 transform = transform.get_affine()
@@ -184,7 +178,20 @@
 offsets = transOffset.transform_non_affine(offsets)
 transOffset = transOffset.get_affine()
 
+ return transform, transOffset, offsets, paths
 
+ def draw(self, renderer):
+ if not self.get_visible(): return
+ renderer.open_group(self.__class__.__name__)
+
+ self.update_scalarmappable()
+
+ clippath, clippath_trans = self.get_transformed_clip_path_and_affine()
+ if clippath_trans is not None:
+ clippath_trans = clippath_trans.frozen()
+
+ transform, transOffset, offsets, paths = self._prepare_points()
+
 renderer.draw_path_collection(
 transform.frozen(), self.clipbox, clippath, clippath_trans,
 paths, self.get_transforms(),
@@ -201,18 +208,14 @@
 item in itemlist contains the event.
 """
 if callable(self._contains): return self._contains(self,mouseevent)
+ if not self.get_visible(): return False,{}
 
- transform = self.get_transform()
- paths = self.get_paths()
- if not transform.is_affine:
- paths = [transform.transform_path_non_affine(path) for path in paths]
- transform = transform.get_affine()
+ transform, transOffset, offsets, paths = self._prepare_points()
 
 ind = mpath.point_in_path_collection(
 mouseevent.x, mouseevent.y, self._pickradius,
 transform.frozen(), paths, self.get_transforms(),
- np.asarray(self._offsets, np.float_),
- self._transOffset.frozen(), len(self._facecolors))
+ offsets, transOffset, len(self._facecolors)>0)
 return len(ind)>0,dict(ind=ind)
 
 def set_pickradius(self,pickradius): self.pickradius = 5
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <pki...@us...> - 2008年07月26日 19:22:47
Revision: 5890
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5890&view=rev
Author: pkienzle
Date: 2008年07月26日 19:22:44 +0000 (2008年7月26日)
Log Message:
-----------
Fix str() method for Wedge artist
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/patches.py
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py	2008年07月26日 19:19:35 UTC (rev 5889)
+++ trunk/matplotlib/lib/matplotlib/patches.py	2008年07月26日 19:22:44 UTC (rev 5890)
@@ -627,7 +627,7 @@
 
 class Wedge(Patch):
 def __str__(self):
- return "Wedge(%g,%g)"%self.xy[0]
+ return "Wedge(%g,%g)"%(self.theta1,self.theta2)
 
 def __init__(self, center, r, theta1, theta2, **kwargs):
 """
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <pki...@us...> - 2008年07月26日 19:19:37
Revision: 5889
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5889&view=rev
Author: pkienzle
Date: 2008年07月26日 19:19:35 +0000 (2008年7月26日)
Log Message:
-----------
support unicode when printing Text artist with str(artist)
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/text.py
Modified: trunk/matplotlib/lib/matplotlib/text.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/text.py	2008年07月26日 19:17:05 UTC (rev 5888)
+++ trunk/matplotlib/lib/matplotlib/text.py	2008年07月26日 19:19:35 UTC (rev 5889)
@@ -83,7 +83,7 @@
 """
 zorder = 3
 def __str__(self):
- return "Text(%g,%g,%s)"%(self._y,self._y,self._text)
+ return "Text(%g,%g,%s)"%(self._y,self._y,repr(self._text))
 
 def __init__(self,
 x=0, y=0, text='',
@@ -135,7 +135,7 @@
 """
 if callable(self._contains): return self._contains(self,mouseevent)
 
- if not self.get_visible() or self._renderer is None: 
+ if not self.get_visible() or self._renderer is None:
 return False,{}
 
 l,b,w,h = self.get_window_extent().bounds
@@ -703,7 +703,7 @@
 __name__ = 'textwithdash'
 
 def __str__(self):
- return "TextWithDash(%g,%g,%s)"%(self._x,self._y,self._text)
+ return "TextWithDash(%g,%g,%s)"%(self._x,self._y,repr(self._text))
 def __init__(self,
 x=0, y=0, text='',
 color=None, # defaults to rc params
@@ -986,7 +986,7 @@
 :class:`~matplotlib.patches.Rectangle`, etc., easier.
 """
 def __str__(self):
- return "Annotation(%g,%g,%s)"%(self.xy[0],self.xy[1],self._text)
+ return "Annotation(%g,%g,%s)"%(self.xy[0],self.xy[1],repr(self._text))
 def __init__(self, s, xy,
 xytext=None,
 xycoords='data',
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <pki...@us...> - 2008年07月26日 19:17:07
Revision: 5888
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5888&view=rev
Author: pkienzle
Date: 2008年07月26日 19:17:05 +0000 (2008年7月26日)
Log Message:
-----------
Fix contains method for inverted image axes
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/image.py
Modified: trunk/matplotlib/lib/matplotlib/image.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/image.py	2008年07月26日 18:42:22 UTC (rev 5887)
+++ trunk/matplotlib/lib/matplotlib/image.py	2008年07月26日 19:17:05 UTC (rev 5888)
@@ -50,6 +50,9 @@
 
 interpnames = _interpd.keys()
 
+ def __str__(self):
+ return "AxesImage(%g,%g;%gx%g)" % tuple(self.axes.bbox.bounds)
+
 def __init__(self, ax,
 cmap = None,
 norm = None,
@@ -243,11 +246,15 @@
 # collection on nonlinear transformed coordinates.
 # TODO: consider returning image coordinates (shouldn't
 # be too difficult given that the image is rectilinear
+ x, y = mouseevent.xdata, mouseevent.ydata
 xmin, xmax, ymin, ymax = self.get_extent()
- xdata, ydata = mouseevent.xdata, mouseevent.ydata
- #print xdata, ydata, xmin, xmax, ymin, ymax
- if xdata is not None and ydata is not None:
- inside = xdata>=xmin and xdata<=xmax and ydata>=ymin and ydata<=ymax
+ if xmin > xmax:
+ xmin,xmax = xmax,xmin
+ if ymin > ymax:
+ ymin,ymax = ymax,ymin
+ #print x, y, xmin, xmax, ymin, ymax
+ if x is not None and y is not None:
+ inside = x>=xmin and x<=xmax and y>=ymin and y<=ymax
 else:
 inside = False
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5887
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5887&view=rev
Author: pkienzle
Date: 2008年07月26日 18:42:22 +0000 (2008年7月26日)
Log Message:
-----------
clipped line must recache in set_data
Modified Paths:
--------------
 trunk/matplotlib/examples/pylab_examples/clippedline.py
Modified: trunk/matplotlib/examples/pylab_examples/clippedline.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/clippedline.py	2008年07月26日 18:33:15 UTC (rev 5886)
+++ trunk/matplotlib/examples/pylab_examples/clippedline.py	2008年07月26日 18:42:22 UTC (rev 5887)
@@ -19,6 +19,8 @@
 
 def set_data(self, *args, **kwargs):
 Line2D.set_data(self, *args, **kwargs)
+ if self._invalid: 
+ self.recache()
 self.xorig = np.array(self._x)
 self.yorig = np.array(self._y)
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5886
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5886&view=rev
Author: pkienzle
Date: 2008年07月26日 18:33:15 +0000 (2008年7月26日)
Log Message:
-----------
to_numeric requires PIL
Modified Paths:
--------------
 trunk/matplotlib/examples/pylab_examples/to_numeric.py
Modified: trunk/matplotlib/examples/pylab_examples/to_numeric.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/to_numeric.py	2008年07月26日 04:50:56 UTC (rev 5885)
+++ trunk/matplotlib/examples/pylab_examples/to_numeric.py	2008年07月26日 18:33:15 UTC (rev 5886)
@@ -1,12 +1,16 @@
 #!/usr/bin/env python
 """
 Use backend agg to access the figure canvas as an RGB string and then
-convert it to a Numeric array and pass the string it to PIL for
+convert it to an array and pass the string it to PIL for
 rendering
 """
 
 from pylab import *
 from matplotlib.backends.backend_agg import FigureCanvasAgg
+try:
+ import Image
+except ImportError, exc:
+ raise SystemExit("PIL must be installed to run this example")
 
 plot([1,2,3])
 
@@ -21,10 +25,9 @@
 w, h = int(w), int(h)
 
 
-X = fromstring(s, UInt8)
+X = fromstring(s, uint8)
 X.shape = h, w, 3
 
-import Image
 im = Image.fromstring( "RGB", (w,h), s)
 im.show()
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ry...@us...> - 2008年07月26日 04:50:59
Revision: 5885
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5885&view=rev
Author: ryanmay
Date: 2008年07月26日 04:50:56 +0000 (2008年7月26日)
Log Message:
-----------
Change to try to import md5 from hashlib, and fall back to md5. Change the uses of md5 to work with either.
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/backends/backend_ps.py
 trunk/matplotlib/lib/matplotlib/backends/backend_svg.py
 trunk/matplotlib/lib/matplotlib/finance.py
 trunk/matplotlib/lib/matplotlib/texmanager.py
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_ps.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_ps.py	2008年07月26日 00:34:02 UTC (rev 5884)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_ps.py	2008年07月26日 04:50:56 UTC (rev 5885)
@@ -3,9 +3,14 @@
 """
 
 from __future__ import division
-import glob, math, md5, os, shutil, sys, time
+import glob, math, os, shutil, sys, time
 def _fn_name(): return sys._getframe(1).f_code.co_name
 
+try:
+ from hashlib import md5
+except ImportError:
+ from md5 import md5 #Deprecated in 2.5
+
 from tempfile import gettempdir
 from cStringIO import StringIO
 from matplotlib import verbose, __version__, rcParams
@@ -892,10 +897,10 @@
 passed_in_file_object = False
 if is_string_like(outfile):
 title = outfile
- tmpfile = os.path.join(gettempdir(), md5.md5(outfile).hexdigest())
+ tmpfile = os.path.join(gettempdir(), md5(outfile).hexdigest())
 elif is_writable_file_like(outfile):
 title = None
- tmpfile = os.path.join(gettempdir(), md5.md5(str(hash(outfile))).hexdigest())
+ tmpfile = os.path.join(gettempdir(), md5(str(hash(outfile))).hexdigest())
 passed_in_file_object = True
 else:
 raise ValueError("outfile must be a path or a file-like object")
@@ -1033,7 +1038,7 @@
 title = outfile
 
 # write to a temp file, we'll move it to outfile when done
- tmpfile = os.path.join(gettempdir(), md5.md5(outfile).hexdigest())
+ tmpfile = os.path.join(gettempdir(), md5(outfile).hexdigest())
 fh = file(tmpfile, 'w')
 
 self.figure.dpi = 72 # ignore the dpi kwarg
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_svg.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_svg.py	2008年07月26日 00:34:02 UTC (rev 5884)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_svg.py	2008年07月26日 04:50:56 UTC (rev 5885)
@@ -1,7 +1,12 @@
 from __future__ import division
 
-import os, codecs, base64, tempfile, urllib, gzip, md5, cStringIO
+import os, codecs, base64, tempfile, urllib, gzip, cStringIO
 
+try:
+ from hashlib import md5
+except ImportError:
+ from md5 import md5 #Deprecated in 2.5
+
 from matplotlib import verbose, __version__, rcParams
 from matplotlib.backend_bases import RendererBase, GraphicsContextBase,\
 FigureManagerBase, FigureCanvasBase
@@ -127,7 +132,7 @@
 
 id = self._clipd.get(path)
 if id is None:
- id = 'p%s' % md5.new(path).hexdigest()
+ id = 'p%s' % md5(path).hexdigest()
 self._svgwriter.write('<defs>\n <clipPath id="%s">\n' % id)
 self._svgwriter.write(path)
 self._svgwriter.write('\n </clipPath>\n</defs>')
@@ -191,7 +196,7 @@
 key = self._convert_path(marker_path, marker_trans + Affine2D().scale(1.0, -1.0))
 name = self._markers.get(key)
 if name is None:
- name = 'm%s' % md5.new(key).hexdigest()
+ name = 'm%s' % md5(key).hexdigest()
 write('<defs><path id="%s" d="%s"/></defs>\n' % (name, key))
 self._markers[key] = name
 
@@ -223,7 +228,7 @@
 transform = Affine2D(transform.get_matrix()).scale(1.0, -1.0)
 d = self._convert_path(path, transform)
 name = 'coll%x_%x_%s' % (self._path_collection_id, i,
- md5.new(d).hexdigest())
+ md5(d).hexdigest())
 write('<path id="%s" d="%s"/>\n' % (name, d))
 path_codes.append(name)
 write('</defs>\n')
@@ -412,7 +417,7 @@
 if step[0] != 4:
 currx, curry = step[-2], -step[-1]
 path_data = ''.join(path_data)
- char_num = 'c_%s' % md5.new(path_data).hexdigest()
+ char_num = 'c_%s' % md5(path_data).hexdigest()
 path_element = '<path id="%s" d="%s"/>\n' % (char_num, ''.join(path_data))
 self._char_defs[char_id] = char_num
 return path_element
Modified: trunk/matplotlib/lib/matplotlib/finance.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/finance.py	2008年07月26日 00:34:02 UTC (rev 5884)
+++ trunk/matplotlib/lib/matplotlib/finance.py	2008年07月26日 04:50:56 UTC (rev 5885)
@@ -4,9 +4,13 @@
 
 """
 #from __future__ import division
-import os, time, warnings, md5
+import os, time, warnings
 from urllib import urlopen
 
+try:
+ from hashlib import md5
+except ImportError:
+ from md5 import md5 #Deprecated in 2.5
 
 try: import datetime
 except ImportError:
@@ -111,7 +115,7 @@
 
 
 if cachename is None:
- cachename = os.path.join(cachedir, md5.md5(url).hexdigest())
+ cachename = os.path.join(cachedir, md5(url).hexdigest())
 if os.path.exists(cachename):
 fh = file(cachename)
 verbose.report('Using cachefile %s for %s'%(cachename, ticker))
Modified: trunk/matplotlib/lib/matplotlib/texmanager.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/texmanager.py	2008年07月26日 00:34:02 UTC (rev 5884)
+++ trunk/matplotlib/lib/matplotlib/texmanager.py	2008年07月26日 04:50:56 UTC (rev 5885)
@@ -33,7 +33,13 @@
 
 """
 
-import copy, glob, md5, os, shutil, sys, warnings
+import copy, glob, os, shutil, sys, warnings
+
+try:
+ from hashlib import md5
+except ImportError:
+ from md5 import md5 #Deprecated in 2.5
+
 import distutils.version
 import numpy as np
 import matplotlib as mpl
@@ -166,7 +172,7 @@
 self.get_custom_preamble(), str(dpi or '')])
 # make sure hash is consistent for all strings, regardless of encoding:
 bytes = unicode(s).encode('utf-8')
- return os.path.join(self.texcache, md5.md5(bytes).hexdigest())
+ return os.path.join(self.texcache, md5(bytes).hexdigest())
 
 def get_font_config(self):
 """Reinitializes self if relevant rcParams on have changed."""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ry...@us...> - 2008年07月26日 00:34:05
Revision: 5884
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5884&view=rev
Author: ryanmay
Date: 2008年07月26日 00:34:02 +0000 (2008年7月26日)
Log Message:
-----------
Set svn:ignore on the subdirectories within examples (except data)
Property Changed:
----------------
 trunk/matplotlib/examples/animation/
 trunk/matplotlib/examples/api/
 trunk/matplotlib/examples/event_handling/
 trunk/matplotlib/examples/misc/
 trunk/matplotlib/examples/pylab_examples/
 trunk/matplotlib/examples/tests/
 trunk/matplotlib/examples/units/
 trunk/matplotlib/examples/user_interfaces/
 trunk/matplotlib/examples/widgets/
Property changes on: trunk/matplotlib/examples/animation
___________________________________________________________________
Added: svn:ignore
 + matplotlibrc
matplotlib.conf
*.eps
*.jpeg
*.jpg
*.pdf
*.png
*.ps
*.pyc
*.svg
Property changes on: trunk/matplotlib/examples/api
___________________________________________________________________
Added: svn:ignore
 + matplotlibrc
matplotlib.conf
*.eps
*.jpeg
*.jpg
*.pdf
*.png
*.ps
*.pyc
*.svg
Property changes on: trunk/matplotlib/examples/event_handling
___________________________________________________________________
Added: svn:ignore
 + matplotlibrc
matplotlib.conf
*.eps
*.jpeg
*.jpg
*.pdf
*.png
*.ps
*.pyc
*.svg
Property changes on: trunk/matplotlib/examples/misc
___________________________________________________________________
Added: svn:ignore
 + matplotlibrc
matplotlib.conf
*.eps
*.jpeg
*.jpg
*.pdf
*.png
*.ps
*.pyc
*.svg
Property changes on: trunk/matplotlib/examples/pylab_examples
___________________________________________________________________
Added: svn:ignore
 + matplotlibrc
matplotlib.conf
*.eps
*.jpeg
*.jpg
*.pdf
*.png
*.ps
*.pyc
*.svg
Property changes on: trunk/matplotlib/examples/tests
___________________________________________________________________
Added: svn:ignore
 + matplotlibrc
matplotlib.conf
*.eps
*.jpeg
*.jpg
*.pdf
*.png
*.ps
*.pyc
*.svg
Property changes on: trunk/matplotlib/examples/units
___________________________________________________________________
Added: svn:ignore
 + matplotlibrc
matplotlib.conf
*.eps
*.jpeg
*.jpg
*.pdf
*.png
*.ps
*.pyc
*.svg
Property changes on: trunk/matplotlib/examples/user_interfaces
___________________________________________________________________
Added: svn:ignore
 + matplotlibrc
matplotlib.conf
*.eps
*.jpeg
*.jpg
*.pdf
*.png
*.ps
*.pyc
*.svg
Property changes on: trunk/matplotlib/examples/widgets
___________________________________________________________________
Added: svn:ignore
 + matplotlibrc
matplotlib.conf
*.eps
*.jpeg
*.jpg
*.pdf
*.png
*.ps
*.pyc
*.svg
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2008年07月26日 00:29:27
Revision: 5883
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5883&view=rev
Author: jdh2358
Date: 2008年07月26日 00:29:25 +0000 (2008年7月26日)
Log Message:
-----------
removed debug savefig from image demo
Modified Paths:
--------------
 trunk/matplotlib/examples/pylab_examples/image_demo.py
 trunk/matplotlib/lib/matplotlib/image.py
Modified: trunk/matplotlib/examples/pylab_examples/image_demo.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/image_demo.py	2008年07月26日 00:01:18 UTC (rev 5882)
+++ trunk/matplotlib/examples/pylab_examples/image_demo.py	2008年07月26日 00:29:25 UTC (rev 5883)
@@ -14,6 +14,5 @@
 im = plt.imshow(Z, interpolation='bilinear', cmap=cm.gray,
 origin='lower', extent=[-3,3,-3,3])
 
-plt.savefig('test.ps', dpi=300)
 plt.show()
 
Modified: trunk/matplotlib/lib/matplotlib/image.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/image.py	2008年07月26日 00:01:18 UTC (rev 5882)
+++ trunk/matplotlib/lib/matplotlib/image.py	2008年07月26日 00:29:25 UTC (rev 5883)
@@ -638,7 +638,7 @@
 def make_image(self, magnification=1.0):
 # had to introduce argument magnification to satisfy the unit test
 # figimage_demo.py. I have no idea, how magnification should be used
- # within the function. It should be !=1.0 only for non-default DPI
+ # within the function. It should be !=1.0 only for non-default DPI<
 # settings in the PS backend, as introduced by patch #1562394
 # Probably Nicholas Young should look over this code and see, how
 # magnification should be handled correctly.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <pki...@us...> - 2008年07月26日 00:01:20
Revision: 5882
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5882&view=rev
Author: pkienzle
Date: 2008年07月26日 00:01:18 +0000 (2008年7月26日)
Log Message:
-----------
Fix contains() for lines; don't redraw axis frame
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/axes.py
 trunk/matplotlib/lib/matplotlib/lines.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py	2008年07月25日 23:54:37 UTC (rev 5881)
+++ trunk/matplotlib/lib/matplotlib/axes.py	2008年07月26日 00:01:18 UTC (rev 5882)
@@ -1503,8 +1503,6 @@
 artists.extend(self.tables)
 if self.legend_ is not None:
 artists.append(self.legend_)
- if self.axison and self._frameon:
- artists.append(self.frame)
 
 dsu = [ (a.zorder, i, a) for i, a in enumerate(artists)
 if not a.get_animated() ]
Modified: trunk/matplotlib/lib/matplotlib/lines.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/lines.py	2008年07月25日 23:54:37 UTC (rev 5881)
+++ trunk/matplotlib/lib/matplotlib/lines.py	2008年07月26日 00:01:18 UTC (rev 5882)
@@ -239,7 +239,7 @@
 if self._invalid:
 self.recache()
 if len(self._xy)==0: return False,{}
- tpath, _ = self._transformed_path.get_transformed_path_and_affine()
+ tpath = self._transformed_path.get_fully_transformed_path()
 xyt = tpath.vertices
 xt = xyt[:, 0]
 yt = xyt[:, 1]
@@ -250,7 +250,7 @@
 else:
 pixels = self.figure.dpi/72. * self.pickradius
 
- if self._linestyle == 'None':
+ if self._linestyle in ['None',None]:
 # If no line, return the nearby point(s)
 d = np.sqrt((xt-mouseevent.x)**2 + (yt-mouseevent.y)**2)
 ind, = np.nonzero(np.less_equal(d, pixels))
@@ -258,10 +258,11 @@
 # If line, return the nearby segment(s)
 ind = segment_hits(mouseevent.x,mouseevent.y,xt,yt,pixels)
 if 0:
+ print 'linestyle',self._linestyle
 print 'xt', xt, mouseevent.x
 print 'yt', yt, mouseevent.y
- print 'd', (xt-mouseevent.x)**2., (yt-mouseevent.y)**2.
- print d, pixels, ind
+ print 'dx,dy', (xt-mouseevent.x)**2., (yt-mouseevent.y)**2.
+ print 'ind',ind
 return len(ind)>0,dict(ind=ind)
 
 def get_pickradius(self):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2008年07月25日 23:54:41
Revision: 5881
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5881&view=rev
Author: jdh2358
Date: 2008年07月25日 23:54:37 +0000 (2008年7月25日)
Log Message:
-----------
added set_figure method for quiverkey
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/quiver.py
Modified: trunk/matplotlib/lib/matplotlib/quiver.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/quiver.py	2008年07月25日 23:52:46 UTC (rev 5880)
+++ trunk/matplotlib/lib/matplotlib/quiver.py	2008年07月25日 23:54:37 UTC (rev 5881)
@@ -296,7 +296,7 @@
 quiverkey_doc = _quiverkey_doc
 
 def set_figure(self, fig):
- Artist.set_figure(self, fig)
+ martist.Artist.set_figure(self, fig)
 self.text.set_figure(fig)
 
 class Quiver(collections.PolyCollection):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2008年07月25日 23:52:48
Revision: 5880
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5880&view=rev
Author: jdh2358
Date: 2008年07月25日 23:52:46 +0000 (2008年7月25日)
Log Message:
-----------
added set_figure method for quiverkey
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/quiver.py
Modified: trunk/matplotlib/lib/matplotlib/quiver.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/quiver.py	2008年07月25日 23:45:01 UTC (rev 5879)
+++ trunk/matplotlib/lib/matplotlib/quiver.py	2008年07月25日 23:52:46 UTC (rev 5880)
@@ -235,6 +235,7 @@
 self._initialized = False
 self.zorder = Q.zorder + 0.1
 
+
 __init__.__doc__ = _quiverkey_doc
 
 def _init(self):
@@ -294,6 +295,10 @@
 raise ValueError('unrecognized coordinates')
 quiverkey_doc = _quiverkey_doc
 
+ def set_figure(self, fig):
+ Artist.set_figure(self, fig)
+ self.text.set_figure(fig)
+
 class Quiver(collections.PolyCollection):
 """
 Specialized PolyCollection for arrows.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2008年07月25日 23:45:03
Revision: 5879
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5879&view=rev
Author: jdh2358
Date: 2008年07月25日 23:45:01 +0000 (2008年7月25日)
Log Message:
-----------
fix for ps renderer dpi/imagedpi confusion
Modified Paths:
--------------
 trunk/matplotlib/examples/pylab_examples/image_demo.py
 trunk/matplotlib/lib/matplotlib/backends/backend_ps.py
 trunk/matplotlib/lib/matplotlib/collections.py
 trunk/matplotlib/lib/matplotlib/text.py
Modified: trunk/matplotlib/examples/pylab_examples/image_demo.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/image_demo.py	2008年07月25日 23:22:26 UTC (rev 5878)
+++ trunk/matplotlib/examples/pylab_examples/image_demo.py	2008年07月25日 23:45:01 UTC (rev 5879)
@@ -14,5 +14,6 @@
 im = plt.imshow(Z, interpolation='bilinear', cmap=cm.gray,
 origin='lower', extent=[-3,3,-3,3])
 
+plt.savefig('test.ps', dpi=300)
 plt.show()
 
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_ps.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_ps.py	2008年07月25日 23:22:26 UTC (rev 5878)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_ps.py	2008年07月25日 23:45:01 UTC (rev 5879)
@@ -126,7 +126,12 @@
 fontd = maxdict(50)
 afmfontd = maxdict(50)
 
- def __init__(self, width, height, pswriter, dpi=72):
+ def __init__(self, width, height, pswriter, imagedpi=72):
+ """
+ Although postscript itself is dpi independent, we need to
+ imform the image code about a requested dpi to generate high
+ res images and them scale them before embeddin them
+ """
 RendererBase.__init__(self)
 self.width = width
 self.height = height
@@ -134,7 +139,7 @@
 if rcParams['text.usetex']:
 self.textcnt = 0
 self.psfrag = []
- self.dpi = dpi
+ self.imagedpi = imagedpi
 
 # current renderer state (None=uninitialised)
 self.color = None
@@ -145,7 +150,7 @@
 self.fontname = None
 self.fontsize = None
 self.hatch = None
- self.image_magnification = dpi/72.0
+ self.image_magnification = imagedpi/72.0
 self._clip_paths = {}
 self._path_collection_id = 0
 
@@ -857,15 +862,15 @@
 else: raise RuntimeError('Orientation must be "portrait" or "landscape"')
 
 self.figure.set_dpi(72) # Override the dpi kwarg
- dpi = kwargs.get("dpi", 72)
+ imagedpi = kwargs.get("dpi", 72)
 facecolor = kwargs.get("facecolor", "w")
 edgecolor = kwargs.get("edgecolor", "w")
 
 if rcParams['text.usetex']:
- self._print_figure_tex(outfile, format, dpi, facecolor, edgecolor,
+ self._print_figure_tex(outfile, format, imagedpi, facecolor, edgecolor,
 orientation, isLandscape, papertype)
 else:
- self._print_figure(outfile, format, dpi, facecolor, edgecolor,
+ self._print_figure(outfile, format, imagedpi, facecolor, edgecolor,
 orientation, isLandscape, papertype)
 
 def _print_figure(self, outfile, format, dpi=72, facecolor='w', edgecolor='w',
@@ -939,7 +944,7 @@
 self.figure.set_edgecolor(edgecolor)
 
 self._pswriter = StringIO()
- renderer = RendererPS(width, height, self._pswriter, dpi=dpi)
+ renderer = RendererPS(width, height, self._pswriter, imagedpi=dpi)
 self.figure.draw(renderer)
 
 self.figure.set_facecolor(origfacecolor)
@@ -1050,7 +1055,7 @@
 self.figure.set_edgecolor(edgecolor)
 
 self._pswriter = StringIO()
- renderer = RendererPS(width, height, self._pswriter, dpi=dpi)
+ renderer = RendererPS(width, height, self._pswriter, imagedpi=dpi)
 self.figure.draw(renderer)
 
 self.figure.set_facecolor(origfacecolor)
Modified: trunk/matplotlib/lib/matplotlib/collections.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/collections.py	2008年07月25日 23:22:26 UTC (rev 5878)
+++ trunk/matplotlib/lib/matplotlib/collections.py	2008年07月25日 23:45:01 UTC (rev 5879)
@@ -222,7 +222,7 @@
 """
 Set the offsets for the collection. *offsets* can be a scalar
 or a sequence.
- 
+
 ACCEPTS: float or sequence of floats
 """
 offsets = np.asarray(offsets, np.float_)
@@ -603,7 +603,7 @@
 if self._sizes is not None:
 self._transforms = [
 transforms.Affine2D().scale(
- (np.sqrt(x) * renderer.dpi / 72.0))
+ (np.sqrt(x) * self.figure.dpi / 72.0))
 for x in self._sizes]
 return Collection.draw(self, renderer)
 
@@ -680,7 +680,7 @@
 # in points^2
 self._transforms = [
 transforms.Affine2D().rotate(-self._rotation).scale(
- (np.sqrt(x) * renderer.dpi / 72.0) / np.sqrt(np.pi))
+ (np.sqrt(x) * self.figure.dpi / 72.0) / np.sqrt(np.pi))
 for x in self._sizes]
 return Collection.draw(self, renderer)
 
@@ -877,7 +877,7 @@
 # in points^2
 self._transforms = [
 transforms.Affine2D().scale(
- (np.sqrt(x) * renderer.dpi / 72.0) / np.sqrt(np.pi))
+ (np.sqrt(x) * self.figure.dpi / 72.0) / np.sqrt(np.pi))
 for x in self._sizes]
 return Collection.draw(self, renderer)
 
Modified: trunk/matplotlib/lib/matplotlib/text.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/text.py	2008年07月25日 23:22:26 UTC (rev 5878)
+++ trunk/matplotlib/lib/matplotlib/text.py	2008年07月25日 23:45:01 UTC (rev 5879)
@@ -400,7 +400,7 @@
 return (x, y, self._text, self._color,
 self._verticalalignment, self._horizontalalignment,
 hash(self._fontproperties), self._rotation,
- self._renderer.dpi, id(self._renderer)
+ self.figure.dpi, id(self._renderer)
 )
 
 def get_text(self):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <pki...@us...> - 2008年07月25日 23:22:28
Revision: 5878
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5878&view=rev
Author: pkienzle
Date: 2008年07月25日 23:22:26 +0000 (2008年7月25日)
Log Message:
-----------
Fix contains() for text and lines
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/axes.py
 trunk/matplotlib/lib/matplotlib/lines.py
 trunk/matplotlib/lib/matplotlib/text.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py	2008年07月25日 21:32:06 UTC (rev 5877)
+++ trunk/matplotlib/lib/matplotlib/axes.py	2008年07月25日 23:22:26 UTC (rev 5878)
@@ -2350,8 +2350,7 @@
 """
 if callable(self._contains): return self._contains(self,mouseevent)
 
- inside = self.patch.contains(mouseevent.x, mouseevent.y)
- return inside,{}
+ return self.patch.contains(mouseevent)
 
 def pick(self, *args):
 """
Modified: trunk/matplotlib/lib/matplotlib/lines.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/lines.py	2008年07月25日 21:32:06 UTC (rev 5877)
+++ trunk/matplotlib/lib/matplotlib/lines.py	2008年07月25日 23:22:26 UTC (rev 5878)
@@ -236,10 +236,11 @@
 if not is_numlike(self.pickradius):
 raise ValueError,"pick radius should be a distance"
 
- # transform in backend
+ if self._invalid:
+ self.recache()
 if len(self._xy)==0: return False,{}
-
- xyt = self._transformed_path.get_fully_transformed_path().vertices
+ tpath, _ = self._transformed_path.get_transformed_path_and_affine()
+ xyt = tpath.vertices
 xt = xyt[:, 0]
 yt = xyt[:, 1]
 
Modified: trunk/matplotlib/lib/matplotlib/text.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/text.py	2008年07月25日 21:32:06 UTC (rev 5877)
+++ trunk/matplotlib/lib/matplotlib/text.py	2008年07月25日 23:22:26 UTC (rev 5878)
@@ -135,6 +135,8 @@
 """
 if callable(self._contains): return self._contains(self,mouseevent)
 
+ if not self.get_visible() or self._renderer is None: 
+ return False,{}
 
 l,b,w,h = self.get_window_extent().bounds
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <pki...@us...> - 2008年07月25日 21:32:08
Revision: 5877
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5877&view=rev
Author: pkienzle
Date: 2008年07月25日 21:32:06 +0000 (2008年7月25日)
Log Message:
-----------
update axis contains method for new transforms
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/axis.py
Modified: trunk/matplotlib/lib/matplotlib/axis.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axis.py	2008年07月25日 19:52:11 UTC (rev 5876)
+++ trunk/matplotlib/lib/matplotlib/axis.py	2008年07月25日 21:32:06 UTC (rev 5877)
@@ -1144,13 +1144,17 @@
 """
 if callable(self._contains): return self._contains(self,mouseevent)
 
- xpixel,ypixel = mouseevent.x,mouseevent.y
+ x,y = mouseevent.x,mouseevent.y
 try:
- xaxes,yaxes = self.axes.transAxes.inverse_xy_tup((xpixel,ypixel))
- xorigin,yorigin = self.axes.transAxes.xy_tup((0,0))
+ trans = self.axes.transAxes.inverted()
+ xaxes,yaxes = trans.transform_point((x,y))
 except ValueError:
 return False, {}
- inaxis = xaxes>=0 and xaxes<=1 and ypixel<yorigin and ypixel>yorigin-self.pickradius
+ l,b = self.axes.transAxes.transform_point((0,0))
+ r,t = self.axes.transAxes.transform_point((1,1))
+ inaxis = xaxes>=0 and xaxes<=1 and (
+ (y<b and y>b-self.pickradius) or
+ (y>t and y<t+self.pickradius))
 return inaxis, {}
 
 def _get_tick(self, major):
@@ -1376,13 +1380,17 @@
 """
 if callable(self._contains): return self._contains(self,mouseevent)
 
- xpixel,ypixel = mouseevent.x,mouseevent.y
+ x,y = mouseevent.x,mouseevent.y
 try:
- xaxes,yaxes = self.axes.transAxes.inverse_xy_tup((xpixel,ypixel))
- xorigin,yorigin = self.axes.transAxes.xy_tup((0,0))
+ trans = self.axes.transAxes.inverted()
+ xaxes,yaxes = trans.transform_point((x,y))
 except ValueError:
 return False, {}
- inaxis = yaxes>=0 and yaxes<=1 and xpixel<xorigin and xpixel>xorigin-self.pickradius
+ l,b = self.axes.transAxes.transform_point((0,0))
+ r,t = self.axes.transAxes.transform_point((1,1))
+ inaxis = yaxes>=0 and yaxes<=1 and (
+ (x<l and x>l-self.pickradius) or
+ (x>r and x<r+self.pickradius))
 return inaxis, {}
 
 def _get_tick(self, major):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5876
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5876&view=rev
Author: pkienzle
Date: 2008年07月25日 19:52:11 +0000 (2008年7月25日)
Log Message:
-----------
wx backend: implement draw_idle
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/backends/backend_wx.py
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_wx.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_wx.py	2008年07月25日 17:38:06 UTC (rev 5875)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_wx.py	2008年07月25日 19:52:11 UTC (rev 5876)
@@ -719,12 +719,20 @@
 bind(self, wx.EVT_LEAVE_WINDOW, self._onLeave)
 bind(self, wx.EVT_IDLE, self._onIdle)
 
+ # Event loop handler for start/stop event loop
 self._event_loop = wx.EventLoop()
 
 self.macros = {} # dict from wx id to seq of macros
 
 self.Printer_Init()
 
+ # Create an timer for handling draw_idle requests
+ # If there are events pending when the timer is
+ # complete, reset the timer and continue. The
+ # alternative approach, binding to wx.EVT_IDLE,
+ # doesn't behave as nicely.
+ self.idletimer = wx.CallLater(1,self._onDrawIdle)
+
 def Destroy(self, *args, **kwargs):
 wx.Panel.Destroy(self, *args, **kwargs)
 
@@ -880,8 +888,18 @@
 
 
 def draw_idle(self, *args, **kwargs):
- pass
+ """
+ Delay rendering until the GUI is idle.
+ """
+ DEBUG_MSG("draw_idle()", 1, self)
+ self.idletimer.Restart(50, *args, **kwargs) # Delay by 50 ms
 
+ def _onDrawIdle(self, *args, **kwargs):
+ if False and wx.GetApp().Pending():
+ self.idletimer.Restart(5, *args, **kwargs)
+ else:
+ self.draw(*args, **kwargs)
+
 def draw(self, repaint=True):
 """
 Render the figure using RendererWx instance renderer, or using a
@@ -960,14 +978,16 @@
 redraw the image.
 """
 DEBUG_MSG("gui_repaint()", 1, self)
- if drawDC is None:
- drawDC=wx.ClientDC(self)
+ if self.IsShownOnScreen():
 
- drawDC.BeginDrawing()
- drawDC.DrawBitmap(self.bitmap, 0, 0)
- drawDC.EndDrawing()
- #wx.GetApp().Yield()
+ if drawDC is None:
+ drawDC=wx.ClientDC(self)
 
+ drawDC.BeginDrawing()
+ drawDC.DrawBitmap(self.bitmap, 0, 0)
+ drawDC.EndDrawing()
+ #wx.GetApp().Yield()
+
 filetypes = FigureCanvasBase.filetypes.copy()
 filetypes['bmp'] = 'Windows bitmap'
 filetypes['jpeg'] = 'JPEG'
@@ -1031,6 +1051,10 @@
 # Restore everything to normal
 self.bitmap = origBitmap
 
+ # Note: draw is required here since bits of state about the 
+ # last renderer are strewn about the artist draw methods. Do
+ # not remove the draw without first verifying that these have
+ # been cleaned up.
 self.draw()
 self.Refresh()
 
@@ -1089,7 +1113,7 @@
 self.figure.set_size_inches(winch, hinch)
 
 if self._isRealized:
- self.draw()
+ self.draw_idle()
 evt.Skip()
 
 def _get_key(self, evt):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2008年07月25日 17:38:08
Revision: 5875
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5875&view=rev
Author: jdh2358
Date: 2008年07月25日 17:38:06 +0000 (2008年7月25日)
Log Message:
-----------
cleaned up a few rest doc warnings
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/cbook.py
 trunk/matplotlib/lib/matplotlib/figure.py
Modified: trunk/matplotlib/lib/matplotlib/cbook.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/cbook.py	2008年07月25日 15:09:08 UTC (rev 5874)
+++ trunk/matplotlib/lib/matplotlib/cbook.py	2008年07月25日 17:38:06 UTC (rev 5875)
@@ -1167,10 +1167,6 @@
 This is very inefficient linear interpolation meant to be used
 only for a small number of points in relatively non-intensive use
 cases.
-
- Call signature::
-
- yi = less_simple_linear_interpolation(x,y,xi)
 """
 if is_scalar(xi): xi = [xi]
 
@@ -1348,21 +1344,15 @@
 
 If you just want to see if the array has 1 axis, use X.ndim==1
 
- Call signature::
- isvector(X)
 """
 return np.prod(X.shape)==np.max(X.shape)
 
 def vector_lengths( X, P=2., axis=None ):
 """
 Finds the length of a set of vectors in n dimensions. This is
- like the mlab.norm function for vectors, but has the ability to
+ like the numpy norm function for vectors, but has the ability to
 work over a particular axis of the supplied array or matrix.
 
- Call signature::
-
- vector_lengths( X, P=2., axis=None )
-
 Computes (sum((x_i)^P))^(1/P) for each {x_i} being the elements of X along
 the given axis. If *axis* is *None*, compute over all elements of X.
 """
@@ -1373,10 +1363,6 @@
 """
 Computes the distance between a set of successive points in N dimensions.
 
- Call signature::
-
- distances_along_curve(X)
-
 where X is an MxN array or matrix. The distances between successive rows
 is computed. Distance is the standard Euclidean distance.
 """
@@ -1387,10 +1373,7 @@
 """
 Computes the distance travelled along a polygonal curve in N dimensions.
 
- Call signature::
 
- path_length(X)
-
 where X is an MxN array or matrix. Returns an array of length M consisting
 of the distance along the curve at each point (i.e., the rows of X).
 """
@@ -1403,9 +1386,6 @@
 presumably coordinates on a polygonal curve, in which case this function
 tests if that curve is closed.
 
- Call signature::
-
- is_closed_polygon(X)
 """
 return np.all(X[0] == X[-1])
 
Modified: trunk/matplotlib/lib/matplotlib/figure.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/figure.py	2008年07月25日 15:09:08 UTC (rev 5874)
+++ trunk/matplotlib/lib/matplotlib/figure.py	2008年07月25日 17:38:06 UTC (rev 5875)
@@ -846,9 +846,9 @@
 
 def text(self, x, y, s, *args, **kwargs):
 """
- Call signature:
+ Call signature::
 
- figtext(x, y, s, fontdict=None, **kwargs)
+ figtext(x, y, s, fontdict=None, **kwargs)
 
 Add text to figure at location *x*, *y* (relative 0-1
 coords). See :func:`~matplotlib.pyplot.text` for the meaning
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5874
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5874&view=rev
Author: jdh2358
Date: 2008年07月25日 15:09:08 +0000 (2008年7月25日)
Log Message:
-----------
fixed start event loop docstring
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/backend_bases.py
Modified: trunk/matplotlib/lib/matplotlib/backend_bases.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backend_bases.py	2008年07月25日 13:17:10 UTC (rev 5873)
+++ trunk/matplotlib/lib/matplotlib/backend_bases.py	2008年07月25日 15:09:08 UTC (rev 5874)
@@ -1069,7 +1069,7 @@
 else:
 self._button = 'down'
 s = 'scroll_event'
- mouseevent = MouseEvent(s, self, x, y, self._button, self._key, 
+ mouseevent = MouseEvent(s, self, x, y, self._button, self._key,
 step=step, guiEvent=guiEvent)
 self.callbacks.process(s, mouseevent)
 
@@ -1437,7 +1437,7 @@
 
 Call signature::
 
- start_event_loop_default(self,timeout=0)
+ start_event_loop_default(self,timeout=0)
 
 This call blocks until a callback function triggers
 stop_event_loop() or *timeout* is reached. If *timeout* is
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2008年07月25日 13:17:14
Revision: 5873
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5873&view=rev
Author: jdh2358
Date: 2008年07月25日 13:17:10 +0000 (2008年7月25日)
Log Message:
-----------
committed tonys minor changes
Modified Paths:
--------------
 trunk/matplotlib/examples/event_handling/lasso_demo.py
 trunk/matplotlib/lib/matplotlib/axis.py
Modified: trunk/matplotlib/examples/event_handling/lasso_demo.py
===================================================================
--- trunk/matplotlib/examples/event_handling/lasso_demo.py	2008年07月25日 11:58:15 UTC (rev 5872)
+++ trunk/matplotlib/examples/event_handling/lasso_demo.py	2008年07月25日 13:17:10 UTC (rev 5873)
@@ -69,7 +69,7 @@
 # acquire a lock on the widget drawing
 self.canvas.widgetlock(self.lasso)
 
-if 0:
+if __name__ == '__main__':
 
 data = [Datum(*xy) for xy in rand(100, 2)]
 
Modified: trunk/matplotlib/lib/matplotlib/axis.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axis.py	2008年07月25日 11:58:15 UTC (rev 5872)
+++ trunk/matplotlib/lib/matplotlib/axis.py	2008年07月25日 13:17:10 UTC (rev 5873)
@@ -147,7 +147,7 @@
 """
 self._pad = val
 
- def get_pad(self, val):
+ def get_pad(self):
 'Get the value of the tick label pad in points'
 return self._pad
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2008年07月25日 11:58:17
Revision: 5872
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5872&view=rev
Author: jswhit
Date: 2008年07月25日 11:58:15 +0000 (2008年7月25日)
Log Message:
-----------
update barb_demo comments.
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/barb_demo.py
Modified: trunk/toolkits/basemap/examples/barb_demo.py
===================================================================
--- trunk/toolkits/basemap/examples/barb_demo.py	2008年07月25日 11:57:39 UTC (rev 5871)
+++ trunk/toolkits/basemap/examples/barb_demo.py	2008年07月25日 11:58:15 UTC (rev 5872)
@@ -70,8 +70,7 @@
 cs1 = m.contour(x,y,p,levs,colors='k',linewidths=0.5)
 cs2 = m.contourf(x,y,p,levs)
 # plot barbs.
-nh,sh=m.barbs(xv,yv,udat,vdat,length=6,barbcolor='k',flagcolor='r',linewidth=0.5)
-print dir(nh)
+m.barbs(xv,yv,udat,vdat,length=6,barbcolor='k',flagcolor='r',linewidth=0.5)
 # plot colorbar for pressure
 cax = plt.axes([0.875, 0.1, 0.05, 0.8]) # setup colorbar axes.
 plt.colorbar(cax=cax) # draw colorbar
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2008年07月25日 11:57:45
Revision: 5871
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5871&view=rev
Author: jswhit
Date: 2008年07月25日 11:57:39 +0000 (2008年7月25日)
Log Message:
-----------
update barb_demo comments.
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/barb_demo.py
Modified: trunk/toolkits/basemap/examples/barb_demo.py
===================================================================
--- trunk/toolkits/basemap/examples/barb_demo.py	2008年07月25日 11:54:44 UTC (rev 5870)
+++ trunk/toolkits/basemap/examples/barb_demo.py	2008年07月25日 11:57:39 UTC (rev 5871)
@@ -53,6 +53,8 @@
 plt.title('Surface Wind Barbs and Pressure (NH)')
 
 # stereogrpaphic projection (SH).
+# 'flip_barb' flag is automatically set for SH data, so that
+# barbs point toward lower pressure (in both Hemisphere).
 m = Basemap(width=10000000,height=10000000,lon_0=-90,lat_0=-45.,lat_ts=-45,
 resolution='l',projection='stere')
 x,y = m(lons,lats)
@@ -68,7 +70,8 @@
 cs1 = m.contour(x,y,p,levs,colors='k',linewidths=0.5)
 cs2 = m.contourf(x,y,p,levs)
 # plot barbs.
-m.barbs(xv,yv,udat,vdat,length=6,barbcolor='k',flagcolor='r',linewidth=0.5)
+nh,sh=m.barbs(xv,yv,udat,vdat,length=6,barbcolor='k',flagcolor='r',linewidth=0.5)
+print dir(nh)
 # plot colorbar for pressure
 cax = plt.axes([0.875, 0.1, 0.05, 0.8]) # setup colorbar axes.
 plt.colorbar(cax=cax) # draw colorbar
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5870
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5870&view=rev
Author: jswhit
Date: 2008年07月25日 11:54:44 +0000 (2008年7月25日)
Log Message:
-----------
update barbs method docstring.
Modified Paths:
--------------
 trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2008年07月25日 11:41:18 UTC (rev 5869)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2008年07月25日 11:54:44 UTC (rev 5870)
@@ -2898,6 +2898,9 @@
 Extra keyword ``ax`` can be used to override the default axis instance.
 
 Other \*args and \**kwargs passed on to matplotlib.pyplot.barbs
+
+ Returns two matplotlib.axes.Barbs instances, one for the Northern 
+ Hemisphere and one for the Southern Hemisphere. 
 """
 if not kwargs.has_key('ax') and self.ax is None:
 try:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2008年07月25日 11:41:20
Revision: 5869
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5869&view=rev
Author: jswhit
Date: 2008年07月25日 11:41:18 +0000 (2008年7月25日)
Log Message:
-----------
add SH plot (to test auto barb flipping).
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/barb_demo.py
Modified: trunk/toolkits/basemap/examples/barb_demo.py
===================================================================
--- trunk/toolkits/basemap/examples/barb_demo.py	2008年07月25日 10:22:29 UTC (rev 5868)
+++ trunk/toolkits/basemap/examples/barb_demo.py	2008年07月25日 11:41:18 UTC (rev 5869)
@@ -32,8 +32,8 @@
 nxv = 25; nyv = 25
 udat, vdat, xv, yv = m.transform_vector(u,v,lons1,lats1,nxv,nyv,returnxy=True)
 # create a figure, add an axes.
-fig=plt.figure(figsize=(8,8))
-ax = fig.add_axes([0.1,0.1,0.7,0.7])
+fig=plt.figure(figsize=(8,6))
+ax = fig.add_axes([0.1,0.1,0.8,0.8])
 # plot color-filled contours over map
 levs = np.arange(960,1051,4)
 cs1 = m.contour(x,y,p,levs,colors='k',linewidths=0.5)
@@ -41,7 +41,7 @@
 # plot barbs.
 m.barbs(xv,yv,udat,vdat,length=6,barbcolor='k',flagcolor='r',linewidth=0.5)
 # plot colorbar for pressure
-cax = plt.axes([0.875, 0.1, 0.05, 0.7]) # setup colorbar axes.
+cax = plt.axes([0.875, 0.1, 0.05, 0.8]) # setup colorbar axes.
 plt.colorbar(cax=cax) # draw colorbar
 plt.axes(ax) # make the original axes current again
 # draw coastlines
@@ -50,6 +50,34 @@
 m.drawparallels(np.arange(0,81,20),labels=[1,1,0,0])
 # draw meridians
 m.drawmeridians(np.arange(-180,0,20),labels=[0,0,0,1])
-plt.title('Surface Wind Barbs and Pressure')
+plt.title('Surface Wind Barbs and Pressure (NH)')
+
+# stereogrpaphic projection (SH).
+m = Basemap(width=10000000,height=10000000,lon_0=-90,lat_0=-45.,lat_ts=-45,
+ resolution='l',projection='stere')
+x,y = m(lons,lats)
+# transform from spherical to map projection coordinates (rotation
+# and interpolation).
+nxv = 25; nyv = 25
+udat, vdat, xv, yv = m.transform_vector(u,v,lons1,lats1,nxv,nyv,returnxy=True)
+# create a figure, add an axes.
+fig=plt.figure(figsize=(8,6))
+ax = fig.add_axes([0.1,0.1,0.8,0.8])
+# plot color-filled contours over map
+levs = np.arange(960,1051,4)
+cs1 = m.contour(x,y,p,levs,colors='k',linewidths=0.5)
+cs2 = m.contourf(x,y,p,levs)
+# plot barbs.
+m.barbs(xv,yv,udat,vdat,length=6,barbcolor='k',flagcolor='r',linewidth=0.5)
+# plot colorbar for pressure
+cax = plt.axes([0.875, 0.1, 0.05, 0.8]) # setup colorbar axes.
+plt.colorbar(cax=cax) # draw colorbar
+plt.axes(ax) # make the original axes current again
+# draw coastlines
+m.drawcoastlines()
+# draw parallels
+m.drawparallels(np.arange(-80,-19,20),labels=[1,1,0,0])
+# draw meridians
+m.drawmeridians(np.arange(-180,0,20),labels=[0,0,1,0])
+plt.title('Surface Wind Barbs and Pressure (SH)',y=1.04)
 plt.show()
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <dmk...@us...> - 2008年07月25日 10:22:33
Revision: 5868
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5868&view=rev
Author: dmkaplan
Date: 2008年07月25日 10:22:29 +0000 (2008年7月25日)
Log Message:
-----------
Committing a small change to make twinx share axes like twiny.
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py	2008年07月25日 06:30:52 UTC (rev 5867)
+++ trunk/matplotlib/lib/matplotlib/axes.py	2008年07月25日 10:22:29 UTC (rev 5868)
@@ -6006,7 +6006,7 @@
 right
 """
 
- ax2 = self.figure.add_axes(self.get_position(True), # sharex=self,
+ ax2 = self.figure.add_axes(self.get_position(True), sharex=self,
 frameon=False)
 ax2.yaxis.tick_right()
 ax2.yaxis.set_label_position('right')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5867
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5867&view=rev
Author: pkienzle
Date: 2008年07月25日 06:30:52 +0000 (2008年7月25日)
Log Message:
-----------
tk mouse wheel: y values start from the top of the screen
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py	2008年07月25日 05:01:18 UTC (rev 5866)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py	2008年07月25日 06:30:52 UTC (rev 5867)
@@ -291,6 +291,7 @@
 if w == self._tkcanvas:
 x = event.x_root - w.winfo_rootx()
 y = event.y_root - w.winfo_rooty()
+ y = self.figure.bbox.height - y
 step = event.delta/120.
 FigureCanvasBase.scroll_event(self, x, y, step, guiEvent=event)
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

Showing results of 240

<< < 1 2 3 4 5 .. 10 > >> (Page 3 of 10)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /