SF.net SVN: matplotlib:[7253] branches/v0_98_5_maint/setupext.py
Revision: 7253
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7253&view=rev
Author: jdh2358
Date: 2009-07-11 12:39:29 + (Sat, 11 Jul 2009)
Log Message:
---
applied osx setpext patch from sf #2818964
Modified Paths:
--
branches/v0_98_5_maint/setupext.py
Modified: branches/v0_98_5_maint/setupext.py
===
--- branches/v0_98_5_maint/setupext.py 2009-07-10 21:32:27 UTC (rev 7252)
+++ branches/v0_98_5_maint/setupext.py 2009-07-11 12:39:29 UTC (rev 7253)
@@ -140,6 +140,9 @@
try: options['build_wxagg'] = config.getboolean("gui_support", "wxagg")
except: options['build_wxagg'] = 'auto'
+try: options['build_macosx'] = config.getboolean("gui_support", "macosx")
+except: options['build_macosx'] = 'auto'
+
try: options['backend'] = config.get("rc_options", "backend")
except: pass
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
--
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib:[7254] trunk/matplotlib
Revision: 7254
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7254&view=rev
Author: jdh2358
Date: 2009-07-11 12:42:46 + (Sat, 11 Jul 2009)
Log Message:
---
Merged revisions 7253 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_5_maint
r7253 | jdh2358 | 2009-07-11 07:39:29 -0500 (Sat, 11 Jul 2009) | 1 line
applied osx setpext patch from sf #2818964
Modified Paths:
--
trunk/matplotlib/setupext.py
Property Changed:
trunk/matplotlib/
Property changes on: trunk/matplotlib
___
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7245
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7253
Modified: trunk/matplotlib/setupext.py
===
--- trunk/matplotlib/setupext.py2009-07-11 12:39:29 UTC (rev 7253)
+++ trunk/matplotlib/setupext.py2009-07-11 12:42:46 UTC (rev 7254)
@@ -138,6 +138,9 @@
try: options['build_wxagg'] = config.getboolean("gui_support", "wxagg")
except: options['build_wxagg'] = 'auto'
+try: options['build_macosx'] = config.getboolean("gui_support", "macosx")
+except: options['build_macosx'] = 'auto'
+
try: options['backend'] = config.get("rc_options", "backend")
except: pass
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
--
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib:[7255] trunk/matplotlib
Revision: 7255
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7255&view=rev
Author: jdh2358
Date: 2009-07-11 16:52:44 + (Sat, 11 Jul 2009)
Log Message:
---
added fillstyle property to Line2D
Modified Paths:
--
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/lines.py
Modified: trunk/matplotlib/CHANGELOG
===
--- trunk/matplotlib/CHANGELOG 2009-07-11 12:42:46 UTC (rev 7254)
+++ trunk/matplotlib/CHANGELOG 2009-07-11 16:52:44 UTC (rev 7255)
@@ -1,3 +1,6 @@
+2009-07-11 Added a fillstyle Line2D property for half filled markers
+ -- see examples/pylab_examples/fillstyle_demo.py JDH
+
2009-07-08 Attempt to improve performance of qt4 backend, do not call
qApp.processEvents while processing an event. Thanks Ole
Streicher for tracking this down - DSD
Modified: trunk/matplotlib/lib/matplotlib/lines.py
===
--- trunk/matplotlib/lib/matplotlib/lines.py2009-07-11 12:42:46 UTC (rev
7254)
+++ trunk/matplotlib/lib/matplotlib/lines.py2009-07-11 16:52:44 UTC (rev
7255)
@@ -172,6 +172,7 @@
markeredgewidth = None,
markeredgecolor = None,
markerfacecolor = None,
+fillstyle = 'full',
antialiased = None,
dash_capstyle = None,
solid_capstyle = None,
@@ -238,6 +239,8 @@
self.set_markerfacecolor(markerfacecolor)
self.set_markeredgecolor(markeredgecolor)
self.set_markeredgewidth(markeredgewidth)
+ self.set_fillstyle(fillstyle)
+
self._point_size_reduction = 0.5
self.verticalOffset = None
@@ -324,7 +327,22 @@
"""
self.pickradius = d
+def get_fillstyle(self):
+"""
+ return the marker fillstyle
+"""
+ return self._fillstyle
+def set_fillstyle(self, fs):
+"""
+Set the marker fill style; full means fill the whole marker.
+The other options are for half fills
+
+ACCEPTS: string ['full' | 'left' | 'right' | 'bottom' | 'top']
+"""
+assert fs in ['full', 'left' , 'right' , 'bottom' , 'top']
+ self._fillstyle = fs
+
def set_markevery(self, every):
"""
Set the markevery property to subsample the plot when using
@@ -918,6 +936,10 @@
def _draw_point(self, renderer, gc, path, path_trans):
+ fs = self.get_fillstyle()
+ if fs!='full':
+raise NotImplementedError('non-full markers have not been
implemented for this marker style yet; please contribute')
+
w = renderer.points_to_pixels(self._markersize) * \
self._point_size_reduction * 0.5
gc.set_snap(renderer.points_to_pixels(self._markersize) > 3.0)
@@ -929,6 +951,10 @@
_draw_pixel_transform = Affine2D().translate(-0.5, -0.5)
def _draw_pixel(self, renderer, gc, path, path_trans):
+ fs = self.get_fillstyle()
+ if fs!='full':
+raise NotImplementedError('non-full markers have not been
implemented for this marker style yet; please contribute')
+
rgbFace = self._get_rgb_face()
gc.set_snap(False)
renderer.draw_markers(gc, Path.unit_rectangle(),
@@ -937,6 +963,10 @@
def _draw_circle(self, renderer, gc, path, path_trans):
+ fs = self.get_fillstyle()
+ if fs!='full':
+raise NotImplementedError('non-full markers have not been
implemented for this marker style yet; please contribute')
+
w = renderer.points_to_pixels(self._markersize) * 0.5
gc.set_snap(renderer.points_to_pixels(self._markersize) > 3.0)
rgbFace = self._get_rgb_face()
@@ -948,6 +978,11 @@
_triangle_path = Path([[0.0, 1.0], [-1.0, -1.0], [1.0, -1.0], [0.0, 1.0]])
def _draw_triangle_up(self, renderer, gc, path, path_trans):
+
+ fs = self.get_fillstyle()
+ if fs!='full':
+raise NotImplementedError('non-full markers have not been
implemented for this marker style yet; please contribute')
+
gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0)
offset = 0.5*renderer.points_to_pixels(self._markersize)
transform = Affine2D().scale(offset, offset)
@@ -957,6 +992,10 @@
def _draw_triangle_down(self, renderer, gc, path, path_trans):
+ fs = self.get_fillstyle()
+ if fs!='full':
+raise NotImplementedError('non-full markers have not been
implemented for this marker style yet; please contribute')
+
gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0)
offset = 0.5*renderer.points_to_pixels(self._markersize)
transform = Affine2D().scale(offset, -offset)
@@ -966,6 +1005,10 @@
def _draw_triangle_left(self, renderer, gc, path, path_trans):
+ fs = self.get_fillstyle()
+
SF.net SVN: matplotlib:[7256] trunk/matplotlib/lib/matplotlib/backends/ backend_wx.py
Revision: 7256
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7256&view=rev
Author: efiring
Date: 2009-07-11 18:06:54 + (Sat, 11 Jul 2009)
Log Message:
---
Yet another iteration on the version checking in backend_wx
Modified Paths:
--
trunk/matplotlib/lib/matplotlib/backends/backend_wx.py
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_wx.py
===
--- trunk/matplotlib/lib/matplotlib/backends/backend_wx.py 2009-07-11
16:52:44 UTC (rev 7255)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_wx.py 2009-07-11
18:06:54 UTC (rev 7256)
@@ -116,28 +116,31 @@
raise ImportError(missingwx)
# Some early versions of wxversion lack AlreadyImportedError.
-if hasattr(wxversion, 'AlreadyImportedError'):
-try:
-wxversion.ensureMinimal('2.8')
-except wxversion.AlreadyImportedError:
-pass
-else:
-warnings.warn(
-"Update your wxversion.py to one including AlreadyImportedError")
-try:
-wxversion.ensureMinimal('2.8')
-except wxversion.VersionError:
-pass
+# It was added around 2.8.4?
+try:
+_wx_ensure_failed = wxversion.AlreadyImportedError
+except AttributeError:
+_wx_ensure_failed = wxversion.VersionError
try:
+wxversion.ensureMinimal('2.8')
+except _wx_ensure_failed:
+pass
+# We don't really want to pass in case of VersionError, but when
+# AlreadyImportedError is not available, we have to.
+
+try:
import wx
backend_version = wx.VERSION_STRING
except ImportError:
raise ImportError(missingwx)
-# Extra version check in case wxversion is broken:
+# Extra version check in case wxversion lacks AlreadyImportedError;
+# then VersionError might have been raised and ignored when
+# there really *is* a problem with the version.
major, minor = [int(n) for n in backend_version.split('.')[:2]]
if major < 2 or (major < 3 and minor < 8):
+print " wxPython version %s was imported." % backend_version
raise ImportError(missingwx)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
--
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib:[7257] trunk/matplotlib/examples/pylab_examples/ centered_ticklabels.py
Revision: 7257
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7257&view=rev
Author: jdh2358
Date: 2009-07-11 20:18:06 + (Sat, 11 Jul 2009)
Log Message:
---
centered ticklabel examples
Added Paths:
---
trunk/matplotlib/examples/pylab_examples/centered_ticklabels.py
Added: trunk/matplotlib/examples/pylab_examples/centered_ticklabels.py
===
--- trunk/matplotlib/examples/pylab_examples/centered_ticklabels.py
(rev 0)
+++ trunk/matplotlib/examples/pylab_examples/centered_ticklabels.py
2009-07-11 20:18:06 UTC (rev 7257)
@@ -0,0 +1,44 @@
+# sometimes it is nice to have ticklabels centered. mpl currently
+# associates a label with a tick, and the label can be aligned
+# 'center', 'feft', or 'right' using the horizontal alignment property:
+#
+#
+# for label in ax.xaxis.get_xticklabels():
+# label.set_horizntal_alignment('right')
+#
+#
+# but this doesn't help center the label between ticks. One solution
+# is to "face it". Use the minor ticks to place a tick centered
+# between the major ticks. Here is an example that labels the months,
+# centered between the ticks
+
+import datetime
+import numpy as np
+import matplotlib
+import matplotlib.dates as dates
+import matplotlib.ticker as ticker
+import matplotlib.pyplot as plt
+
+# load some financial data; apple's stock price
+fh = matplotlib.get_example_data('aapl.npy')
+r = np.load(fh); fh.close()
+r = r[-250:] # get the last 250 days
+
+fig = plt.figure()
+ax = fig.add_subplot(111)
+ax.plot(r.date, r.adj_close)
+
+ax.xaxis.set_major_locator(dates.MonthLocator())
+ax.xaxis.set_minor_locator(dates.MonthLocator(bymonthday=15))
+
+ax.xaxis.set_major_formatter(ticker.NullFormatter())
+ax.xaxis.set_minor_formatter(dates.DateFormatter('%b'))
+
+for tick in ax.xaxis.get_minor_ticks():
+tick.tick1line.set_markersize(0)
+tick.tick2line.set_markersize(0)
+tick.label1.set_horizontalalignment('center')
+
+imid = len(r)/2
+ax.set_xlabel(str(r.date[imid].year))
+plt.show()
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
--
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib:[7258] trunk/matplotlib/lib/matplotlib
Revision: 7258 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7258&view=rev Author: jdh2358 Date: 2009-07-12 03:20:53 + (Sun, 12 Jul 2009) Log Message: --- use png icon on gtk for win32 Modified Paths: -- trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py trunk/matplotlib/lib/matplotlib/lines.py Modified: trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py === --- trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2009-07-11 20:18:06 UTC (rev 7257) +++ trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2009-07-12 03:20:53 UTC (rev 7258) @@ -1148,7 +1148,7 @@ # versions of pygtk, so we have to use a PNG file instead. try: -if gtk.pygtk_version < (2, 8, 0): +if gtk.pygtk_version < (2, 8, 0) or sys.platform == 'win32': icon_filename = 'matplotlib.png' else: icon_filename = 'matplotlib.svg' Modified: trunk/matplotlib/lib/matplotlib/lines.py === --- trunk/matplotlib/lib/matplotlib/lines.py2009-07-11 20:18:06 UTC (rev 7257) +++ trunk/matplotlib/lib/matplotlib/lines.py2009-07-12 03:20:53 UTC (rev 7258) @@ -335,10 +335,10 @@ def set_fillstyle(self, fs): """ -Set the marker fill style; full means fill the whole marker. -The other options are for half fills +Set the marker fill style; 'full' means fill the whole marker. +The other options are for half filled markers -ACCEPTS: string ['full' | 'left' | 'right' | 'bottom' | 'top'] +ACCEPTS: ['full' | 'left' | 'right' | 'bottom' | 'top'] """ assert fs in ['full', 'left' , 'right' , 'bottom' , 'top'] self._fillstyle = fs This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Matplotlib-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
