SF.net SVN: matplotlib: [3781] trunk/matplotlib/lib/matplotlib/backends/ backend_ps.py

2007-09-05 Thread mdboom
Revision: 3781
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3781&view=rev
Author:   mdboom
Date: 2007-09-05 04:51:57 -0700 (Wed, 05 Sep 2007)

Log Message:
---
Fix refactoring bug.

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/backends/backend_ps.py

Modified: trunk/matplotlib/lib/matplotlib/backends/backend_ps.py
===
--- trunk/matplotlib/lib/matplotlib/backends/backend_ps.py  2007-09-04 
20:49:00 UTC (rev 3780)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_ps.py  2007-09-05 
11:51:57 UTC (rev 3781)
@@ -666,7 +666,7 @@
 """
 draw a Text instance
 """
-w, h, bl = self.get_text_width_height_baseline(s, prop, ismath)
+w, h, bl = self.get_text_width_height_descent(s, prop, ismath)
 fontsize = prop.get_size_in_points()
 corr = 0#w/2*(fontsize-10)/10
 pos = _nums_to_str(x-corr, y)


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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


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

2007-09-05 Thread dsdale
Revision: 3782
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3782&view=rev
Author:   dsdale
Date: 2007-09-05 06:28:37 -0700 (Wed, 05 Sep 2007)

Log Message:
---
fixed qt version reporting in setupext.py

Modified Paths:
--
trunk/matplotlib/CHANGELOG
trunk/matplotlib/setupext.py

Modified: trunk/matplotlib/CHANGELOG
===
--- trunk/matplotlib/CHANGELOG  2007-09-05 11:51:57 UTC (rev 3781)
+++ trunk/matplotlib/CHANGELOG  2007-09-05 13:28:37 UTC (rev 3782)
@@ -1,3 +1,5 @@
+2007-09-05 Fixed Qt version reporting in setupext.py - DSD
+
 2007-09-04 Embedding Type 1 fonts in PDF, and thus usetex support
via dviread, sort of works. To test, enable it by 
renaming _draw_tex to draw_tex. - JKS

Modified: trunk/matplotlib/setupext.py
===
--- trunk/matplotlib/setupext.py2007-09-05 11:51:57 UTC (rev 3781)
+++ trunk/matplotlib/setupext.py2007-09-05 13:28:37 UTC (rev 3782)
@@ -278,6 +278,14 @@
 ret =  os.popen(s).read().strip()
 return ret
 
+def convert_qt_version(version):
+version = '%x'%version
+temp = []
+while len(version) > 0:
+version, chunk = version[:-2], version[-2:]
+temp.insert(0, str(int(chunk, 16)))
+return '.'.join(temp)
+
 def check_for_qt():
 try:
 import pyqtconfig
@@ -286,20 +294,20 @@
 return False
 else:
 print_status("Qt", "Qt: %s, pyqt: %s" %
- (pyqtconfig.Configuration().pyqt_version_str,
-  pyqtconfig.Configuration().qt_version))
+ 
(convert_qt_version(pyqtconfig.Configuration().qt_version),
+  pyqtconfig.Configuration().pyqt_version_str))
 return True
 
 def check_for_qt4():
 try:
-import PyQt4.pyqtconfig
+from PyQt4 import pyqtconfig
 except ImportError:
 print_status("Qt4", "no")
 return False
 else:
 print_status("Qt4", "Qt: %s, pyqt: %s" %
- (PyQt4.pyqtconfig.Configuration().pyqt_version_str,
-  PyQt4.pyqtconfig.Configuration().qt_version))
+ 
(convert_qt_version(pyqtconfig.Configuration().qt_version),
+  pyqtconfig.Configuration().pyqt_version_str))
 return True
 
 def check_for_cairo():
@@ -455,14 +463,14 @@
 if not os.environ.has_key('PKG_CONFIG_PATH'):
 # If Gtk+ is installed, pkg-config is required to be installed
 os.environ['PKG_CONFIG_PATH'] = 'C:\GTK\lib\pkgconfig'
-
-pygtkIncludes = getoutput('pkg-config --cflags-only-I 
pygtk-2.0').split()   
-gtkIncludes = getoutput('pkg-config --cflags-only-I gtk+-2.0').split() 
 
-includes = pygtkIncludes + gtkIncludes  
-module.include_dirs.extend([include[2:] for include in includes])  
 
-
-pygtkLinker = getoutput('pkg-config --libs pygtk-2.0').split() 
 
-gtkLinker =  getoutput('pkg-config --libs gtk+-2.0').split()
+ 
+pygtkIncludes = getoutput('pkg-config --cflags-only-I 
pygtk-2.0').split()
+gtkIncludes = getoutput('pkg-config --cflags-only-I gtk+-2.0').split() 
  
+includes = pygtkIncludes + gtkIncludes   
+module.include_dirs.extend([include[2:] for include in includes])
+ 
+pygtkLinker = getoutput('pkg-config --libs pygtk-2.0').split()   
+gtkLinker =  getoutput('pkg-config --libs gtk+-2.0').split() 
 linkerFlags = pygtkLinker + gtkLinker
 
 module.libraries.extend(


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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [3783] trunk/matplotlib/src/ft2font.cpp

2007-09-05 Thread mdboom
Revision: 3783
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3783&view=rev
Author:   mdboom
Date: 2007-09-05 07:02:22 -0700 (Wed, 05 Sep 2007)

Log Message:
---
Add a helpful comment.

Modified Paths:
--
trunk/matplotlib/src/ft2font.cpp

Modified: trunk/matplotlib/src/ft2font.cpp
===
--- trunk/matplotlib/src/ft2font.cpp2007-09-05 13:28:37 UTC (rev 3782)
+++ trunk/matplotlib/src/ft2font.cpp2007-09-05 14:02:22 UTC (rev 3783)
@@ -243,7 +243,10 @@
   _VERBOSE("FT2Image::as_str");
   args.verify_length(0);
 
-  return Py::asObject(PyString_FromStringAndSize((const char *)_buffer, 
_width*_height));
+  return Py::asObject
+(PyString_FromStringAndSize((const char *)_buffer, 
+   _width*_height)
+ );
 }
 
 void FT2Image::makeRgbCopy() {
@@ -298,6 +301,8 @@
   unsigned char *dst   = _rgbaCopy->_buffer;
 
   while (src != src_end) {
+// We know the array has already been zero'ed out in
+// the resize method, so we just skip over the r, g and b.
 dst += 3;
 *dst++ = *src++;
   }


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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [3784] trunk/matplotlib/src/_backend_agg.cpp

2007-09-05 Thread mdboom
Revision: 3784
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3784&view=rev
Author:   mdboom
Date: 2007-09-05 07:03:09 -0700 (Wed, 05 Sep 2007)

Log Message:
---
Fix over-allocation of alpha-channel buffer.  (Reduces memory usage
with Agg by ~25%

Modified Paths:
--
trunk/matplotlib/src/_backend_agg.cpp

Modified: trunk/matplotlib/src/_backend_agg.cpp
===
--- trunk/matplotlib/src/_backend_agg.cpp   2007-09-05 14:02:22 UTC (rev 
3783)
+++ trunk/matplotlib/src/_backend_agg.cpp   2007-09-05 14:03:09 UTC (rev 
3784)
@@ -247,7 +247,7 @@
   renderingBuffer = new agg::rendering_buffer;
   renderingBuffer->attach(pixBuffer, width, height, stride);
   
-  alphaBuffer = new agg::int8u[NUMBYTES];
+  alphaBuffer = new agg::int8u[width*height];
   alphaMaskRenderingBuffer = new agg::rendering_buffer;
   alphaMaskRenderingBuffer->attach(alphaBuffer, width, height, stride);
   alphaMask = new alpha_mask_type(*alphaMaskRenderingBuffer);


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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [3785] trunk/matplotlib/src/ft2font.cpp

2007-09-05 Thread mdboom
Revision: 3785
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3785&view=rev
Author:   mdboom
Date: 2007-09-05 07:46:14 -0700 (Wed, 05 Sep 2007)

Log Message:
---
Fix segfault in FT2Font::clear()

Modified Paths:
--
trunk/matplotlib/src/ft2font.cpp

Modified: trunk/matplotlib/src/ft2font.cpp
===
--- trunk/matplotlib/src/ft2font.cpp2007-09-05 14:03:09 UTC (rev 3784)
+++ trunk/matplotlib/src/ft2font.cpp2007-09-05 14:46:14 UTC (rev 3785)
@@ -75,6 +75,7 @@
   if (width != _width || height != _height) {
 if (numBytes > _width*_height) {
   delete [] _buffer;
+  _buffer = NULL;
   _buffer = new unsigned char [numBytes];
 }
 
@@ -781,6 +782,7 @@
   args.verify_length(0);
 
   delete image;
+  image = NULL;
 
   angle = 0.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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [3786] trunk/matplotlib/lib/matplotlib

2007-09-05 Thread jdh2358
Revision: 3786
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3786&view=rev
Author:   jdh2358
Date: 2007-09-05 08:21:08 -0700 (Wed, 05 Sep 2007)

Log Message:
---
fixed a load numpification bug

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/mlab.py
trunk/matplotlib/lib/matplotlib/pylab.py

Modified: trunk/matplotlib/lib/matplotlib/mlab.py
===
--- trunk/matplotlib/lib/matplotlib/mlab.py 2007-09-05 14:46:14 UTC (rev 
3785)
+++ trunk/matplotlib/lib/matplotlib/mlab.py 2007-09-05 15:21:08 UTC (rev 
3786)
@@ -1253,7 +1253,7 @@
 if r==1 or c==1:
 X.shape = max(r,c),
 if unpack: X.transpose()
-else:  return X
+return X
 
 def csv2rec(fname, comments='#', skiprows=0, checkrows=5, delimiter=',',
 converterd=None, names=None, missing=None):

Modified: trunk/matplotlib/lib/matplotlib/pylab.py
===
--- trunk/matplotlib/lib/matplotlib/pylab.py2007-09-05 14:46:14 UTC (rev 
3785)
+++ trunk/matplotlib/lib/matplotlib/pylab.py2007-09-05 15:21:08 UTC (rev 
3786)
@@ -124,6 +124,7 @@
   fliplr- flip the rows of a matrix up/down
   flipud- flip the columns of a matrix left/right
   linspace  - a linear spaced vector of N values from min to max inclusive
+  logspace  - a log spaced vector of N values from min to max inclusive  
   meshgrid  - repeat x and y to make regular matrices
   ones  - an array of ones
   rand  - an array from the uniform distribution [0,1]
@@ -307,7 +308,7 @@
 diagonal_matrix, base_repr, binary_repr, log2, ispower2,\
 bivariate_normal, load, save, stineman_interp
 
-from numpy import meshgrid, linspace
+from numpy import meshgrid, linspace, logspace
 
 """
 problem syms


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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [3787] trunk/matplotlib/lib/matplotlib

2007-09-05 Thread mdboom
Revision: 3787
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3787&view=rev
Author:   mdboom
Date: 2007-09-05 08:23:09 -0700 (Wed, 05 Sep 2007)

Log Message:
---
Use cmex for symbols that don't have any equivalent in Unicode (the
vertically sized things, in particular).  Simplify fallback_to_cm
code, now that font buffers are handled differently.

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

Modified: trunk/matplotlib/lib/matplotlib/_mathtext_data.py
===
--- trunk/matplotlib/lib/matplotlib/_mathtext_data.py   2007-09-05 15:21:08 UTC 
(rev 3786)
+++ trunk/matplotlib/lib/matplotlib/_mathtext_data.py   2007-09-05 15:23:09 UTC 
(rev 3787)
@@ -243,6 +243,29 @@
 r'\spadesuit'   : ('cmsy10',   7),
 }
 
+latex_to_cmex = {
+r'\__sqrt__'   : 112,
+r'\bigcap' : 92,
+r'\bigcup' : 91,
+r'\bigodot': 75,
+r'\bigoplus'   : 77,
+r'\bigotimes'  : 79,
+r'\biguplus'   : 93,
+r'\bigvee' : 95,
+r'\bigwedge'   : 94,
+r'\coprod' : 97,
+r'\int': 90,
+r'\leftangle'  : 173,
+r'\leftbrace'  : 169,
+r'\oint'   : 73,
+r'\prod'   : 89,
+r'\rightangle' : 174,
+r'\rightbrace' : 170,
+r'\sum': 88,
+r'\widehat': 98,
+r'\widetilde'  : 101,
+}
+
 latex_to_standard = {
 r'\cong': ('psyr', 64),
 r'\Delta'   : ('psyr', 68),

Modified: trunk/matplotlib/lib/matplotlib/mathtext.py
===
--- trunk/matplotlib/lib/matplotlib/mathtext.py 2007-09-05 15:21:08 UTC (rev 
3786)
+++ trunk/matplotlib/lib/matplotlib/mathtext.py 2007-09-05 15:23:09 UTC (rev 
3787)
@@ -146,7 +146,8 @@
 from matplotlib.ft2font import FT2Font, FT2Image, KERNING_DEFAULT, 
LOAD_DEFAULT, LOAD_NO_HINTING
 from matplotlib.font_manager import findfont, FontProperties
 from matplotlib._mathtext_data import latex_to_bakoma, \
-latex_to_standard, tex2uni, type12uni, tex2type1, uni2type1
+latex_to_standard, tex2uni, type12uni, tex2type1, uni2type1, \
+latex_to_cmex
 from matplotlib import get_data_path, rcParams
 
 
@@ -581,10 +582,9 @@
 self.fonts[font.postscript_name.lower()] = cached_font
 return cached_font
 
-def get_fonts(self):
-return list(set([x.font for x in self.fonts.values()]))
-
 def _get_offset(self, cached_font, glyph, fontsize, dpi):
+if cached_font.font.postscript_name == 'Cmex10':
+return glyph.height/64.0/2.0 + 256.0/64.0 * dpi/72.0
 return 0.
 
 def _get_info (self, fontname, sym, fontsize, dpi, mark_as_used=True):
@@ -676,11 +676,6 @@
 self.fontmap[key] = fullpath
 self.fontmap[val] = fullpath
 
-def _get_offset(self, cached_font, glyph, fontsize, dpi):
-if cached_font.font.postscript_name == 'Cmex10':
-return glyph.height/64.0/2.0 + 256.0/64.0 * dpi/72.0
-return 0.
-
 _slanted_symbols = Set(r"\int \oint".split())
 
 def _get_glyph(self, fontname, sym, fontsize):
@@ -719,21 +714,21 @@
 ('ex', '\x22')],
 ']'  : [('rm', ']'), ('ex', '\xa4'), ('ex', '\x69'),
 ('ex', '\x23')],
-r'\lfloor'   : [('cal', '\x62'), ('ex', '\xa5'), ('ex', '\x6a'),
+r'\lfloor'   : [('ex', '\xa5'), ('ex', '\x6a'),
 ('ex', '\xb9'), ('ex', '\x24')],
-r'\rfloor'   : [('cal', '\x63'), ('ex', '\xa6'), ('ex', '\x6b'),
+r'\rfloor'   : [('ex', '\xa6'), ('ex', '\x6b'),
 ('ex', '\xba'), ('ex', '\x25')],
-r'\lceil': [('cal', '\x64'), ('ex', '\xa7'), ('ex', '\x6c'),
+r'\lceil': [('ex', '\xa7'), ('ex', '\x6c'),
 ('ex', '\xbb'), ('ex', '\x26')],
-r'\rceil': [('cal', '\x65'), ('ex', '\xa8'), ('ex', '\x6d'),
+r'\rceil': [('ex', '\xa8'), ('ex', '\x6d'),
 ('ex', '\xbc'), ('ex', '\x27')],
-r'\langle'   : [('cal', '\x68'), ('ex', '\xad'), ('ex', '\x44'),
+r'\langle'   : [('ex', '\xad'), ('ex', '\x44'),
 ('ex', '\xbf'), ('ex', '\x2a')],
-r'\rangle'   : [('cal', '\x69'), ('ex', '\xae'), ('ex', '\x45'),
+r'\rangle'   : [('ex', '\xae'), ('ex', '\x45'),
 ('ex', '\xc0'), ('ex', '\x2b')],
-r'\__sqrt__' : [('cal', '\x70'), ('ex', '\x70'), ('ex', '\x71'),
+r'\__sqrt__' : [('ex', '\x70'), ('ex', '\x71'),
 ('ex', '\x72'), ('ex', '\x73')],
-r'\backslash': [('cal', '\x6e'), ('ex', '\xb2'), ('ex', '\x2f'),
+r'\backslash': [('ex', '\xb2'), ('ex', '\x2f'),
 ('ex', '\xc2'), ('ex', '\x2d')],
 r'/' : [('rm', '/'), ('ex', '\xb1'), ('ex', '\

SF.net SVN: matplotlib: [3788] trunk/matplotlib/lib/matplotlib/mlab.py

2007-09-05 Thread jdh2358
Revision: 3788
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3788&view=rev
Author:   jdh2358
Date: 2007-09-05 08:23:29 -0700 (Wed, 05 Sep 2007)

Log Message:
---
fixed a load numpification bug

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

Modified: trunk/matplotlib/lib/matplotlib/mlab.py
===
--- trunk/matplotlib/lib/matplotlib/mlab.py 2007-09-05 15:23:09 UTC (rev 
3787)
+++ trunk/matplotlib/lib/matplotlib/mlab.py 2007-09-05 15:23:29 UTC (rev 
3788)
@@ -1252,7 +1252,7 @@
 r,c = X.shape
 if r==1 or c==1:
 X.shape = max(r,c),
-if unpack: X.transpose()
+if unpack: return X.transpose()
 return X
 
 def csv2rec(fname, comments='#', skiprows=0, checkrows=5, delimiter=',',


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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [3789] trunk/matplotlib/lib/matplotlib/ backend_bases.py

2007-09-05 Thread mdboom
Revision: 3789
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3789&view=rev
Author:   mdboom
Date: 2007-09-05 08:28:21 -0700 (Wed, 05 Sep 2007)

Log Message:
---
Bugfix #1767997: Zoom to rectangle and home, previous, next buttons

The "original" position of the axes was not being saved/restored in
the history stack.  This patch saves both "original" and "active" position.

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

Modified: trunk/matplotlib/lib/matplotlib/backend_bases.py
===
--- trunk/matplotlib/lib/matplotlib/backend_bases.py2007-09-05 15:23:29 UTC 
(rev 3788)
+++ trunk/matplotlib/lib/matplotlib/backend_bases.py2007-09-05 15:28:21 UTC 
(rev 3789)
@@ -1446,7 +1446,10 @@
 xmin, xmax = a.get_xlim()
 ymin, ymax = a.get_ylim()
 lims.append( (xmin, xmax, ymin, ymax) )
-pos.append( tuple( a.get_position() ) )
+# Store both the original and modified positions
+pos.append( (
+tuple( a.get_position(True) ),
+tuple( a.get_position() ) ) )
 self._views.push(lims)
 self._positions.push(pos)
 self.set_history_buttons()
@@ -1660,7 +1663,9 @@
 xmin, xmax, ymin, ymax = lims[i]
 a.set_xlim((xmin, xmax))
 a.set_ylim((ymin, ymax))
-a.set_position( pos[i] )
+# Restore both the original and modified positions
+a.set_position( pos[i][0], 'original' )
+a.set_position( pos[i][1], 'active' )
 
 self.draw()
 


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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [3790] trunk/matplotlib/src/ft2font.cpp

2007-09-05 Thread mdboom
Revision: 3790
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3790&view=rev
Author:   mdboom
Date: 2007-09-05 08:47:35 -0700 (Wed, 05 Sep 2007)

Log Message:
---
Fix some recent reference counting bugs in ft2font.cpp (Thanks to Paul Kienzle).

Modified Paths:
--
trunk/matplotlib/src/ft2font.cpp

Modified: trunk/matplotlib/src/ft2font.cpp
===
--- trunk/matplotlib/src/ft2font.cpp2007-09-05 15:28:21 UTC (rev 3789)
+++ trunk/matplotlib/src/ft2font.cpp2007-09-05 15:47:35 UTC (rev 3790)
@@ -743,8 +743,7 @@
 {
   _VERBOSE("FT2Font::~FT2Font");
 
-  if(image)
-Py::_XDECREF(image);
+  Py_XDECREF(image);
   FT_Done_Face( face );
 
   for (size_t i=0; i= gms.size())
 throw Py::ValueError("Glyph index out of range");
 
-  //todo: refcount?
+  Py_INCREF(gms[num]);
   return Py::asObject(gms[num]);
 }
 
@@ -1667,8 +1666,11 @@
 Py::Object
 FT2Font::get_image (const Py::Tuple &args) {
   args.verify_length(0);
-  Py_INCREF(image);
-  return Py::asObject(image);
+  if (image) {
+Py_XINCREF(image);
+return Py::asObject(image);
+  } 
+  throw Py::RuntimeError("You must call .set_text() before .get_image()");
 }
 
 char FT2Font::attach_file__doc__ [] =


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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [3791] trunk/matplotlib/lib/matplotlib/backends/ backend_svg.py

2007-09-05 Thread mdboom
Revision: 3791
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3791&view=rev
Author:   mdboom
Date: 2007-09-05 09:44:31 -0700 (Wed, 05 Sep 2007)

Log Message:
---
Bugfix #1671570: Invalid CSS 2 styles in SVG output

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/backends/backend_svg.py

Modified: trunk/matplotlib/lib/matplotlib/backends/backend_svg.py
===
--- trunk/matplotlib/lib/matplotlib/backends/backend_svg.py 2007-09-05 
15:47:35 UTC (rev 3790)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_svg.py 2007-09-05 
16:44:31 UTC (rev 3791)
@@ -246,7 +246,7 @@
 
 thetext = escape_xml_text(s)
 fontfamily = font.family_name
-fontstyle = font.style_name
+fontstyle = prop.get_style()
 fontsize = prop.get_size_in_points()
 color = rgb2hex(gc.get_rgb())
 


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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [3792] trunk/matplotlib/lib/matplotlib

2007-09-05 Thread dsdale
Revision: 3792
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3792&view=rev
Author:   dsdale
Date: 2007-09-05 12:38:27 -0700 (Wed, 05 Sep 2007)

Log Message:
---
fixed some minor bugs related to mathtext: text 
markup in new config, uncommented print statement

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

Modified: trunk/matplotlib/lib/matplotlib/config/mplconfig.py
===
--- trunk/matplotlib/lib/matplotlib/config/mplconfig.py 2007-09-05 16:44:31 UTC 
(rev 3791)
+++ trunk/matplotlib/lib/matplotlib/config/mplconfig.py 2007-09-05 19:38:27 UTC 
(rev 3792)
@@ -337,7 +337,6 @@
 'text.latex.unicode' : (self.tconfig.text.latex, 'unicode'),
 'text.latex.preamble' : (self.tconfig.text.latex, 'preamble'),
 'text.dvipnghack' : (self.tconfig.text.latex, 'dvipnghack'),
-'text.markup' : (self.tconfig.text, 'markup'),
 
 'mathtext.cal': (self.tconfig.mathtext, 'cal'),
 'mathtext.rm' : (self.tconfig.mathtext, 'rm'),

Modified: trunk/matplotlib/lib/matplotlib/mathtext.py
===
--- trunk/matplotlib/lib/matplotlib/mathtext.py 2007-09-05 16:44:31 UTC (rev 
3791)
+++ trunk/matplotlib/lib/matplotlib/mathtext.py 2007-09-05 19:38:27 UTC (rev 
3792)
@@ -355,7 +355,7 @@
 
 def get_results(self, box):
 ship(0, -self.depth, box)
-print self.depth
+#print self.depth
 return (self.width,
 self.height + self.depth,
 self.depth,


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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [3793] trunk/matplotlib/examples

2007-09-05 Thread pkienzle
Revision: 3793
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3793&view=rev
Author:   pkienzle
Date: 2007-09-05 14:40:41 -0700 (Wed, 05 Sep 2007)

Log Message:
---
Convert to numpy

Modified Paths:
--
trunk/matplotlib/examples/quadmesh_demo.py
trunk/matplotlib/examples/simple3d.py

Modified: trunk/matplotlib/examples/quadmesh_demo.py
===
--- trunk/matplotlib/examples/quadmesh_demo.py  2007-09-05 19:38:27 UTC (rev 
3792)
+++ trunk/matplotlib/examples/quadmesh_demo.py  2007-09-05 21:40:41 UTC (rev 
3793)
@@ -4,23 +4,21 @@
 with some restrictions.
 """
 
-from matplotlib.mlab import linspace, meshgrid
-import matplotlib.numerix as nx
+import numpy as nx
 from pylab import figure,show
-import matplotlib.numerix.ma as ma
 from matplotlib import cm, colors
 
 n = 56
-x = linspace(-1.5,1.5,n)
-X,Y = meshgrid(x,x);
+x = nx.linspace(-1.5,1.5,n)
+X,Y = nx.meshgrid(x,x);
 Qx = nx.cos(Y) - nx.cos(X)
 Qz = nx.sin(Y) + nx.sin(X)
 Qx = (Qx + 1.1)
 Z = nx.sqrt(X**2 + Y**2)/5;
-Z = (Z - nx.mlab.amin(Z)) / (nx.mlab.amax(Z) - nx.mlab.amin(Z))
+Z = (Z - nx.amin(Z)) / (nx.amax(Z) - nx.amin(Z))
 
 # The color array can include masked values:
-Zm = ma.masked_where(nx.fabs(Qz) < 0.5*nx.mlab.amax(Qz), Z)
+Zm = nx.ma.masked_where(nx.fabs(Qz) < 0.5*nx.amax(Qz), Z)
 
 
 fig = figure()

Modified: trunk/matplotlib/examples/simple3d.py
===
--- trunk/matplotlib/examples/simple3d.py   2007-09-05 19:38:27 UTC (rev 
3792)
+++ trunk/matplotlib/examples/simple3d.py   2007-09-05 21:40:41 UTC (rev 
3793)
@@ -1,11 +1,6 @@
 #!/usr/bin/env python
 
-import matplotlib
-matplotlib.rcParams['numerix'] = 'numpy'
-import numpy as np
-from numpy import arange, cos, linspace, ones, pi, sin
-import matplotlib.numerix as nx
-from matplotlib.numerix import outerproduct
+from numpy import arange, cos, linspace, ones, pi, sin, outer
 
 import pylab
 import matplotlib.axes3d as axes3d
@@ -20,9 +15,9 @@
 u = arange(0, 2*pi+(delta*2), delta*2)
 v = arange(0, pi+delta, delta)
 
-x = outerproduct(cos(u),sin(v))
-y = outerproduct(sin(u),sin(v))
-z = outerproduct(ones(u.shape), cos(v))
+x = outer(cos(u),sin(v))
+y = outer(sin(u),sin(v))
+z = outer(ones(u.shape), cos(v))
 
 #ax3d.plot_wireframe(x,y,z)
 surf = ax3d.plot_surface(x, y, z)


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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [3794] trunk/matplotlib/lib/matplotlib/mlab.py

2007-09-05 Thread pkienzle
Revision: 3794
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3794&view=rev
Author:   pkienzle
Date: 2007-09-05 14:50:01 -0700 (Wed, 05 Sep 2007)

Log Message:
---
Fix get_xyz_where() typo so spy_demos works again

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

Modified: trunk/matplotlib/lib/matplotlib/mlab.py
===
--- trunk/matplotlib/lib/matplotlib/mlab.py 2007-09-05 21:40:41 UTC (rev 
3793)
+++ trunk/matplotlib/lib/matplotlib/mlab.py 2007-09-05 21:50:01 UTC (rev 
3794)
@@ -949,7 +949,7 @@
 where x and y are the indices into Z and z are the values of Z at
 those indices.  x,y,z are 1D arrays
 """
-X,Y = npy.indices(z.shape)
+X,Y = npy.indices(Z.shape)
 return X[Cond], Y[Cond], Z[Cond]
 
 def get_sparse_matrix(M,N,frac=0.1):


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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins