SF.net SVN: matplotlib: [4400] trunk/toolkits/basemap-testing/lib/ matplotlib/toolkits/basemap/basemap.py

2007-11-21 Thread jswhit
Revision: 4400
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4400&view=rev
Author:   jswhit
Date: 2007-11-21 05:23:54 -0800 (Wed, 21 Nov 2007)

Log Message:
---
add disclaimer in drawlsmask docstring

Modified Paths:
--
trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py

Modified: 
trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py
===
--- trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py   
2007-11-20 22:00:51 UTC (rev 4399)
+++ trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py   
2007-11-21 13:23:54 UTC (rev 4400)
@@ -167,7 +167,7 @@
 
  The following parameters are map projection parameters which all default to
  None.  Not all parameters are used by all projections, some are ignored.
- The module variable 'projection_params' is a dictionary which 
+ The module variable 'projection_params' is a dictionary which
  lists which parameters apply to which projections.
 
  lat_ts - latitude of true scale for mercator projection, optional
@@ -2388,6 +2388,9 @@
 """
 draw land-sea mask image.
 
+*Note*  the land-sea mask image cannot be overlaid on top
+of other images, due to limitations in matplotlib image handling.
+
 land is colored with rgba integer tuple rgba_land.
 ocean is colored with rgba integer tuple rgba_ocean.
 


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 2005.
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: [4401] branches/transforms

2007-11-21 Thread mdboom
Revision: 4401
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4401&view=rev
Author:   mdboom
Date: 2007-11-21 05:49:03 -0800 (Wed, 21 Nov 2007)

Log Message:
---
Merged revisions 4395-4400 via svnmerge from 
http://matplotlib.svn.sf.net/svnroot/matplotlib/trunk/matplotlib


  r4396 | mdboom | 2007-11-20 13:25:33 -0500 (Tue, 20 Nov 2007) | 2 lines
  
  Slight speed improvement in draw_quad_mesh.


Modified Paths:
--
branches/transforms/src/_backend_agg.cpp

Property Changed:

branches/transforms/


Property changes on: branches/transforms
___
Name: svnmerge-integrated
   - /trunk/matplotlib:1-4394
   + /trunk/matplotlib:1-4400

Modified: branches/transforms/src/_backend_agg.cpp
===
--- branches/transforms/src/_backend_agg.cpp2007-11-21 13:23:54 UTC (rev 
4400)
+++ branches/transforms/src/_backend_agg.cpp2007-11-21 13:49:03 UTC (rev 
4401)
@@ -469,7 +469,6 @@
   typedef agg::renderer_base 
amask_ren_type;
   typedef agg::renderer_scanline_aa_solid
amask_aa_renderer_type;
   typedef agg::renderer_scanline_bin_solid   
amask_bin_renderer_type;
-
   args.verify_length(5, 6);
 
   Py::Object   gc_obj  = args[0];


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 2005.
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: [4402] trunk/matplotlib/lib/matplotlib/pyparsing.py

2007-11-21 Thread mdboom
Revision: 4402
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4402&view=rev
Author:   mdboom
Date: 2007-11-21 07:24:22 -0800 (Wed, 21 Nov 2007)

Log Message:
---
Fix to work on Python 2.3

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/pyparsing.py

Modified: trunk/matplotlib/lib/matplotlib/pyparsing.py
===
--- trunk/matplotlib/lib/matplotlib/pyparsing.py2007-11-21 13:49:03 UTC 
(rev 4401)
+++ trunk/matplotlib/lib/matplotlib/pyparsing.py2007-11-21 15:24:22 UTC 
(rev 4402)
@@ -2846,7 +2846,11 @@
 warnings.warn("Invalid argument to oneOf, expected string or list",
 SyntaxWarning, stacklevel=2)
 
-symbols.sort(reverse=True)
+try:
+symbols.sort(reverse=True)
+except TypeError:
+symbols.sort()
+symbols.reverse()
 i = 0
 while i < len(symbols)-1:
 cur = symbols[i]


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 2005.
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: [4403] trunk/toolkits/basemap-testing/Changelog

2007-11-21 Thread jswhit
Revision: 4403
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4403&view=rev
Author:   jswhit
Date: 2007-11-21 07:27:14 -0800 (Wed, 21 Nov 2007)

Log Message:
---
fixed bug in drawlsmask

Modified Paths:
--
trunk/toolkits/basemap-testing/Changelog

Modified: trunk/toolkits/basemap-testing/Changelog
===
--- trunk/toolkits/basemap-testing/Changelog2007-11-21 15:24:22 UTC (rev 
4402)
+++ trunk/toolkits/basemap-testing/Changelog2007-11-21 15:27:14 UTC (rev 
4403)
@@ -1,4 +1,6 @@
 version 0.9.7 (not yet released)
+   * fixed bug in drawlsmask for 'moll','robin' and 'sinu'
+ projections.
* added lake_color keyword to fillcontinents.
* fixed a bug in the 'tmerc' projection.
* added pure python NetCDFFile reader from Roberto De Almeida 


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 2005.
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: [4404] trunk/matplotlib/lib/matplotlib/axis.py

2007-11-21 Thread mdboom
Revision: 4404
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4404&view=rev
Author:   mdboom
Date: 2007-11-21 08:05:18 -0800 (Wed, 21 Nov 2007)

Log Message:
---
Fix memory leak when using colorbar as discovered by Darren Dale.  The
(unit change) callbacks in the Axis objects were not cleared by cla(),
so they would continue to grow long lists of callbacks that reference
entire Axes objects.

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/axis.py

Modified: trunk/matplotlib/lib/matplotlib/axis.py
===
--- trunk/matplotlib/lib/matplotlib/axis.py 2007-11-21 15:27:14 UTC (rev 
4403)
+++ trunk/matplotlib/lib/matplotlib/axis.py 2007-11-21 16:05:18 UTC (rev 
4404)
@@ -533,6 +533,9 @@
 self.set_minor_locator(NullLocator())
 self.set_minor_formatter(NullFormatter())
 
+# Clear the callback registry for this axis, or it may "leak"
+self.callbacks = CallbackRegistry(('units', 'units finalize'))
+
 # whether the grids are on
 self._gridOnMajor = rcParams['axes.grid']
 self._gridOnMinor = False


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 2005.
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: [4407] trunk/matplotlib/lib/matplotlib/mathtext.py

2007-11-21 Thread mdboom
Revision: 4407
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4407&view=rev
Author:   mdboom
Date: 2007-11-21 08:35:38 -0800 (Wed, 21 Nov 2007)

Log Message:
---
Mathtext speed improvement.

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/mathtext.py

Modified: trunk/matplotlib/lib/matplotlib/mathtext.py
===
--- trunk/matplotlib/lib/matplotlib/mathtext.py 2007-11-21 16:25:31 UTC (rev 
4406)
+++ trunk/matplotlib/lib/matplotlib/mathtext.py 2007-11-21 16:35:38 UTC (rev 
4407)
@@ -505,6 +505,7 @@
 (through ft2font)
 """
 basepath = os.path.join( get_data_path(), 'fonts' )
+_fonts = {}
 
 class CachedFont:
 def __init__(self, font):
@@ -519,21 +520,17 @@
 def __init__(self, default_font_prop, mathtext_backend):
 Fonts.__init__(self, default_font_prop, mathtext_backend)
 self.glyphd   = {}
-self.fonts= {}
 
-filename = findfont(default_font_prop)
-default_font = self.CachedFont(FT2Font(str(filename)))
+if self._fonts == {}:
+filename = findfont(default_font_prop)
+default_font = self.CachedFont(FT2Font(str(filename)))
 
-self.fonts['default'] = default_font
+self._fonts['default'] = default_font
 
 def destroy(self):
 self.glyphd = None
-for cached_font in self.fonts.values():
-cached_font.charmap = None
-cached_font.glyphmap = None
-cached_font.font = None
 Fonts.destroy(self)
-
+
 def _get_font(self, font):
 """Looks up a CachedFont with its charmap and inverse charmap.
 font may be a TeX font name (cal, rm, it etc.), or postscript name."""
@@ -542,16 +539,16 @@
 else:
 basename = font
 
-cached_font = self.fonts.get(basename)
+cached_font = self._fonts.get(basename)
 if cached_font is None:
 try:
 font = FT2Font(basename)
 except RuntimeError:
 return None
 cached_font = self.CachedFont(font)
-self.fonts[basename] = cached_font
-self.fonts[font.postscript_name] = cached_font
-self.fonts[font.postscript_name.lower()] = cached_font
+self._fonts[basename] = cached_font
+self._fonts[font.postscript_name] = cached_font
+self._fonts[font.postscript_name.lower()] = cached_font
 return cached_font
 
 def _get_offset(self, cached_font, glyph, fontsize, dpi):


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 2005.
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: [4405] trunk/matplotlib/lib/matplotlib/mathtext.py

2007-11-21 Thread mdboom
Revision: 4405
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4405&view=rev
Author:   mdboom
Date: 2007-11-21 08:18:52 -0800 (Wed, 21 Nov 2007)

Log Message:
---
Fix mathtext bug.

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/mathtext.py

Modified: trunk/matplotlib/lib/matplotlib/mathtext.py
===
--- trunk/matplotlib/lib/matplotlib/mathtext.py 2007-11-21 16:05:18 UTC (rev 
4404)
+++ trunk/matplotlib/lib/matplotlib/mathtext.py 2007-11-21 16:18:52 UTC (rev 
4405)
@@ -2079,9 +2079,9 @@
| placeable
  )
 
-ambiDelim= oneOf(self._ambiDelim)
-leftDelim= oneOf(self._leftDelim)
-rightDelim   = oneOf(self._rightDelim)
+ambiDelim= oneOf(list(self._ambiDelim))
+leftDelim= oneOf(list(self._leftDelim))
+rightDelim   = oneOf(list(self._rightDelim))
 autoDelim   <<(Suppress(Literal(r"\left"))
  + ((leftDelim | ambiDelim) | Error("Expected a 
delimiter"))
  + Group(


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 2005.
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: [4406] branches/transforms

2007-11-21 Thread mdboom
Revision: 4406
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4406&view=rev
Author:   mdboom
Date: 2007-11-21 08:25:31 -0800 (Wed, 21 Nov 2007)

Log Message:
---
Merged revisions 4401-4405 via svnmerge from 
http://matplotlib.svn.sf.net/svnroot/matplotlib/trunk/matplotlib


  r4402 | mdboom | 2007-11-21 10:24:22 -0500 (Wed, 21 Nov 2007) | 2 lines
  
  Fix to work on Python 2.3

  r4404 | mdboom | 2007-11-21 11:05:18 -0500 (Wed, 21 Nov 2007) | 5 lines
  
  Fix memory leak when using colorbar as discovered by Darren Dale.  The
  (unit change) callbacks in the Axis objects were not cleared by cla(),
  so they would continue to grow long lists of callbacks that reference
  entire Axes objects.

  r4405 | mdboom | 2007-11-21 11:18:52 -0500 (Wed, 21 Nov 2007) | 2 lines
  
  Fix mathtext bug.


Modified Paths:
--
branches/transforms/lib/matplotlib/axis.py
branches/transforms/lib/matplotlib/mathtext.py
branches/transforms/lib/matplotlib/pyparsing.py

Property Changed:

branches/transforms/


Property changes on: branches/transforms
___
Name: svnmerge-integrated
   - /trunk/matplotlib:1-4400
   + /trunk/matplotlib:1-4405

Modified: branches/transforms/lib/matplotlib/axis.py
===
--- branches/transforms/lib/matplotlib/axis.py  2007-11-21 16:18:52 UTC (rev 
4405)
+++ branches/transforms/lib/matplotlib/axis.py  2007-11-21 16:25:31 UTC (rev 
4406)
@@ -526,6 +526,9 @@
 self.set_minor_locator(NullLocator())
 self.set_minor_formatter(NullFormatter())
 
+# Clear the callback registry for this axis, or it may "leak"
+self.callbacks = CallbackRegistry(('units', 'units finalize'))
+
 # whether the grids are on
 self._gridOnMajor = rcParams['axes.grid']
 self._gridOnMinor = False

Modified: branches/transforms/lib/matplotlib/mathtext.py
===
--- branches/transforms/lib/matplotlib/mathtext.py  2007-11-21 16:18:52 UTC 
(rev 4405)
+++ branches/transforms/lib/matplotlib/mathtext.py  2007-11-21 16:25:31 UTC 
(rev 4406)
@@ -2077,9 +2077,9 @@
| placeable
  )
 
-ambiDelim= oneOf(self._ambiDelim)
-leftDelim= oneOf(self._leftDelim)
-rightDelim   = oneOf(self._rightDelim)
+ambiDelim= oneOf(list(self._ambiDelim))
+leftDelim= oneOf(list(self._leftDelim))
+rightDelim   = oneOf(list(self._rightDelim))
 autoDelim   <<(Suppress(Literal(r"\left"))
  + ((leftDelim | ambiDelim) | Error("Expected a 
delimiter"))
  + Group(

Modified: branches/transforms/lib/matplotlib/pyparsing.py
===
--- branches/transforms/lib/matplotlib/pyparsing.py 2007-11-21 16:18:52 UTC 
(rev 4405)
+++ branches/transforms/lib/matplotlib/pyparsing.py 2007-11-21 16:25:31 UTC 
(rev 4406)
@@ -2846,7 +2846,11 @@
 warnings.warn("Invalid argument to oneOf, expected string or list",
 SyntaxWarning, stacklevel=2)
 
-symbols.sort(reverse=True)
+try:
+symbols.sort(reverse=True)
+except TypeError:
+symbols.sort()
+symbols.reverse()
 i = 0
 while i < len(symbols)-1:
 cur = symbols[i]


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 2005.
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: [4408] trunk/toolkits/basemap-testing/geos-2.2.3/ source/headers/geos

2007-11-21 Thread jswhit
Revision: 4408
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4408&view=rev
Author:   jswhit
Date: 2007-11-21 10:59:15 -0800 (Wed, 21 Nov 2007)

Log Message:
---
fix for compiling with recent versions of mingw32

Modified Paths:
--
trunk/toolkits/basemap-testing/geos-2.2.3/source/headers/geos/timeval.h

Added Paths:
---
trunk/toolkits/basemap-testing/geos-2.2.3/source/headers/geos/timeval.h.orig

Modified: 
trunk/toolkits/basemap-testing/geos-2.2.3/source/headers/geos/timeval.h
===
--- trunk/toolkits/basemap-testing/geos-2.2.3/source/headers/geos/timeval.h 
2007-11-21 16:35:38 UTC (rev 4407)
+++ trunk/toolkits/basemap-testing/geos-2.2.3/source/headers/geos/timeval.h 
2007-11-21 18:59:15 UTC (rev 4408)
@@ -22,44 +22,6 @@
 #define EPOCHFILETIME (1164447360LL)
 #endif
 
-struct timezone {
-int tz_minuteswest; /* minutes W of Greenwich */
-int tz_dsttime; /* type of dst correction */
-};
-
-__inline int gettimeofday(struct timeval *tv, struct timezone *tz)
-{
-FILETIMEft;
-LARGE_INTEGER   li;
-__int64 t;
-static int  tzflag;
-
-if (tv)
-{
-GetSystemTimeAsFileTime(&ft);
-li.LowPart  = ft.dwLowDateTime;
-li.HighPart = ft.dwHighDateTime;
-t  = li.QuadPart;   /* In 100-nanosecond intervals */
-t -= EPOCHFILETIME; /* Offset to the Epoch time */
-t /= 10;/* In microseconds */
-tv->tv_sec  = (long)(t / 100);
-tv->tv_usec = (long)(t % 100);
-}
-
-if (tz)
-{
-if (!tzflag)
-{
-_tzset();
-tzflag++;
-}
-tz->tz_minuteswest = _timezone / 60;
-tz->tz_dsttime = _daylight;
-}
-
-return 0;
-}
-
 #else  /* _WIN32 */
 
 #include 

Added: 
trunk/toolkits/basemap-testing/geos-2.2.3/source/headers/geos/timeval.h.orig
===
--- 
trunk/toolkits/basemap-testing/geos-2.2.3/source/headers/geos/timeval.h.orig
(rev 0)
+++ 
trunk/toolkits/basemap-testing/geos-2.2.3/source/headers/geos/timeval.h.orig
2007-11-21 18:59:15 UTC (rev 4408)
@@ -0,0 +1,69 @@
+/*
+ * timeval.h1.3 2003/01/14
+ *
+ * Defines gettimeofday, timeval, etc. for Win32
+ *
+ * By Wu Yongwei
+ *
+ */
+
+#ifndef _TIMEVAL_H
+#define _TIMEVAL_H
+
+#ifdef _WIN32
+
+#define WIN32_LEAN_AND_MEAN
+#include 
+#include 
+
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+#define EPOCHFILETIME (1164447360i64)
+#else
+#define EPOCHFILETIME (1164447360LL)
+#endif
+
+struct timezone {
+int tz_minuteswest; /* minutes W of Greenwich */
+int tz_dsttime; /* type of dst correction */
+};
+
+__inline int gettimeofday(struct timeval *tv, struct timezone *tz)
+{
+FILETIMEft;
+LARGE_INTEGER   li;
+__int64 t;
+static int  tzflag;
+
+if (tv)
+{
+GetSystemTimeAsFileTime(&ft);
+li.LowPart  = ft.dwLowDateTime;
+li.HighPart = ft.dwHighDateTime;
+t  = li.QuadPart;   /* In 100-nanosecond intervals */
+t -= EPOCHFILETIME; /* Offset to the Epoch time */
+t /= 10;/* In microseconds */
+tv->tv_sec  = (long)(t / 100);
+tv->tv_usec = (long)(t % 100);
+}
+
+if (tz)
+{
+if (!tzflag)
+{
+_tzset();
+tzflag++;
+}
+tz->tz_minuteswest = _timezone / 60;
+tz->tz_dsttime = _daylight;
+}
+
+return 0;
+}
+
+#else  /* _WIN32 */
+
+#include 
+
+#endif /* _WIN32 */
+
+#endif /* _TIMEVAL_H */


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 2005.
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: [4410] trunk/toolkits/basemap-testing/setup.py

2007-11-21 Thread jswhit
Revision: 4410
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4410&view=rev
Author:   jswhit
Date: 2007-11-21 12:50:55 -0800 (Wed, 21 Nov 2007)

Log Message:
---
remove runtime_library_dirs (not needed, causes problems with mingw32)

Modified Paths:
--
trunk/toolkits/basemap-testing/setup.py

Modified: trunk/toolkits/basemap-testing/setup.py
===
--- trunk/toolkits/basemap-testing/setup.py 2007-11-21 20:50:10 UTC (rev 
4409)
+++ trunk/toolkits/basemap-testing/setup.py 2007-11-21 20:50:55 UTC (rev 
4410)
@@ -80,7 +80,7 @@
 
extensions.append(Extension("matplotlib.toolkits.basemap._geod",deps+['src/_geod.c'],include_dirs
 = ['src'],))
 # for some reason, pickling won't work if this extension is installed
 # as "matplotlib.toolkits.basemap._geos"
-extensions.append(Extension("_geos",['src/_geos.c'],library_dirs=geos_library_dirs,include_dirs=geos_include_dirs,runtime_library_dirs=geos_library_dirs,libraries=['geos_c','geos']))
+extensions.append(Extension("_geos",['src/_geos.c'],library_dirs=geos_library_dirs,include_dirs=geos_include_dirs,libraries=['geos_c','geos']))
 
 # install shapelib and dbflib.
 packages = packages + ['shapelib','dbflib']


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 2005.
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: [4411] trunk/py4science/examples

2007-11-21 Thread jswhit
Revision: 4411
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4411&view=rev
Author:   jswhit
Date: 2007-11-21 12:52:25 -0800 (Wed, 21 Nov 2007)

Log Message:
---
added examples for 'Plotting on Maps' workbook chapter

Added Paths:
---
trunk/py4science/examples/basemap1.py
trunk/py4science/examples/basemap2.py
trunk/py4science/examples/basemap3.py
trunk/py4science/examples/basemap4.py
trunk/py4science/examples/basemap5.py

Added: trunk/py4science/examples/basemap1.py
===
--- trunk/py4science/examples/basemap1.py   (rev 0)
+++ trunk/py4science/examples/basemap1.py   2007-11-21 20:52:25 UTC (rev 
4411)
@@ -0,0 +1,28 @@
+import pylab, numpy
+from matplotlib.toolkits.basemap import Basemap
+
+# create figure.
+# background color will be used for 'wet' areas.
+fig = pylab.figure()
+fig.add_axes([0.1,0.1,0.8,0.8],axisbg='aqua')
+# create map by specifying lat/lon values at corners.
+resolution = 'l'
+lon_0 = -50
+lat_0 = 60
+projection = 'lcc'
+llcrnrlat, llcrnrlon = 8, -92
+urcrnrlat, urcrnrlon  = 39, 63
+m = Basemap(lon_0=lon_0,lat_0=lat_0,\
+llcrnrlat=llcrnrlat,llcrnrlon=llcrnrlon,\
+urcrnrlat=urcrnrlat,urcrnrlon=urcrnrlon,\
+resolution=resolution,projection=projection)
+# draw coastlines. Make liness a little thinner than default.
+m.drawcoastlines(linewidth=0.5)
+# fill continents.
+m.fillcontinents(color='coral')
+# draw states and countries.
+m.drawcountries()
+m.drawstates()
+pylab.title('map region specified using corner lat/lon values')
+pylab.savefig('basemap1.eps')
+pylab.savefig('basemap1.png')

Added: trunk/py4science/examples/basemap2.py
===
--- trunk/py4science/examples/basemap2.py   (rev 0)
+++ trunk/py4science/examples/basemap2.py   2007-11-21 20:52:25 UTC (rev 
4411)
@@ -0,0 +1,27 @@
+import pylab, numpy
+from matplotlib.toolkits.basemap import Basemap
+
+# create figure.
+# background color will be used for 'wet' areas.
+fig = pylab.figure()
+fig.add_axes([0.1,0.1,0.8,0.8],axisbg='aqua')
+# create map by specifying width and height in km.
+resolution = 'l'
+lon_0 = -50
+lat_0 = 60
+projection = 'lcc'
+width = 1200
+height = 0.75*width
+m = Basemap(lon_0=lon_0,lat_0=lat_0,\
+width=width,height=height,\
+resolution=resolution,projection=projection)
+# draw coastlines.
+m.drawcoastlines(linewidth=0.5)
+# fill continents.
+m.fillcontinents(color='coral')
+# draw states and countries.
+m.drawcountries()
+m.drawstates()
+pylab.title('map region specified using width and height')
+pylab.savefig('basemap2.eps')
+pylab.savefig('basemap2.png')

Added: trunk/py4science/examples/basemap3.py
===
--- trunk/py4science/examples/basemap3.py   (rev 0)
+++ trunk/py4science/examples/basemap3.py   2007-11-21 20:52:25 UTC (rev 
4411)
@@ -0,0 +1,45 @@
+import pylab, numpy
+from matplotlib.toolkits.basemap import Basemap
+
+# create figure.
+# background color will be used for 'wet' areas.
+fig = pylab.figure()
+fig.add_axes([0.1,0.1,0.8,0.8],axisbg='aqua')
+# create map by specifying width and height in km.
+resolution = 'l'
+lon_0 = -50
+lat_0 = 60
+projection = 'lcc'
+width = 1200
+height = 0.75*width
+m = Basemap(lon_0=lon_0,lat_0=lat_0,\
+width=width,height=height,\
+resolution=resolution,projection=projection)
+# nylat, nylon are lat/lon of New York
+nylat = 40.78
+nylon = -73.98
+# lonlat, lonlon are lat/lon of London.
+lonlat = 51.53
+lonlon = 0.08
+# convert these points to map projection coordinates
+# (using __call__ method of Basemap instance)
+ny_x, ny_y = m(nylon, nylat)
+lon_x, lon_y = m(lonlon, lonlat)
+# plot black dots at the two points.
+# make sure dots are drawn on top of other plot elements (zorder=10)
+m.scatter([ny_x,lon_x],[ny_y,lon_y],25,color='k',marker='o',zorder=10)
+# connect the dots along a great circle.
+m.drawgreatcircle(nylon,nylat,lonlon,lonlat,linewidth=2,color='k')
+# put the names of the cities to the left of each dot, offset
+# by a little. Use a bold font.
+pylab.text(ny_x-10,ny_y+10,'New York',fontsize=12,\
+   color='k',horizontalalignment='right',fontweight='bold')
+pylab.text(lon_x-10,lon_y+10,'London',fontsize=12,\
+   color='k',horizontalalignment='right',fontweight='bold')
+m.drawcoastlines(linewidth=0.5)
+m.fillcontinents(color='coral')
+m.drawcountries()
+m.drawstates()
+pylab.title('NY to London Great Circle')
+pylab.savefig('basemap3.eps')
+pylab.savefig('basemap3.png')

Added: trunk/py4science/examples/basemap4.py
===
--- trunk/py4science/examples/basemap4.py   (rev 0)
+++ trunk/py4science/examples/basemap4.py 

SF.net SVN: matplotlib: [4412] trunk/py4science/examples/data/sst.nc

2007-11-21 Thread jswhit
Revision: 4412
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4412&view=rev
Author:   jswhit
Date: 2007-11-21 12:53:42 -0800 (Wed, 21 Nov 2007)

Log Message:
---
added data for basemap5.py example

Added Paths:
---
trunk/py4science/examples/data/sst.nc

Added: trunk/py4science/examples/data/sst.nc
===
(Binary files differ)


Property changes on: trunk/py4science/examples/data/sst.nc
___
Name: svn:mime-type
   + application/octet-stream


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 2005.
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: [4413] trunk/toolkits/basemap-testing/lib/ matplotlib/toolkits/basemap/basemap.py

2007-11-21 Thread jswhit
Revision: 4413
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4413&view=rev
Author:   jswhit
Date: 2007-11-21 13:25:27 -0800 (Wed, 21 Nov 2007)

Log Message:
---
fix error message

Modified Paths:
--
trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py

Modified: 
trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py
===
--- trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py   
2007-11-21 20:53:42 UTC (rev 4412)
+++ trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py   
2007-11-21 21:25:27 UTC (rev 4413)
@@ -334,7 +334,7 @@
 lat_1 = lat_0
 projparams['lat_1'] = lat_1
 if lat_1 is None or lon_0 is None:
-raise ValueError('must specify lat_1 or lat_0 and lon_0 for 
%(projection)s basemap (lat_2 is optional)' % _projnames)
+raise ValueError('must specify lat_1 or lat_0 and lon_0 for %s 
basemap (lat_2 is optional)' % _projnames[projection])
 if lat_2 is None:
 projparams['lat_2'] = lat_1
 if not using_corners:
@@ -360,7 +360,7 @@
 'splaea', 'nplaea',
 'spaeqd', 'npaeqd']:
 if boundinglat is None or lon_0 is None:
-raise ValueError('must specify boundinglat and lon_0 for 
%(projection) basemap' % _projnames)
+raise ValueError('must specify boundinglat and lon_0 for %s 
basemap' % _projnames[projection])
 if projection[0] == 's':
 sgn = -1
 else:
@@ -377,7 +377,7 @@
 lon,self.llcrnrlat = proj(math.sqrt(2.)*y,0.,inverse=True)
 self.urcrnrlat = self.llcrnrlat
 if width is not None or height is not None:
-print 'warning: width and height keywords ignored for %s 
projection' % self.projection
+print 'warning: width and height keywords ignored for %s 
projection' % _projnames[projection]
 elif projection == 'laea':
 if lat_0 is None or lon_0 is None:
 raise ValueError, 'must specify lat_0 and lon_0 for Lambert 
Azimuthal basemap'


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 2005.
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: [4414] trunk/py4science/examples

2007-11-21 Thread jswhit
Revision: 4414
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4414&view=rev
Author:   jswhit
Date: 2007-11-21 13:33:25 -0800 (Wed, 21 Nov 2007)

Log Message:
---
bug fixes

Modified Paths:
--
trunk/py4science/examples/basemap1.py
trunk/py4science/examples/basemap2.py

Modified: trunk/py4science/examples/basemap1.py
===
--- trunk/py4science/examples/basemap1.py   2007-11-21 21:25:27 UTC (rev 
4413)
+++ trunk/py4science/examples/basemap1.py   2007-11-21 21:33:25 UTC (rev 
4414)
@@ -7,12 +7,12 @@
 fig.add_axes([0.1,0.1,0.8,0.8],axisbg='aqua')
 # create map by specifying lat/lon values at corners.
 resolution = 'l'
+projection = 'lcc'
+lat_0 = 60
 lon_0 = -50
-lat_0 = 60
-projection = 'lcc'
 llcrnrlat, llcrnrlon = 8, -92
 urcrnrlat, urcrnrlon  = 39, 63
-m = Basemap(lon_0=lon_0,lat_0=lat_0,\
+m = Basemap(lat_0=lat_0,lon_0=lon_0,\
 llcrnrlat=llcrnrlat,llcrnrlon=llcrnrlon,\
 urcrnrlat=urcrnrlat,urcrnrlon=urcrnrlon,\
 resolution=resolution,projection=projection)

Modified: trunk/py4science/examples/basemap2.py
===
--- trunk/py4science/examples/basemap2.py   2007-11-21 21:25:27 UTC (rev 
4413)
+++ trunk/py4science/examples/basemap2.py   2007-11-21 21:33:25 UTC (rev 
4414)
@@ -7,9 +7,9 @@
 fig.add_axes([0.1,0.1,0.8,0.8],axisbg='aqua')
 # create map by specifying width and height in km.
 resolution = 'l'
+projection = 'lcc'
 lon_0 = -50
 lat_0 = 60
-projection = 'lcc'
 width = 1200
 height = 0.75*width
 m = Basemap(lon_0=lon_0,lat_0=lat_0,\


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 2005.
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: [4415] trunk/py4science/examples/skel

2007-11-21 Thread jswhit
Revision: 4415
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4415&view=rev
Author:   jswhit
Date: 2007-11-21 13:35:59 -0800 (Wed, 21 Nov 2007)

Log Message:
---
add skeleton scripts

Added Paths:
---
trunk/py4science/examples/skel/basemap1_skel.py
trunk/py4science/examples/skel/basemap2_skel.py

Added: trunk/py4science/examples/skel/basemap1_skel.py
===
--- trunk/py4science/examples/skel/basemap1_skel.py 
(rev 0)
+++ trunk/py4science/examples/skel/basemap1_skel.py 2007-11-21 21:35:59 UTC 
(rev 4415)
@@ -0,0 +1,27 @@
+import pylab, numpy
+from matplotlib.toolkits.basemap import Basemap
+
+# create figure.
+# background color will be used for 'wet' areas.
+fig = pylab.figure()
+fig.add_axes([0.1,0.1,0.8,0.8],axisbg='aqua')
+# create map by specifying lat/lon values at corners.
+projection = 'lcc' # map projection 
+resolution = XX # resolution of boundaries ('c','l','i',or 'h')
+lon_0=XX # longitude of origin of map projection domain.
+lat_0=XX # standard parallel/latitude of origin of map projection domain.
+llcrnrlat, llcrnrlon = XX, XX # lat/lon of lower left corner of map
+urcrnrlat, urcrnrlon  = XX, XX # lat/lon of upper right corner of map
+m = Basemap(lon_0=lon_0,lat_0=lat_0,\
+llcrnrlat=llcrnrlat,llcrnrlon=llcrnrlon,\
+urcrnrlat=urcrnrlat,urcrnrlon=urcrnrlon,\
+resolution=resolution,projection=projection)
+# draw coastlines. Make liness a little thinner than default.
+m.drawcoastlines(linewidth=0.5)
+# fill continents.
+m.fillcontinents(color='coral')
+# draw states and countries.
+m.drawcountries()
+m.drawstates()
+pylab.title('map region specified using corner lat/lon values')
+pylab.show()

Added: trunk/py4science/examples/skel/basemap2_skel.py
===
--- trunk/py4science/examples/skel/basemap2_skel.py 
(rev 0)
+++ trunk/py4science/examples/skel/basemap2_skel.py 2007-11-21 21:35:59 UTC 
(rev 4415)
@@ -0,0 +1,27 @@
+import pylab, numpy
+from matplotlib.toolkits.basemap import Basemap
+
+# create figure.
+# background color will be used for 'wet' areas.
+fig = pylab.figure()
+fig.add_axes([0.1,0.1,0.8,0.8],axisbg='aqua')
+# create map by specifying width and height in km.
+projection = 'lcc' # map projection 
+resolution = XX # resolution of boundaries ('c','l','i',or 'h')
+lon_0=XX # longitude of origin of map projection domain.
+lat_0=XX # standard parallel/latitude of origin of map projection domain.
+width = XX # width of map projecton domain in km.
+height = XX # height of map projection domain in km.
+m = Basemap(lon_0=lon_0,lat_0=lat_0,\
+width=width,height=height,\
+resolution=resolution,projection=projection)
+# draw coastlines.
+m.drawcoastlines(linewidth=0.5)
+# fill continents.
+m.fillcontinents(color='coral')
+# draw states and countries.
+m.drawcountries()
+m.drawstates()
+pylab.title('map region specified using width and height')
+pylab.savefig('basemap2.eps')
+pylab.savefig('basemap2.png')


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 2005.
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: [4416] trunk/py4science/examples/skel

2007-11-21 Thread jswhit
Revision: 4416
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4416&view=rev
Author:   jswhit
Date: 2007-11-21 13:37:02 -0800 (Wed, 21 Nov 2007)

Log Message:
---
better comments

Modified Paths:
--
trunk/py4science/examples/skel/basemap1_skel.py
trunk/py4science/examples/skel/basemap2_skel.py

Modified: trunk/py4science/examples/skel/basemap1_skel.py
===
--- trunk/py4science/examples/skel/basemap1_skel.py 2007-11-21 21:35:59 UTC 
(rev 4415)
+++ trunk/py4science/examples/skel/basemap1_skel.py 2007-11-21 21:37:02 UTC 
(rev 4416)
@@ -8,9 +8,9 @@
 # create map by specifying lat/lon values at corners.
 projection = 'lcc' # map projection 
 resolution = XX # resolution of boundaries ('c','l','i',or 'h')
-lon_0=XX # longitude of origin of map projection domain.
+lon_0=XX # longitude of origin of map projection domain (degrees).
 lat_0=XX # standard parallel/latitude of origin of map projection domain.
-llcrnrlat, llcrnrlon = XX, XX # lat/lon of lower left corner of map
+llcrnrlat, llcrnrlon = XX, XX # lat/lon of lower left corner of map (degrees)
 urcrnrlat, urcrnrlon  = XX, XX # lat/lon of upper right corner of map
 m = Basemap(lon_0=lon_0,lat_0=lat_0,\
 llcrnrlat=llcrnrlat,llcrnrlon=llcrnrlon,\

Modified: trunk/py4science/examples/skel/basemap2_skel.py
===
--- trunk/py4science/examples/skel/basemap2_skel.py 2007-11-21 21:35:59 UTC 
(rev 4415)
+++ trunk/py4science/examples/skel/basemap2_skel.py 2007-11-21 21:37:02 UTC 
(rev 4416)
@@ -8,7 +8,7 @@
 # create map by specifying width and height in km.
 projection = 'lcc' # map projection 
 resolution = XX # resolution of boundaries ('c','l','i',or 'h')
-lon_0=XX # longitude of origin of map projection domain.
+lon_0=XX # longitude of origin of map projection domain (degrees).
 lat_0=XX # standard parallel/latitude of origin of map projection domain.
 width = XX # width of map projecton domain in km.
 height = XX # height of map projection domain in km.
@@ -23,5 +23,4 @@
 m.drawcountries()
 m.drawstates()
 pylab.title('map region specified using width and height')
-pylab.savefig('basemap2.eps')
-pylab.savefig('basemap2.png')
+pylab.show()


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 2005.
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: [4417] trunk/toolkits/basemap-testing/lib/ matplotlib/toolkits/basemap/basemap.py

2007-11-21 Thread jswhit
Revision: 4417
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4417&view=rev
Author:   jswhit
Date: 2007-11-21 19:53:04 -0800 (Wed, 21 Nov 2007)

Log Message:
---
make sure ponds in islands in lakes are filled with correctly

Modified Paths:
--
trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py

Modified: 
trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py
===
--- trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py   
2007-11-21 21:37:02 UTC (rev 4416)
+++ trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py   
2007-11-22 03:53:04 UTC (rev 4417)
@@ -1071,7 +1071,7 @@
 hasp3 = npy.sum(test1*test4)
 if not hasp1 or not hasp2 or not hasp3 or not hasp4:
 xy = zip(xa.tolist(),ya.tolist())
-if self.coastpolygontypes[np] != 2:
+if self.coastpolygontypes[np] not in [2,4]:
 poly = 
Polygon(xy,facecolor=color,edgecolor=color,linewidth=0)
 else: # lakes filled with background color by default
 if lake_color is None:


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 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins