SF.net SVN: matplotlib: [5005] trunk/matplotlib/lib/matplotlib/mpl-data/ images/filesave.svg
Revision: 5005 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5005&view=rev Author: dsdale Date: 2008-03-19 06:13:05 -0700 (Wed, 19 Mar 2008) Log Message: --- minor tweaks to filesave.svg Modified Paths: -- trunk/matplotlib/lib/matplotlib/mpl-data/images/filesave.svg Modified: trunk/matplotlib/lib/matplotlib/mpl-data/images/filesave.svg === --- trunk/matplotlib/lib/matplotlib/mpl-data/images/filesave.svg 2008-03-18 18:46:07 UTC (rev 5004) +++ trunk/matplotlib/lib/matplotlib/mpl-data/images/filesave.svg 2008-03-19 13:13:05 UTC (rev 5005) @@ -1,428 +1,450 @@ - -http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"; -[ - http://www.w3.org/1999/xlink";> -]> - + + http://www.w3.org/2000/svg"; + xmlns="http://www.w3.org/2000/svg"; + xmlns:xlink="http://www.w3.org/1999/xlink"; + version="1.0" width="128pt" height="128pt" - id="svg1" - sodipodi:version="0.27" - sodipodi:docname="/mnt/windows/Themes/Work/Blue-Sphere/filesave.svg" - sodipodi:docbase="/mnt/windows/Themes/Work/Blue-Sphere/" - xmlns="http://www.w3.org/2000/svg"; - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"; - xmlns:xlink="http://www.w3.org/1999/xlink";> + id="svg1"> + id="stop409" + style="stop-color:#fbddb2;stop-opacity:0.99215698" + offset="0" /> + id="stop410" + style="stop-color:#efa81a;stop-opacity:0.952941" + offset="1" /> + id="stop459" + style="stop-color:#cd;stop-opacity:0.69019598" + offset="0" /> + id="stop460" + style="stop-color:#0c5c7d;stop-opacity:0.78039199" + offset="1" /> + id="stop321" + style="stop-color:#5f9eb2;stop-opacity:0.88235301" + offset="0" /> + id="stop322" + style="stop-color:#0c5c7d;stop-opacity:0.870588" + offset="1" /> + id="stop315" + style="stop-color:#0c5c7d;stop-opacity:1" + offset="0" /> + id="stop316" + style="stop-color:#0c5c7d;stop-opacity:1" + offset="1" /> + id="stop311" + style="stop-color:#0c5c7d;stop-opacity:0.78039199" + offset="0" /> + id="stop312" + style="stop-color:#cd;stop-opacity:0.69019598" + offset="1" /> + id="stop308" + style="stop-color:#cd;stop-opacity:1" + offset="0" /> + id="stop309" + style="stop-color:#0c5c7d;stop-opacity:1" + offset="1" /> + id="stop292" + style="stop-color:#0c5c7d;stop-opacity:0.615686" + offset="0" /> + id="stop293" + style="stop-color:#004468;stop-opacity:0.917647" + offset="1" /> + id="stop236" + style="stop-color:#ea;stop-opacity:1" + offset="0" /> + id="stop237" + style="stop-color:#97e2ff;stop-opacity:0.99215698" + offset="1" /> + id="stop233" + style="stop-color:#fcfcfc;stop-opacity:1" + offset="0" /> + id="stop234" + style="stop-color:#afb2b5;stop-opacity:1" + offset="1" /> + id="stop217" + style="stop-color:#f5f5f5;stop-opacity:1" + offset="0" /> + id="stop218" + style="stop-color:#949494;stop-opacity:1" + offset="1" /> + id="stop212" + style="stop-color:#d7;stop-opacity:0.45882401" + offset="0" /> + id="stop213" + style="stop-color:#2ea6b9;stop-opacity:0.82352901" + offset="1" /> + id="stop169" + style="stop-color:#cd;stop-opacity:0.87450999" + offset="0" /> + id="stop170" + style="stop-color:#0c5c7d;stop-opacity:0.8697" + offset="1" /> + id="stop91" + style="stop-color:#cd;stop-opacity:1" + offset="0" /> + id="stop92" + style="stop-color:#006b97;stop-opacity:0.905882" + offset="1" /> + id="stop70" + style="stop-color:#d7;stop-opacity:0.89803898" + offset="0" /> + id="stop69" + style="stop-color:#2ea6b9;stop-opacity:0.952941" + offset="1" /> + id="stop59" + style="stop-color:#ff;stop-opacity:1" + offset="0" /> + id="stop58" + style="stop-color:#797979;stop-opacity:1" + offset="1" /> + xlink:href="#linearGradient67" + gradientUnits="userSpaceOnUse" /> +
SF.net SVN: matplotlib: [5006] trunk/matplotlib/lib/matplotlib/backends/ backend_qt4.py
Revision: 5006
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5006&view=rev
Author: dsdale
Date: 2008-03-19 07:36:57 -0700 (Wed, 19 Mar 2008)
Log Message:
---
fix cursor mapping in backend_qt4
Modified Paths:
--
trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py
===
--- trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py 2008-03-19
13:13:05 UTC (rev 5005)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py 2008-03-19
14:36:57 UTC (rev 5006)
@@ -21,8 +21,8 @@
DEBUG = False
cursord = {
-cursors.MOVE : QtCore.Qt.PointingHandCursor,
-cursors.HAND : QtCore.Qt.WaitCursor,
+cursors.MOVE : QtCore.Qt.SizeAllCursor,
+cursors.HAND : QtCore.Qt.PointingHandCursor,
cursors.POINTER : QtCore.Qt.ArrowCursor,
cursors.SELECT_REGION : QtCore.Qt.CrossCursor,
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib: [5007] trunk/matplotlib
Revision: 5007
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5007&view=rev
Author: sameerd
Date: 2008-03-19 11:07:49 -0700 (Wed, 19 Mar 2008)
Log Message:
---
Added outerjoin, lefjoin and rightjoin support to rec_join
Modified Paths:
--
trunk/matplotlib/lib/matplotlib/mlab.py
Added Paths:
---
trunk/matplotlib/examples/rec_join_demo.py
Added: trunk/matplotlib/examples/rec_join_demo.py
===
--- trunk/matplotlib/examples/rec_join_demo.py (rev 0)
+++ trunk/matplotlib/examples/rec_join_demo.py 2008-03-19 18:07:49 UTC (rev
5007)
@@ -0,0 +1,27 @@
+import numpy as np
+import matplotlib.mlab as mlab
+
+
+r = mlab.csv2rec('data/aapl.csv')
+r.sort()
+r1 = r[-10:]
+
+# Create a new array
+r2 = np.empty(12, dtype=[('date', '|O4'), ('high', np.float),
+('marker', np.float)])
+r2 = r2.view(np.recarray)
+r2.date = r.date[-17:-5]
+r2.high = r.high[-17:-5]
+r2.marker = np.arange(12)
+
+print "r1:"
+print mlab.rec2txt(r1)
+print "r2:"
+print mlab.rec2txt(r2)
+
+defaults = {'marker':-1, 'close':np.NaN, 'low':-.}
+
+for s in ('inner', 'outer', 'leftouter'):
+rec = mlab.rec_join(['date', 'high'], r1, r2,
+jointype=s, defaults=defaults)
+print "\n%sjoin :\n%s" % (s, mlab.rec2txt(rec))
Modified: trunk/matplotlib/lib/matplotlib/mlab.py
===
--- trunk/matplotlib/lib/matplotlib/mlab.py 2008-03-19 14:36:57 UTC (rev
5006)
+++ trunk/matplotlib/lib/matplotlib/mlab.py 2008-03-19 18:07:49 UTC (rev
5007)
@@ -2044,12 +2044,19 @@
return npy.rec.fromarrays(arrays, names=names)
-def rec_join(key, r1, r2):
+
+def rec_join(key, r1, r2, jointype='inner', defaults=None):
"""
join record arrays r1 and r2 on key; key is a tuple of field
names. if r1 and r2 have equal values on all the keys in the key
tuple, then their fields will be merged into a new record array
containing the intersection of the fields of r1 and r2
+
+The jointype keyword can be 'inner', 'outer', 'leftouter'.
+To do a rightouter join just reverse r1 and r2.
+
+The defaults keyword is a dictionary filled with
+{column_name:default_value} pairs.
"""
for name in key:
@@ -2067,17 +2074,22 @@
r1keys = set(r1d.keys())
r2keys = set(r2d.keys())
-keys = r1keys & r2keys
+common_keys = r1keys & r2keys
-r1ind = npy.array([r1d[k] for k in keys])
-r2ind = npy.array([r2d[k] for k in keys])
+r1ind = npy.array([r1d[k] for k in common_keys])
+r2ind = npy.array([r2d[k] for k in common_keys])
-# Make sure that the output rows have the same relative order as r1
-sortind = r1ind.argsort()
+common_len = len(common_keys)
+left_len = right_len = 0
+if jointype == "outer" or jointype == "leftouter":
+left_keys = r1keys.difference(r2keys)
+left_ind = npy.array([r1d[k] for k in left_keys])
+left_len = len(left_ind)
+if jointype == "outer":
+right_keys = r2keys.difference(r1keys)
+right_ind = npy.array([r2d[k] for k in right_keys])
+right_len = len(right_ind)
-r1 = r1[r1ind[sortind]]
-r2 = r2[r2ind[sortind]]
-
r2 = rec_drop_fields(r2, r1.dtype.names)
@@ -2103,13 +2115,31 @@
[desc for desc in r2.dtype.descr if desc[0] not in
key ] )
-newrec = npy.empty(len(r1), dtype=newdtype)
+newrec = npy.empty(common_len + left_len + right_len, dtype=newdtype)
+
+if jointype != 'inner' and defaults is not None: # fill in the defaults
enmasse
+newrec_fields = newrec.dtype.fields.keys()
+for k, v in defaults.items():
+if k in newrec_fields:
+newrec[k] = v
+
for field in r1.dtype.names:
-newrec[field] = r1[field]
+newrec[field][:common_len] = r1[field][r1ind]
+if jointype == "outer" or jointype == "leftouter":
+newrec[field][common_len:(common_len+left_len)] =
r1[field][left_ind]
for field in r2.dtype.names:
-newrec[field] = r2[field]
+newrec[field][:common_len] = r2[field][r2ind]
+if jointype == "outer":
+newrec[field][-right_len:] =
r2[field][right_ind[right_ind.argsort()]]
+# sort newrec using the same order as r1
+sort_indices = r1ind.copy()
+if jointype == "outer" or jointype == "leftouter":
+sort_indices = npy.append(sort_indices, left_ind)
+newrec[:(common_len+left_len)] = newrec[sort_indices.argsort()]
+
+
return newrec.view(npy.recarray)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.a
SF.net SVN: matplotlib: [5008] trunk/matplotlib
Revision: 5008 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5008&view=rev Author: efiring Date: 2008-03-19 20:30:58 -0700 (Wed, 19 Mar 2008) Log Message: --- Updated the importation of numpy.ma; numerix.npyma is obsolete. Modified Paths: -- trunk/matplotlib/CHANGELOG trunk/matplotlib/CODING_GUIDE trunk/matplotlib/examples/color_by_yvalue.py trunk/matplotlib/examples/contourf_demo.py trunk/matplotlib/examples/dynamic_collection.py trunk/matplotlib/examples/image_masked.py trunk/matplotlib/examples/masked_demo.py trunk/matplotlib/examples/quadmesh_demo.py trunk/matplotlib/examples/scatter_masked.py trunk/matplotlib/examples/step_demo.py trunk/matplotlib/lib/matplotlib/axes.py trunk/matplotlib/lib/matplotlib/cm.py trunk/matplotlib/lib/matplotlib/colors.py trunk/matplotlib/lib/matplotlib/contour.py trunk/matplotlib/lib/matplotlib/image.py trunk/matplotlib/lib/matplotlib/lines.py trunk/matplotlib/lib/matplotlib/path.py trunk/matplotlib/lib/matplotlib/pylab.py trunk/matplotlib/lib/matplotlib/quiver.py trunk/matplotlib/lib/matplotlib/scale.py trunk/matplotlib/lib/matplotlib/transforms.py Modified: trunk/matplotlib/CHANGELOG === --- trunk/matplotlib/CHANGELOG 2008-03-19 18:07:49 UTC (rev 5007) +++ trunk/matplotlib/CHANGELOG 2008-03-20 03:30:58 UTC (rev 5008) @@ -1,7 +1,14 @@ -2008-03-14 Removed an apparently unnecessary call to - FigureCanvasAgg.draw in backend_qt*agg. Thanks to Ted - Drain - DSD +2008-03-19 Changed ma import statements to "from numpy import ma"; + this should work with past and future versions of + numpy, whereas "import numpy.ma as ma" will work only + with numpy >= 1.05, and "import numerix.npyma as ma" + is obsolete now that maskedarray is replacing the + earlier implementation, as of numpy 1.05. +2008-03-14 Removed an apparently unnecessary call to + FigureCanvasAgg.draw in backend_qt*agg. Thanks to Ted + Drain - DSD + 2008-03-10 Workaround a bug in backend_qt4agg's blitting due to a buffer width/bbox width mismatch in _backend_agg's copy_from_bbox - DSD Modified: trunk/matplotlib/CODING_GUIDE === --- trunk/matplotlib/CODING_GUIDE 2008-03-19 18:07:49 UTC (rev 5007) +++ trunk/matplotlib/CODING_GUIDE 2008-03-20 03:30:58 UTC (rev 5008) @@ -12,7 +12,7 @@ # checking out the main src svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/matplotlib matplotlib --username=youruser --password=yourpass -# branch checkouts, eg the transforms branch +# branch checkouts, eg the transforms branch svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/transforms transbranch == Committing changes == @@ -47,15 +47,18 @@ import numpy as npy a = npy.array([1,2,3]) - + For masked arrays, use: -import matplotlib.numerix.npyma as ma +from numpy import ma -(This is needed to support the maskedarray module as an -alternative to the original numpy ma module; eventually, -the maskedarray implementation is likely to replace the -ma implementation.) +(The earlier recommendation, 'import matplotlib.numerix.npyma as ma', +was needed temporarily during the development of the maskedarray +implementation as a separate package. As of numpy 1.05, it +replaces the old implementation. +Note: "from numpy import ma" works with numpy < 1.05 *and* with +numpy >= 1.05. "import numpy.ma as ma" works *only* with +numpy >= 1.05, so for now we must not use it.) For matplotlib main module, use: @@ -64,8 +67,8 @@ For matplotlib modules (or any other modules), use: -import matplotlib.cbook as cbook - +import matplotlib.cbook as cbook + if cbook.iterable(z): pass @@ -125,7 +128,7 @@ (add-hook 'python-mode-hook (lambda () - (add-hook 'local-write-file-hooks 'delete-trailing-whitespace))) + (add-hook 'local-write-file-hooks 'delete-trailing-whitespace))) Modified: trunk/matplotlib/examples/color_by_yvalue.py === --- trunk/matplotlib/examples/color_by_yvalue.py2008-03-19 18:07:49 UTC (rev 5007) +++ trunk/matplotlib/examples/color_by_yvalue.py2008-03-20 03:30:58 UTC (rev 5008) @@ -1,6 +1,6 @@ # use masked arrays to plot a line with different colors by y-value -import matplotlib.numerix.npyma as ma from numpy import logical_or, arange, sin, pi +from numpy import ma from matplotlib.pyplot import plot, show t = arange(0.0, 2.0, 0.01) Modified: trunk/matplotlib/examples/contourf_demo.py === --- trunk/matplotl
