SF.net SVN: matplotlib: [5714] trunk/toolkits/basemap/doc/users

2008-07-07 Thread jswhit
Revision: 5714
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5714&view=rev
Author:   jswhit
Date: 2008-07-07 05:12:52 -0700 (Mon, 07 Jul 2008)

Log Message:
---
added mollweide example

Modified Paths:
--
trunk/toolkits/basemap/doc/users/mapsetup.rst

Added Paths:
---
trunk/toolkits/basemap/doc/users/figures/moll.png
trunk/toolkits/basemap/doc/users/figures/moll.py
trunk/toolkits/basemap/doc/users/moll.rst

Added: trunk/toolkits/basemap/doc/users/figures/moll.png
===
(Binary files differ)


Property changes on: trunk/toolkits/basemap/doc/users/figures/moll.png
___
Name: svn:mime-type
   + application/octet-stream

Added: trunk/toolkits/basemap/doc/users/figures/moll.py
===
--- trunk/toolkits/basemap/doc/users/figures/moll.py
(rev 0)
+++ trunk/toolkits/basemap/doc/users/figures/moll.py2008-07-07 12:12:52 UTC 
(rev 5714)
@@ -0,0 +1,14 @@
+from mpl_toolkits.basemap import Basemap
+import numpy as np
+import matplotlib.pyplot as plt
+# lon_0 is central longitude of projection.
+# resolution = 'c' means use crude resolution coastlines.
+m = Basemap(projection='moll',lon_0=0,resolution='c')
+m.drawcoastlines()
+m.fillcontinents(color='coral',lake_color='aqua')
+# draw parallels and meridians.
+m.drawparallels(np.arange(-90.,120.,30.))
+m.drawmeridians(np.arange(0.,420.,60.))
+m.drawmapboundary(fill_color='aqua') 
+plt.title("Mollweide Projection")
+plt.savefig('moll.png')

Modified: trunk/toolkits/basemap/doc/users/mapsetup.rst
===
--- trunk/toolkits/basemap/doc/users/mapsetup.rst   2008-07-07 00:17:57 UTC 
(rev 5713)
+++ trunk/toolkits/basemap/doc/users/mapsetup.rst   2008-07-07 12:12:52 UTC 
(rev 5714)
@@ -31,3 +31,4 @@
 azeqd.rst
 gnomon.rst
 ortho.rst
+moll.rst

Added: trunk/toolkits/basemap/doc/users/moll.rst
===
--- trunk/toolkits/basemap/doc/users/moll.rst   (rev 0)
+++ trunk/toolkits/basemap/doc/users/moll.rst   2008-07-07 12:12:52 UTC (rev 
5714)
@@ -0,0 +1,10 @@
+.. _moll:
+
+Mollweide Projection
+
+
+The mollweide projection is a global, elliptical, equal-area projection.  
+
+.. literalinclude:: figures/moll.py
+
+.. image:: figures/moll.png


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [5715] trunk/matplotlib

2008-07-07 Thread sameerd
Revision: 5715
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5715&view=rev
Author:   sameerd
Date: 2008-07-07 10:37:33 -0700 (Mon, 07 Jul 2008)

Log Message:
---
bug fixes - edgecases

Modified Paths:
--
trunk/matplotlib/examples/misc/rec_join_demo.py
trunk/matplotlib/lib/matplotlib/mlab.py

Modified: trunk/matplotlib/examples/misc/rec_join_demo.py
===
--- trunk/matplotlib/examples/misc/rec_join_demo.py 2008-07-07 12:12:52 UTC 
(rev 5714)
+++ trunk/matplotlib/examples/misc/rec_join_demo.py 2008-07-07 17:37:33 UTC 
(rev 5715)
@@ -2,7 +2,7 @@
 import matplotlib.mlab as mlab
 
 
-r = mlab.csv2rec('data/aapl.csv')
+r = mlab.csv2rec('../data/aapl.csv')
 r.sort()
 r1 = r[-10:]
 

Modified: trunk/matplotlib/lib/matplotlib/mlab.py
===
--- trunk/matplotlib/lib/matplotlib/mlab.py 2008-07-07 12:12:52 UTC (rev 
5714)
+++ trunk/matplotlib/lib/matplotlib/mlab.py 2008-07-07 17:37:33 UTC (rev 
5715)
@@ -2081,10 +2081,12 @@
 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
+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
+containing the intersection of the fields of r1 and r2. 
 
+r1 (also r2) must not have any duplicate keys. 
+
 The jointype keyword can be 'inner', 'outer', 'leftouter'.
 To do a rightouter join just reverse r1 and r2.
 
@@ -2123,9 +2125,6 @@
 right_ind = np.array([r2d[k] for k in right_keys])
 right_len = len(right_ind)
 
-r2 = rec_drop_fields(r2, r1.dtype.names)
-
-
 def key_desc(name):
 'if name is a string key, use the larger size of r1 or r2 before 
merging'
 dt1 = r1.dtype[name]
@@ -2158,21 +2157,17 @@
 
 for field in r1.dtype.names:
 newrec[field][:common_len] = r1[field][r1ind]
-if jointype == "outer" or jointype == "leftouter":
+if (jointype == "outer" or jointype == "leftouter") and left_len:
 newrec[field][common_len:(common_len+left_len)] = 
r1[field][left_ind]
 
 for field in r2.dtype.names:
-newrec[field][:common_len] = r2[field][r2ind]
-if jointype == "outer":
-newrec[field][-right_len:] = 
r2[field][right_ind[right_ind.argsort()]]
+if field not in key:
+newrec[field][:common_len] = r2[field][r2ind]
+if jointype == "outer" and right_len:
+newrec[field][-right_len:] = r2[field][right_ind]
 
-# sort newrec using the same order as r1
-sort_indices = r1ind.copy()
-if jointype == "outer" or jointype == "leftouter":
-sort_indices = np.append(sort_indices, left_ind)
-newrec[:(common_len+left_len)] = newrec[sort_indices.argsort()]
+newrec.sort(order=key)
 
-
 return newrec.view(np.recarray)
 
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [5716] trunk/matplotlib

2008-07-07 Thread mdboom
Revision: 5716
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5716&view=rev
Author:   mdboom
Date: 2008-07-07 10:48:36 -0700 (Mon, 07 Jul 2008)

Log Message:
---
Fix custom scales in pcolormesh (thanks, Matthew Turk)

Modified Paths:
--
trunk/matplotlib/examples/pylab_examples/quadmesh_demo.py
trunk/matplotlib/lib/matplotlib/collections.py

Modified: trunk/matplotlib/examples/pylab_examples/quadmesh_demo.py
===
--- trunk/matplotlib/examples/pylab_examples/quadmesh_demo.py   2008-07-07 
17:37:33 UTC (rev 5715)
+++ trunk/matplotlib/examples/pylab_examples/quadmesh_demo.py   2008-07-07 
17:48:36 UTC (rev 5716)
@@ -29,6 +29,8 @@
 ax = fig.add_subplot(121)
 ax.set_axis_bgcolor("#bdb76b")
 ax.pcolormesh(Qx,Qz,Z)
+ax.set_xscale('log')
+ax.set_yscale('log')
 ax.set_title('Without masked values')
 
 ax = fig.add_subplot(122)

Modified: trunk/matplotlib/lib/matplotlib/collections.py
===
--- trunk/matplotlib/lib/matplotlib/collections.py  2008-07-07 17:37:33 UTC 
(rev 5715)
+++ trunk/matplotlib/lib/matplotlib/collections.py  2008-07-07 17:48:36 UTC 
(rev 5716)
@@ -512,14 +512,24 @@
 if clippath_trans is not None:
 clippath_trans = clippath_trans.frozen()
 
-assert transform.is_affine
+if not transform.is_affine:
+coordinates = self._coordinates.reshape(
+(self._coordinates.shape[0] *
+ self._coordinates.shape[1],
+ 2))
+coordinates = transform.transform(coordinates)
+coordinates = coordinates.reshape(self._coordinates.shape)
+transform = transforms.IdentityTransform()
+else:
+coordinates = self._coordinates
+
 if not transOffset.is_affine:
 offsets = transOffset.transform_non_affine(offsets)
 transOffset = transOffset.get_affine()
 
 renderer.draw_quad_mesh(
 transform.frozen(), self.clipbox, clippath, clippath_trans,
-self._meshWidth, self._meshHeight, self._coordinates,
+self._meshWidth, self._meshHeight, coordinates,
 offsets, transOffset, self._facecolors, self._antialiased,
 self._showedges)
 renderer.close_group(self.__class__.__name__)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [5717] trunk/matplotlib/doc/sphinxext/ plot_directive.py

2008-07-07 Thread mdboom
Revision: 5717
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5717&view=rev
Author:   mdboom
Date: 2008-07-07 11:34:07 -0700 (Mon, 07 Jul 2008)

Log Message:
---
Clear rcParams state between documentation plots.

Modified Paths:
--
trunk/matplotlib/doc/sphinxext/plot_directive.py

Modified: trunk/matplotlib/doc/sphinxext/plot_directive.py
===
--- trunk/matplotlib/doc/sphinxext/plot_directive.py2008-07-07 17:48:36 UTC 
(rev 5716)
+++ trunk/matplotlib/doc/sphinxext/plot_directive.py2008-07-07 18:34:07 UTC 
(rev 5717)
@@ -86,6 +86,7 @@
 
 print 'building %s'%fullpath
 plt.close('all')# we need to clear between runs
+matplotlib.rcdefaults()
 
 mplshell.magic_run(fullpath)
 for format, dpi in formats:


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [5718] trunk/matplotlib/CHANGELOG

2008-07-07 Thread mdboom
Revision: 5718
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5718&view=rev
Author:   mdboom
Date: 2008-07-07 11:34:48 -0700 (Mon, 07 Jul 2008)

Log Message:
---
Committing CHANGELOG

Modified Paths:
--
trunk/matplotlib/CHANGELOG

Modified: trunk/matplotlib/CHANGELOG
===
--- trunk/matplotlib/CHANGELOG  2008-07-07 18:34:07 UTC (rev 5717)
+++ trunk/matplotlib/CHANGELOG  2008-07-07 18:34:48 UTC (rev 5718)
@@ -1,11 +1,13 @@
-2007-07-03 Implemented findobj method for artist and pyplot - see
+2008-07-07 Fix custom scales in pcolormesh (thanks Matthew Turk) - MGD
+
+2008-07-03 Implemented findobj method for artist and pyplot - see
examples/pylab_examples/findobj_demo.py - JDH
 
 2008-06-30 Another attempt to fix TextWithDash - DSD
 
-2008-06-30 Removed Qt4 NavigationToolbar2.destroy -- it appears to 
-   have been unnecessary and caused a bug reported by P. 
-   Raybaut - DSD 
+2008-06-30 Removed Qt4 NavigationToolbar2.destroy -- it appears to
+   have been unnecessary and caused a bug reported by P.
+   Raybaut - DSD
 
 2008-06-27 Fixed tick positioning bug - MM
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins