SF.net SVN: matplotlib: [4666] trunk/htdocs/faq.html.template

2007-12-07 Thread dsdale
Revision: 4666
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4666&view=rev
Author:   dsdale
Date: 2007-12-07 10:22:30 -0800 (Fri, 07 Dec 2007)

Log Message:
---
fix a typo in the link to two_scales.py

Modified Paths:
--
trunk/htdocs/faq.html.template

Modified: trunk/htdocs/faq.html.template
===
--- trunk/htdocs/faq.html.template  2007-12-07 07:12:33 UTC (rev 4665)
+++ trunk/htdocs/faq.html.template  2007-12-07 18:22:30 UTC (rev 4666)
@@ -639,7 +639,7 @@
  'Can I plot data with two y axes scales?',
  r"""
 As of matplotlib-0.53, there is support for this.  See two_scales.py.
+href=examples/two_scales.py>two_scales.py.
 """),
 
 ('MATHTEXT',


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

-
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [4667] trunk/matplotlib/lib/matplotlib/image.py

2007-12-07 Thread mdboom
Revision: 4667
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4667&view=rev
Author:   mdboom
Date: 2007-12-07 11:05:11 -0800 (Fri, 07 Dec 2007)

Log Message:
---
[ 1697287 ] imshow on log axes broken if axes limits != image extent
Adds a warning when an image is used on non-linear axes.  Doesn't
really address the problem (see bug report for the reason.)

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

Modified: trunk/matplotlib/lib/matplotlib/image.py
===
--- trunk/matplotlib/lib/matplotlib/image.py2007-12-07 18:22:30 UTC (rev 
4666)
+++ trunk/matplotlib/lib/matplotlib/image.py2007-12-07 19:05:11 UTC (rev 
4667)
@@ -4,7 +4,7 @@
 
 """
 from __future__ import division
-import sys, os
+import sys, os, warnings
 
 import numpy as npy
 
@@ -185,6 +185,9 @@
 
 def draw(self, renderer, *args, **kwargs):
 if not self.get_visible(): return
+if (self.axes.get_xscale() != 'linear' or
+self.axes.get_yscale() != 'linear'):
+warnings.warn("Images are not supported on non-linear axes.")
 im = self.make_image(renderer.get_image_magnification())
 l, b, widthDisplay, heightDisplay = self.axes.bbox.get_bounds()
 renderer.draw_image(l, b, im, self.axes.bbox)


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

-
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


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

2007-12-07 Thread mdboom
Revision: 4670
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4670&view=rev
Author:   mdboom
Date: 2007-12-07 11:18:58 -0800 (Fri, 07 Dec 2007)

Log Message:
---
Updating CHANGELOG.

Modified Paths:
--
trunk/matplotlib/CHANGELOG

Modified: trunk/matplotlib/CHANGELOG
===
--- trunk/matplotlib/CHANGELOG  2007-12-07 19:18:02 UTC (rev 4669)
+++ trunk/matplotlib/CHANGELOG  2007-12-07 19:18:58 UTC (rev 4670)
@@ -1,3 +1,5 @@
+2007-12-07 Issue a warning when drawing an image on a non-linear axis. - MGD
+
 2007-12-06 let widgets.Cursor initialize to the lower x and y bounds
rather than 0,0, which can cause havoc for dates and other
transforms - DSD
@@ -6,6 +8,10 @@
 
 2007-12-06 fixed a bug in rcsetup, see bug 1845057 - DSD
 
+2007-12-05 Fix how fonts are cached to avoid loading the same one multiple 
times.
+   (This was a regression since 0.90 caused by the refactoring of
+   font_manager.py) - MGD
+
 ===
 2007-11-27 Released 0.91.1 at revision 4517
 
@@ -17,8 +23,8 @@
   object in place of a file path. - MGD
 
 2007-11-13 Improved the default backend selection at build time:
-   SVG -> Agg -> TkAgg -> WXAgg -> GTK -> GTKAgg. The last usable 
-   backend in this progression will be chosen in the default 
+   SVG -> Agg -> TkAgg -> WXAgg -> GTK -> GTKAgg. The last usable
+   backend in this progression will be chosen in the default
config file. If a backend is defined in setup.cfg, that will
be the default backend - DSD
 
@@ -28,41 +34,41 @@
 2007-11-12 Exposed all the build options in setup.cfg. These options are
read into a dict called "options" by setupext.py. Also, added
"-mpl" tags to the version strings for packages provided by
-   matplotlib. Versions provided by mpl will be identified and 
+   matplotlib. Versions provided by mpl will be identified and
updated on subsequent installs - DSD
 
 2007-11-12 Added support for STIX fonts.  A new rcParam,
-  mathtext.fontset, can be used to choose between: 
-   
+  mathtext.fontset, can be used to choose between:
+
   'cm':
-The TeX/LaTeX Computer Modern fonts 
+The TeX/LaTeX Computer Modern fonts
 
-  'stix': 
+  'stix':
 The STIX fonts (see stixfonts.org)
 
-  'stixsans': 
-The STIX fonts, using sans-serif glyphs by default 
+  'stixsans':
+The STIX fonts, using sans-serif glyphs by default
 
-  'custom': 
+  'custom':
 A generic Unicode font, in which case the mathtext font
 must be specified using mathtext.bf, mathtext.it,
 mathtext.sf etc.
-
+
   Added a new example, stix_fonts_demo.py to show how to access
   different fonts and unusual symbols.
-   
+
- MGD
 
-2007-11-12 Options to disable building backend extension modules moved 
+2007-11-12 Options to disable building backend extension modules moved
from setup.py to setup.cfg - DSD
 
 2007-11-09 Applied Martin Teichmann's patch 1828813: a QPainter is used in
-   paintEvent, which has to be destroyed using  the method end(). If 
-   matplotlib raises an exception before the call to end - and it 
-   does if you feed it with bad data - this method end() is never 
+   paintEvent, which has to be destroyed using  the method end(). If
+   matplotlib raises an exception before the call to end - and it
+   does if you feed it with bad data - this method end() is never
called and Qt4 will start spitting error messages
 
-2007-11-09 Moved pyparsing back into matplotlib namespace. Don't use 
+2007-11-09 Moved pyparsing back into matplotlib namespace. Don't use
system pyparsing, API is too variable from one release
to the next - DSD
 


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

-
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [4668] branches/transforms

2007-12-07 Thread mdboom
Revision: 4668
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4668&view=rev
Author:   mdboom
Date: 2007-12-07 11:09:52 -0800 (Fri, 07 Dec 2007)

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


  r4636 | jrevans | 2007-12-05 19:04:49 -0500 (Wed, 05 Dec 2007) | 2 lines
  
  Added a 'data offset' coordinate to the Annotation class.

  r4637 | jrevans | 2007-12-05 19:09:49 -0500 (Wed, 05 Dec 2007) | 2 lines
  
  Submitted the wrong version.  This is the correct one.

  r4638 | jdh2358 | 2007-12-05 21:36:05 -0500 (Wed, 05 Dec 2007) | 1 line
  
  changed offset naming for annotations

  r4640 | mdboom | 2007-12-06 07:48:16 -0500 (Thu, 06 Dec 2007) | 2 lines
  
  Import numpy.

  r4643 | mdboom | 2007-12-06 10:10:15 -0500 (Thu, 06 Dec 2007) | 2 lines
  
  Fixing display of float images.

  r4644 | jrevans | 2007-12-06 11:11:17 -0500 (Thu, 06 Dec 2007) | 2 lines
  
  Updated to demonstrate 'offset points'

  r4645 | dsdale | 2007-12-06 11:23:58 -0500 (Thu, 06 Dec 2007) | 3 lines
  
  modified svn:ignore properties to ignore generated files
  not under revision control

  r4647 | dsdale | 2007-12-06 12:47:46 -0500 (Thu, 06 Dec 2007) | 2 lines
  
  fixed a bug in rcsetup, see bug 1845057

  r4648 | dsdale | 2007-12-06 13:08:21 -0500 (Thu, 06 Dec 2007) | 3 lines
  
  changed the default backend in rcsetup from WXAgg, which
  is not certain to be present, to Agg.

  r4649 | dsdale | 2007-12-06 13:32:44 -0500 (Thu, 06 Dec 2007) | 4 lines
  
  fixed a bug in savefig, saving to a nonexistent directory
  would result in a crash in some circumstances. Closes bug
  1699614

  r4650 | dsdale | 2007-12-06 13:38:55 -0500 (Thu, 06 Dec 2007) | 2 lines
  
  undo that last change, mdboom had a different solution that I overlooked

  r4651 | mdboom | 2007-12-06 13:47:50 -0500 (Thu, 06 Dec 2007) | 2 lines
  
  Fix saving to a file-like object.


Modified Paths:
--
branches/transforms/CHANGELOG
branches/transforms/examples/annotation_demo.py
branches/transforms/lib/matplotlib/__init__.py
branches/transforms/lib/matplotlib/cbook.py
branches/transforms/lib/matplotlib/cm.py
branches/transforms/lib/matplotlib/rcsetup.py
branches/transforms/lib/matplotlib/text.py
branches/transforms/src/_backend_agg.cpp

Property Changed:

branches/transforms/
branches/transforms/examples/
branches/transforms/lib/
branches/transforms/lib/matplotlib/mpl-data/
branches/transforms/unit/


Property changes on: branches/transforms
___
Name: svn:ignore
   - 
build
dist
docs
*.pyc
.project
matplotlibrc
win32_static

   + build
dist
docs
*.pyc
.project
matplotlibrc
win32_static
setup.cfg

Name: svnmerge-integrated
   - /trunk/matplotlib:1-4633
   + /trunk/matplotlib:1-4652

Modified: branches/transforms/CHANGELOG
===
--- branches/transforms/CHANGELOG   2007-12-07 19:05:11 UTC (rev 4667)
+++ branches/transforms/CHANGELOG   2007-12-07 19:09:52 UTC (rev 4668)
@@ -1,3 +1,5 @@
+2007-12-06 fixed a bug in rcsetup, see bug 1845057 - DSD
+
 ===
 2007-11-27 Released 0.91.1 at revision 4517
 


Property changes on: branches/transforms/examples
___
Name: svn:ignore
   - *.eps
*.jpeg
*.jpg
*.pdf
*.png
*.ps
*.pyc
*.svg
   + matplotlibrc
matplotlib.conf
*.eps
*.jpeg
*.jpg
*.pdf
*.png
*.ps
*.pyc
*.svg


Modified: branches/transforms/examples/annotation_demo.py
===
--- branches/transforms/examples/annotation_demo.py 2007-12-07 19:05:11 UTC 
(rev 4667)
+++ branches/transforms/examples/annotation_demo.py 2007-12-07 19:09:52 UTC 
(rev 4668)
@@ -10,6 +10,7 @@
   'axes points' : points from lower left corner of axes
   'axes pixels' : pixels from lower left corner of axes
   'axes fraction'   : 0,1 is lower left of axes and 1,1 is upper right
+  'offset points'   : Specify an offset (in points) from the xy value
   'data': use the axes data coordinate system
 
 Optionally, you can specify arrow properties which draws and arrow
@@ -54,6 +55,12 @@
 
 ax.annotate('points', xy=(100, 300),  xycoords='figure points')
 
+ax.annotate('offset', xy=(1, 1),  xycoords='data',
+xytext=(-15, 10), textcoords='offset points',
+arrowprops=dict(facecolor='black', shrink=0.05),
+horizontalalignment='right', verticalalignment='bottom',
+)
+
 ax.annotate('local max', xy=(3, 1),  xycoords='data',
 xytext=(0.8, 0.95), textcoords='axes fraction',
 arrowprops=dict(face

SF.net SVN: matplotlib: [4669] branches/transforms

2007-12-07 Thread mdboom
Revision: 4669
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4669&view=rev
Author:   mdboom
Date: 2007-12-07 11:18:02 -0800 (Fri, 07 Dec 2007)

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


  r4653 | mdboom | 2007-12-06 14:10:12 -0500 (Thu, 06 Dec 2007) | 2 lines
  
  [ 1841933 ] font_manager.win32FontDirectory() fails as Vista service

  r4654 | dsdale | 2007-12-06 14:18:49 -0500 (Thu, 06 Dec 2007) | 2 lines
  
  updated references to mpl data directories for py2exe

  r4658 | dsdale | 2007-12-06 17:28:27 -0500 (Thu, 06 Dec 2007) | 4 lines
  
  let widgets.Cursor initialize to the lower x and y bounds
  rather than 0,0, which can cause havoc for dates and other
  transforms

  r4665 | efiring | 2007-12-07 02:12:33 -0500 (Fri, 07 Dec 2007) | 2 lines
  
  Clarify docstrings on Subplot classes; closes 1659419

  r4667 | mdboom | 2007-12-07 14:05:11 -0500 (Fri, 07 Dec 2007) | 4 lines
  
  [ 1697287 ] imshow on log axes broken if axes limits != image extent
  Adds a warning when an image is used on non-linear axes.  Doesn't
  really address the problem (see bug report for the reason.)


Modified Paths:
--
branches/transforms/CHANGELOG
branches/transforms/lib/matplotlib/__init__.py
branches/transforms/lib/matplotlib/axes.py
branches/transforms/lib/matplotlib/config/cutils.py
branches/transforms/lib/matplotlib/figure.py
branches/transforms/lib/matplotlib/font_manager.py
branches/transforms/lib/matplotlib/image.py
branches/transforms/lib/matplotlib/widgets.py

Property Changed:

branches/transforms/


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

Modified: branches/transforms/CHANGELOG
===
--- branches/transforms/CHANGELOG   2007-12-07 19:09:52 UTC (rev 4668)
+++ branches/transforms/CHANGELOG   2007-12-07 19:18:02 UTC (rev 4669)
@@ -1,3 +1,9 @@
+2007-12-06 let widgets.Cursor initialize to the lower x and y bounds
+   rather than 0,0, which can cause havoc for dates and other
+   transforms - DSD
+
+2007-12-06 updated references to mpl data directories for py2exe - DSD
+
 2007-12-06 fixed a bug in rcsetup, see bug 1845057 - DSD
 
 ===
@@ -11,8 +17,8 @@
   object in place of a file path. - MGD
 
 2007-11-13 Improved the default backend selection at build time:
-   SVG -> Agg -> TkAgg -> WXAgg -> GTK -> GTKAgg. The last usable 
-   backend in this progression will be chosen in the default 
+   SVG -> Agg -> TkAgg -> WXAgg -> GTK -> GTKAgg. The last usable
+   backend in this progression will be chosen in the default
config file. If a backend is defined in setup.cfg, that will
be the default backend - DSD
 
@@ -22,41 +28,41 @@
 2007-11-12 Exposed all the build options in setup.cfg. These options are
read into a dict called "options" by setupext.py. Also, added
"-mpl" tags to the version strings for packages provided by
-   matplotlib. Versions provided by mpl will be identified and 
+   matplotlib. Versions provided by mpl will be identified and
updated on subsequent installs - DSD
 
 2007-11-12 Added support for STIX fonts.  A new rcParam,
-  mathtext.fontset, can be used to choose between: 
-   
+  mathtext.fontset, can be used to choose between:
+
   'cm':
-The TeX/LaTeX Computer Modern fonts 
+The TeX/LaTeX Computer Modern fonts
 
-  'stix': 
+  'stix':
 The STIX fonts (see stixfonts.org)
 
-  'stixsans': 
-The STIX fonts, using sans-serif glyphs by default 
+  'stixsans':
+The STIX fonts, using sans-serif glyphs by default
 
-  'custom': 
+  'custom':
 A generic Unicode font, in which case the mathtext font
 must be specified using mathtext.bf, mathtext.it,
 mathtext.sf etc.
-
+
   Added a new example, stix_fonts_demo.py to show how to access
   different fonts and unusual symbols.
-   
+
- MGD
 
-2007-11-12 Options to disable building backend extension modules moved 
+2007-11-12 Options to disable building backend extension modules moved
from setup.py to setup.cfg - DSD
 
 2007-11-09 Applied Martin Teichmann's patch 1828813: a QPainter is used in
-   paintEvent, which has to be destroyed using  the method end(). If 
-   matplotlib raises an exception before the call to end - and it 
-   does if you feed it with bad data - this m

SF.net SVN: matplotlib: [4671] trunk/toolkits/basemap/examples/plotcities. py

2007-12-07 Thread jswhit
Revision: 4671
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4671&view=rev
Author:   jswhit
Date: 2007-12-07 18:35:27 -0800 (Fri, 07 Dec 2007)

Log Message:
---
really color by pop rank

Modified Paths:
--
trunk/toolkits/basemap/examples/plotcities.py

Modified: trunk/toolkits/basemap/examples/plotcities.py
===
--- trunk/toolkits/basemap/examples/plotcities.py   2007-12-07 19:18:58 UTC 
(rev 4670)
+++ trunk/toolkits/basemap/examples/plotcities.py   2007-12-08 02:35:27 UTC 
(rev 4671)
@@ -1,18 +1,24 @@
 import pylab as p
+from matplotlib.mlab import prctile_rank
 import numpy
 from matplotlib.toolkits.basemap import Basemap as Basemap
 
 # cities colored by population rank.
+
 m = Basemap()
 shp_info = m.readshapefile('cities','cities')
 x, y = zip(*m.cities)
 pop = []
 for item in m.cities_info:
-pop.append(int(item['POPULATION']))
-pop = numpy.array(pop)
-poprank = numpy.argsort(pop)
+population = item['POPULATION']
+if population < 0: continue # population missing
+pop.append(population)
+popranks = prctile_rank(pop,100)
+colors = []
+for rank in popranks:
+colors.append(p.cm.jet(float(rank)/100.))
 m.drawcoastlines()
 m.fillcontinents()
-m.scatter(x,y,25,poprank,cmap=p.cm.jet_r,marker='o',faceted=False,zorder=10)
+m.scatter(x,y,25,colors,marker='o',faceted=False,zorder=10)
 p.title('City Locations colored by Population Rank')
 p.show()


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

-
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins