SF.net SVN: matplotlib: [5284] trunk/matplotlib
Revision: 5284
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5284&view=rev
Author: mdboom
Date: 2008-05-28 06:36:50 -0700 (Wed, 28 May 2008)
Log Message:
---
Merged revisions 5276-5283 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_91_maint
r5283 | mdboom | 2008-05-28 09:31:39 -0400 (Wed, 28 May 2008) | 4 lines
Fix rendering of composite glyphs in Type 3 conversion (particularly
as evidenced in the Eunjin.ttf Korean font) Thanks Jae-Joon Lee for
finding this!
Modified Paths:
--
trunk/matplotlib/CHANGELOG
trunk/matplotlib/ttconv/pprdrv_tt2.cpp
Property Changed:
trunk/matplotlib/
Property changes on: trunk/matplotlib
___
Name: svnmerge-integrated
- /branches/v0_91_maint:1-5275
+ /branches/v0_91_maint:1-5283
Modified: trunk/matplotlib/CHANGELOG
===
--- trunk/matplotlib/CHANGELOG 2008-05-28 13:31:39 UTC (rev 5283)
+++ trunk/matplotlib/CHANGELOG 2008-05-28 13:36:50 UTC (rev 5284)
@@ -1,3 +1,7 @@
+2008-05-28 Fix rendering of composite glyphs in Type 3 conversion
+ (particularly as evidenced in the Eunjin.ttf Korean font)
+ Thanks Jae-Joon Lee for finding this!
+
2008-05-27 Rewrote the cm.ScalarMappable callback infrastructure to
use cbook.CallbackRegistry rather than custom callback
handling. Amy users of add_observer/notify of the
Modified: trunk/matplotlib/ttconv/pprdrv_tt2.cpp
===
--- trunk/matplotlib/ttconv/pprdrv_tt2.cpp 2008-05-28 13:31:39 UTC (rev
5283)
+++ trunk/matplotlib/ttconv/pprdrv_tt2.cpp 2008-05-28 13:36:50 UTC (rev
5284)
@@ -531,8 +531,8 @@
}
else/* The tt spec. does not clearly indicate */
{ /* whether these values are signed or not. */
- arg1 = *(glyph++);
- arg2 = *(glyph++);
+ arg1 = *(signed char *)(glyph++);
+ arg2 = *(signed char *)(glyph++);
}
if(flags & WE_HAVE_A_SCALE)
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 2008.
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: [5283] branches/v0_91_maint
Revision: 5283
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5283&view=rev
Author: mdboom
Date: 2008-05-28 06:31:39 -0700 (Wed, 28 May 2008)
Log Message:
---
Fix rendering of composite glyphs in Type 3 conversion (particularly
as evidenced in the Eunjin.ttf Korean font) Thanks Jae-Joon Lee for
finding this!
Modified Paths:
--
branches/v0_91_maint/CHANGELOG
branches/v0_91_maint/ttconv/pprdrv_tt2.cpp
Modified: branches/v0_91_maint/CHANGELOG
===
--- branches/v0_91_maint/CHANGELOG 2008-05-28 03:16:35 UTC (rev 5282)
+++ branches/v0_91_maint/CHANGELOG 2008-05-28 13:31:39 UTC (rev 5283)
@@ -1,3 +1,7 @@
+2008-05-28 Fix rendering of composite glyphs in Type 3 conversion
+ (particularly as evidenced in the Eunjin.ttf Korean font)
+ Thanks Jae-Joon Lee for finding this!
+
2008-05-21 Fix segfault in TkAgg backend - MGD
2008-05-21 Fix a "local variable unreferenced" bug in plotfile - MM
Modified: branches/v0_91_maint/ttconv/pprdrv_tt2.cpp
===
--- branches/v0_91_maint/ttconv/pprdrv_tt2.cpp 2008-05-28 03:16:35 UTC (rev
5282)
+++ branches/v0_91_maint/ttconv/pprdrv_tt2.cpp 2008-05-28 13:31:39 UTC (rev
5283)
@@ -531,8 +531,8 @@
}
else/* The tt spec. does not clearly indicate */
{ /* whether these values are signed or not. */
- arg1 = *(glyph++);
- arg2 = *(glyph++);
+ arg1 = *(signed char *)(glyph++);
+ arg2 = *(signed char *)(glyph++);
}
if(flags & WE_HAVE_A_SCALE)
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 2008.
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: [5285] trunk/matplotlib
Revision: 5285 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5285&view=rev Author: jdh2358 Date: 2008-05-28 07:39:23 -0700 (Wed, 28 May 2008) Log Message: --- zero area rects no longer influence auto-scaling Modified Paths: -- trunk/matplotlib/API_CHANGES trunk/matplotlib/CHANGELOG trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/API_CHANGES === --- trunk/matplotlib/API_CHANGES2008-05-28 13:36:50 UTC (rev 5284) +++ trunk/matplotlib/API_CHANGES2008-05-28 14:39:23 UTC (rev 5285) @@ -1,3 +1,4 @@ + Rewrote the cm.ScalarMappable callback infrastructure to use cbook.CallbackRegistry rather than custom callback handling. Amy users of add_observer/notify of the cm.ScalarMappable should uae Modified: trunk/matplotlib/CHANGELOG === --- trunk/matplotlib/CHANGELOG 2008-05-28 13:36:50 UTC (rev 5284) +++ trunk/matplotlib/CHANGELOG 2008-05-28 14:39:23 UTC (rev 5285) @@ -1,3 +1,7 @@ +2008-05-28 zero width/height Rectangles no longer influence the + autoscaler. Useful for log histograms with empty bins - + JDH + 2008-05-28 Fix rendering of composite glyphs in Type 3 conversion (particularly as evidenced in the Eunjin.ttf Korean font) Thanks Jae-Joon Lee for finding this! Modified: trunk/matplotlib/lib/matplotlib/axes.py === --- trunk/matplotlib/lib/matplotlib/axes.py 2008-05-28 13:36:50 UTC (rev 5284) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-05-28 14:39:23 UTC (rev 5285) @@ -1230,10 +1230,18 @@ def _update_patch_limits(self, p): 'update the datalimits for patch p' +# hist can add zero height Rectangles, which is useful to keep +# the bins, counts and patches lined up, but it throws off log +# scaling. We'll ignore rects with zero height or width in +# the auto-scaling +if isinstance(p, mpatches.Rectangle) and p.get_width()==0. or p.get_height()==0.: +return + vertices = p.get_patch_transform().transform(p.get_path().vertices) if p.get_data_transform() != self.transData: transform = p.get_data_transform() + self.transData.inverted() xys = transform.transform(vertices) + self.update_datalim(vertices) def add_table(self, tab): @@ -3509,14 +3517,15 @@ if adjust_xlim: xmin, xmax = self.dataLim.intervalx -xmin = np.amin(width) +xmin = np.amin(width[width!=0]) # filter out the 0 width rects if xerr is not None: xmin = xmin - np.amax(xerr) xmin = max(xmin*0.9, 1e-100) self.dataLim.intervalx = (xmin, xmax) + if adjust_ylim: ymin, ymax = self.dataLim.intervaly -ymin = np.amin(height) +ymin = np.amin(height[height!=0]) # filter out the 0 height rects if yerr is not None: ymin = ymin - np.amax(yerr) ymin = max(ymin*0.9, 1e-100) @@ -5501,7 +5510,10 @@ width. If None, automatically compute the width. Ignored for 'step' histtype. -log: if True, the histogram axis will be set to a log scale +log: if True, the histogram axis will be set to a log scale. +If log is true and x is a 1D array, empty bins will be +filtered out and only the non-empty n, bins, patches will be +returned. kwargs are used to update the properties of the hist Rectangles: @@ -5587,6 +5599,7 @@ ccount += 1 elif orientation == 'vertical': for m in n: + color = colors[ccount % len(colors)] patch = self.bar(bins[:-1]+boffset, m, width=width, bottom=bottom, align='center', log=log, 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 2008. 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: [5286] trunk/matplotlib/lib/matplotlib/axes.py
Revision: 5286 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5286&view=rev Author: jdh2358 Date: 2008-05-28 08:33:03 -0700 (Wed, 28 May 2008) Log Message: --- fixed an and/or bug in patch limits Modified Paths: -- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py === --- trunk/matplotlib/lib/matplotlib/axes.py 2008-05-28 14:39:23 UTC (rev 5285) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-05-28 15:33:03 UTC (rev 5286) @@ -1234,7 +1234,7 @@ # the bins, counts and patches lined up, but it throws off log # scaling. We'll ignore rects with zero height or width in # the auto-scaling -if isinstance(p, mpatches.Rectangle) and p.get_width()==0. or p.get_height()==0.: +if isinstance(p, mpatches.Rectangle) and p.get_width()==0. and p.get_height()==0.: return vertices = p.get_patch_transform().transform(p.get_path().vertices) 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 2008. 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: [5287] trunk/matplotlib
Revision: 5287
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5287&view=rev
Author: jdh2358
Date: 2008-05-28 09:41:21 -0700 (Wed, 28 May 2008)
Log Message:
---
use unicode minus rather than hyphen
Modified Paths:
--
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/ticker.py
Modified: trunk/matplotlib/CHANGELOG
===
--- trunk/matplotlib/CHANGELOG 2008-05-28 15:33:03 UTC (rev 5286)
+++ trunk/matplotlib/CHANGELOG 2008-05-28 16:41:21 UTC (rev 5287)
@@ -1,3 +1,6 @@
+2008-05-28 Replaced '-' with u'\u2212' for minus sign as requested in
+
http://sourceforge.net/tracker/index.php?func=detail&aid=1962574&group_id=80706&atid=560720
+
2008-05-28 zero width/height Rectangles no longer influence the
autoscaler. Useful for log histograms with empty bins -
JDH
Modified: trunk/matplotlib/lib/matplotlib/ticker.py
===
--- trunk/matplotlib/lib/matplotlib/ticker.py 2008-05-28 15:33:03 UTC (rev
5286)
+++ trunk/matplotlib/lib/matplotlib/ticker.py 2008-05-28 16:41:21 UTC (rev
5287)
@@ -408,7 +408,7 @@
def pprint_val(self, x):
xp = (x-self.offset)/10**self.orderOfMagnitude
if np.absolute(xp) < 1e-8: xp = 0
-return self.format % xp
+return (self.format % xp).replace('-', u'\u2212')
def _formatSciNotation(self, s):
# transform 1e+004 into 1e4, for example
@@ -422,13 +422,13 @@
# reformat 1x10^y as 10^y
significand = ''
if exponent:
-exponent = '10^{%s%s}'%(sign, exponent)
+exponent = u'10^{%s%s}'%(sign, exponent)
if significand and exponent:
return r'%s{\times}%s'%(significand, exponent)
else:
return r'%s%s'%(significand, exponent)
else:
-return ('%se%s%s' %(significand, sign, exponent)).rstrip('e')
+return (u'%se%s%s' %(significand, sign.replace('-',
u'\u2212'), exponent)).rstrip('e')
except IndexError, msg:
return s
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 2008.
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: [5288] trunk/matplotlib
Revision: 5288
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5288&view=rev
Author: jdh2358
Date: 2008-05-28 09:44:32 -0700 (Wed, 28 May 2008)
Log Message:
---
reverting due to PDF problem
Modified Paths:
--
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/ticker.py
Modified: trunk/matplotlib/CHANGELOG
===
--- trunk/matplotlib/CHANGELOG 2008-05-28 16:41:21 UTC (rev 5287)
+++ trunk/matplotlib/CHANGELOG 2008-05-28 16:44:32 UTC (rev 5288)
@@ -1,4 +1,5 @@
-2008-05-28 Replaced '-' with u'\u2212' for minus sign as requested in
+2008-05-28 REVERTING due to PDF problem. Replaced '-' with u'\u2212'
+ for minus sign as requested in
http://sourceforge.net/tracker/index.php?func=detail&aid=1962574&group_id=80706&atid=560720
2008-05-28 zero width/height Rectangles no longer influence the
Modified: trunk/matplotlib/lib/matplotlib/ticker.py
===
--- trunk/matplotlib/lib/matplotlib/ticker.py 2008-05-28 16:41:21 UTC (rev
5287)
+++ trunk/matplotlib/lib/matplotlib/ticker.py 2008-05-28 16:44:32 UTC (rev
5288)
@@ -408,7 +408,8 @@
def pprint_val(self, x):
xp = (x-self.offset)/10**self.orderOfMagnitude
if np.absolute(xp) < 1e-8: xp = 0
-return (self.format % xp).replace('-', u'\u2212')
+#return (self.format % xp).replace('-', u'\u2212') # crashes PDF
+return self.format % xp
def _formatSciNotation(self, s):
# transform 1e+004 into 1e4, for example
@@ -428,7 +429,8 @@
else:
return r'%s%s'%(significand, exponent)
else:
-return (u'%se%s%s' %(significand, sign.replace('-',
u'\u2212'), exponent)).rstrip('e')
+sign = sign.replace('-', u'\u2212') # crashes PDF
+return ('%se%s%s' %(significand, sign, exponent)).rstrip('e')
except IndexError, msg:
return s
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 2008.
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: [5289] trunk/matplotlib/lib/matplotlib/ticker.py
Revision: 5289
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5289&view=rev
Author: jdh2358
Date: 2008-05-28 09:46:53 -0700 (Wed, 28 May 2008)
Log Message:
---
reverting due to PDF problem
Modified Paths:
--
trunk/matplotlib/lib/matplotlib/ticker.py
Modified: trunk/matplotlib/lib/matplotlib/ticker.py
===
--- trunk/matplotlib/lib/matplotlib/ticker.py 2008-05-28 16:44:32 UTC (rev
5288)
+++ trunk/matplotlib/lib/matplotlib/ticker.py 2008-05-28 16:46:53 UTC (rev
5289)
@@ -429,7 +429,7 @@
else:
return r'%s%s'%(significand, exponent)
else:
-sign = sign.replace('-', u'\u2212') # crashes PDF
+#sign = sign.replace('-', u'\u2212') # crashes PDF
return ('%se%s%s' %(significand, sign, exponent)).rstrip('e')
except IndexError, msg:
return s
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 2008.
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: [5290] trunk/matplotlib/lib/matplotlib/ticker.py
Revision: 5290
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5290&view=rev
Author: jdh2358
Date: 2008-05-28 09:51:39 -0700 (Wed, 28 May 2008)
Log Message:
---
reverting due to PDF problem
Modified Paths:
--
trunk/matplotlib/lib/matplotlib/ticker.py
Modified: trunk/matplotlib/lib/matplotlib/ticker.py
===
--- trunk/matplotlib/lib/matplotlib/ticker.py 2008-05-28 16:46:53 UTC (rev
5289)
+++ trunk/matplotlib/lib/matplotlib/ticker.py 2008-05-28 16:51:39 UTC (rev
5290)
@@ -423,7 +423,7 @@
# reformat 1x10^y as 10^y
significand = ''
if exponent:
-exponent = u'10^{%s%s}'%(sign, exponent)
+exponent = '10^{%s%s}'%(sign, exponent)
if significand and exponent:
return r'%s{\times}%s'%(significand, exponent)
else:
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 2008.
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: [5291] trunk/matplotlib/lib/matplotlib/axes.py
Revision: 5291 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5291&view=rev Author: jdh2358 Date: 2008-05-28 10:00:15 -0700 (Wed, 28 May 2008) Log Message: --- fixed patch rect area zero bug -- finally! Modified Paths: -- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py === --- trunk/matplotlib/lib/matplotlib/axes.py 2008-05-28 16:51:39 UTC (rev 5290) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-05-28 17:00:15 UTC (rev 5291) @@ -1234,7 +1234,7 @@ # the bins, counts and patches lined up, but it throws off log # scaling. We'll ignore rects with zero height or width in # the auto-scaling -if isinstance(p, mpatches.Rectangle) and p.get_width()==0. and p.get_height()==0.: +if isinstance(p, mpatches.Rectangle) and (p.get_width()==0. or p.get_height()==0.): return vertices = p.get_patch_transform().transform(p.get_path().vertices) 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 2008. 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: [5292] branches/v0_91_maint
Revision: 5292
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5292&view=rev
Author: jdh2358
Date: 2008-05-28 11:03:15 -0700 (Wed, 28 May 2008)
Log Message:
---
added keywords to configure sliders for sf patch 1866207
Modified Paths:
--
branches/v0_91_maint/CHANGELOG
branches/v0_91_maint/examples/logo.py
branches/v0_91_maint/examples/widgets/sliders.py
branches/v0_91_maint/lib/matplotlib/widgets.py
Modified: branches/v0_91_maint/CHANGELOG
===
--- branches/v0_91_maint/CHANGELOG 2008-05-28 17:00:15 UTC (rev 5291)
+++ branches/v0_91_maint/CHANGELOG 2008-05-28 18:03:15 UTC (rev 5292)
@@ -1,3 +1,8 @@
+2008-05-28 Allow keyword args to configure widget properties as
+ requested in
+
http://sourceforge.net/tracker/index.php?func=detail&aid=1866207&group_id=80706&atid=560722
+ - JDH
+
2008-05-28 Fix rendering of composite glyphs in Type 3 conversion
(particularly as evidenced in the Eunjin.ttf Korean font)
Thanks Jae-Joon Lee for finding this!
Modified: branches/v0_91_maint/examples/logo.py
===
--- branches/v0_91_maint/examples/logo.py 2008-05-28 17:00:15 UTC (rev
5291)
+++ branches/v0_91_maint/examples/logo.py 2008-05-28 18:03:15 UTC (rev
5292)
@@ -8,7 +8,7 @@
file('data/membrane.dat', 'rb').read(), float32)
# 0.0005 is the sample interval
t = 0.0005*arange(len(x))
-figure(1, figsize=(7,1), dpi=100)
+figure(1, figsize=(4,1), dpi=70)
ax = subplot(111, axisbg='y')
plot(t, x)
text(0.5, 0.5,'matplotlib', color='r',
@@ -20,5 +20,5 @@
axis([1, 1.72,-60, 10])
setp(gca(), 'xticklabels', [])
setp(gca(), 'yticklabels', [])
-#savefig('logo2.png', dpi=300)
+savefig('logo2.png', dpi=70)
show()
Modified: branches/v0_91_maint/examples/widgets/sliders.py
===
--- branches/v0_91_maint/examples/widgets/sliders.py2008-05-28 17:00:15 UTC
(rev 5291)
+++ branches/v0_91_maint/examples/widgets/sliders.py2008-05-28 18:03:15 UTC
(rev 5292)
@@ -12,8 +12,8 @@
axfreq = axes([0.125, 0.1, 0.775, 0.03], axisbg=axcolor)
axamp = axes([0.125, 0.15, 0.775, 0.03], axisbg=axcolor)
-sfreq = Slider(axfreq, 'Freq', 0.1, 30.0, valinit=1)
-samp = Slider(axamp, 'Amp', 0.1, 10.0, valinit=1)
+sfreq = Slider(axfreq, 'Freq', 0.1, 30.0, valinit=1, facecolor='blue',
alpha=0.5)
+samp = Slider(axamp, 'Amp', 0.1, 10.0, valinit=1, facecolor='red', alpha=0.5)
def update(val):
amp = samp.val
Modified: branches/v0_91_maint/lib/matplotlib/widgets.py
===
--- branches/v0_91_maint/lib/matplotlib/widgets.py 2008-05-28 17:00:15 UTC
(rev 5291)
+++ branches/v0_91_maint/lib/matplotlib/widgets.py 2008-05-28 18:03:15 UTC
(rev 5292)
@@ -171,7 +171,7 @@
"""
def __init__(self, ax, label, valmin, valmax, valinit=0.5, valfmt='%1.2f',
closedmin=True, closedmax=True, slidermin=None,
slidermax=None,
- dragging=True):
+ dragging=True, **kwargs):
"""
Create a slider from valmin to valmax in axes ax;
@@ -185,6 +185,11 @@
slidermin and slidermax - be used to contrain the value of
this slider to the values of other sliders.
+
+additional kwargs are passed on to self.poly which is the
+matplotlib.patches.Rectangle which draws the slider. See the
+matplotlib.patches.Rectangle documentation for legal property
+names (eg facecolor, edgecolor, alpha, ...)
"""
self.ax = ax
@@ -192,7 +197,7 @@
self.valmax = valmax
self.val = valinit
self.valinit = valinit
-self.poly = ax.axvspan(valmin,valinit,0,1)
+self.poly = ax.axvspan(valmin,valinit,0,1, **kwargs)
self.vline = ax.axvline(valinit,0,1, color='r', lw=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: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
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: [5293] branches/v0_91_maint/lib/matplotlib/backends /backend_pdf.py
Revision: 5293
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5293&view=rev
Author: mdboom
Date: 2008-05-28 11:13:05 -0700 (Wed, 28 May 2008)
Log Message:
---
Fix PDFs that crash xpdf and ghostscript when two-byte codepoints are
used with Type 3 fonts.
Modified Paths:
--
branches/v0_91_maint/lib/matplotlib/backends/backend_pdf.py
Modified: branches/v0_91_maint/lib/matplotlib/backends/backend_pdf.py
===
--- branches/v0_91_maint/lib/matplotlib/backends/backend_pdf.py 2008-05-28
18:03:15 UTC (rev 5292)
+++ branches/v0_91_maint/lib/matplotlib/backends/backend_pdf.py 2008-05-28
18:13:05 UTC (rev 5293)
@@ -713,6 +713,7 @@
charprocDict['Type'] = Name('XObject')
charprocDict['Subtype'] = Name('Form')
charprocDict['BBox'] = bbox
+stream = stream[stream.find("d1") + 2:]
charprocObject = self.reserveObject('charProc')
self.beginStream(charprocObject.id, None, charprocDict)
self.currentstream.write(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 2008.
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: [5294] branches/v0_91_maint
Revision: 5294
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5294&view=rev
Author: mdboom
Date: 2008-05-28 11:19:30 -0700 (Wed, 28 May 2008)
Log Message:
---
Adding CHANGELOG entry and scary comment about what was going wrong.
Modified Paths:
--
branches/v0_91_maint/CHANGELOG
branches/v0_91_maint/lib/matplotlib/backends/backend_pdf.py
Modified: branches/v0_91_maint/CHANGELOG
===
--- branches/v0_91_maint/CHANGELOG 2008-05-28 18:13:05 UTC (rev 5293)
+++ branches/v0_91_maint/CHANGELOG 2008-05-28 18:19:30 UTC (rev 5294)
@@ -1,3 +1,6 @@
+2008-05-28 Fix crashing of PDFs in xpdf and ghostscript when two-byte
+ characters are used with Type 3 fonts - MGD
+
2008-05-28 Allow keyword args to configure widget properties as
requested in
http://sourceforge.net/tracker/index.php?func=detail&aid=1866207&group_id=80706&atid=560722
Modified: branches/v0_91_maint/lib/matplotlib/backends/backend_pdf.py
===
--- branches/v0_91_maint/lib/matplotlib/backends/backend_pdf.py 2008-05-28
18:13:05 UTC (rev 5293)
+++ branches/v0_91_maint/lib/matplotlib/backends/backend_pdf.py 2008-05-28
18:19:30 UTC (rev 5294)
@@ -713,6 +713,12 @@
charprocDict['Type'] = Name('XObject')
charprocDict['Subtype'] = Name('Form')
charprocDict['BBox'] = bbox
+# Each glyph includes bounding box information,
+# but xpdf and ghostscript can't handle it in a
+# Form XObject (they segfault!!!), so we remove it
+# from the stream here. It's not needed anyway,
+# since the Form XObject includes it in its BBox
+# value.
stream = stream[stream.find("d1") + 2:]
charprocObject = self.reserveObject('charProc')
self.beginStream(charprocObject.id, None, charprocDict)
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 2008.
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: [5295] trunk/matplotlib
Revision: 5295
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5295&view=rev
Author: mdboom
Date: 2008-05-28 11:22:39 -0700 (Wed, 28 May 2008)
Log Message:
---
Merged revisions 5284-5294 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_91_maint
r5292 | jdh2358 | 2008-05-28 14:03:15 -0400 (Wed, 28 May 2008) | 1 line
added keywords to configure sliders for sf patch 1866207
r5293 | mdboom | 2008-05-28 14:13:05 -0400 (Wed, 28 May 2008) | 3 lines
Fix PDFs that crash xpdf and ghostscript when two-byte codepoints are
used with Type 3 fonts.
r5294 | mdboom | 2008-05-28 14:19:30 -0400 (Wed, 28 May 2008) | 2 lines
Adding CHANGELOG entry and scary comment about what was going wrong.
Modified Paths:
--
trunk/matplotlib/CHANGELOG
trunk/matplotlib/examples/widgets/sliders.py
trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py
trunk/matplotlib/lib/matplotlib/widgets.py
Property Changed:
trunk/matplotlib/
Property changes on: trunk/matplotlib
___
Name: svnmerge-integrated
- /branches/v0_91_maint:1-5283
+ /branches/v0_91_maint:1-5294
Modified: trunk/matplotlib/CHANGELOG
===
--- trunk/matplotlib/CHANGELOG 2008-05-28 18:19:30 UTC (rev 5294)
+++ trunk/matplotlib/CHANGELOG 2008-05-28 18:22:39 UTC (rev 5295)
@@ -1,3 +1,11 @@
+2008-05-28 Fix crashing of PDFs in xpdf and ghostscript when two-byte
+ characters are used with Type 3 fonts - MGD
+
+2008-05-28 Allow keyword args to configure widget properties as
+ requested in
+
http://sourceforge.net/tracker/index.php?func=detail&aid=1866207&group_id=80706&atid=560722
+ - JDH
+
2008-05-28 REVERTING due to PDF problem. Replaced '-' with u'\u2212'
for minus sign as requested in
http://sourceforge.net/tracker/index.php?func=detail&aid=1962574&group_id=80706&atid=560720
Modified: trunk/matplotlib/examples/widgets/sliders.py
===
--- trunk/matplotlib/examples/widgets/sliders.py2008-05-28 18:19:30 UTC
(rev 5294)
+++ trunk/matplotlib/examples/widgets/sliders.py2008-05-28 18:22:39 UTC
(rev 5295)
@@ -12,8 +12,8 @@
axfreq = axes([0.125, 0.1, 0.775, 0.03], axisbg=axcolor)
axamp = axes([0.125, 0.15, 0.775, 0.03], axisbg=axcolor)
-sfreq = Slider(axfreq, 'Freq', 0.1, 30.0, valinit=1)
-samp = Slider(axamp, 'Amp', 0.1, 10.0, valinit=1)
+sfreq = Slider(axfreq, 'Freq', 0.1, 30.0, valinit=1, facecolor='blue',
alpha=0.5)
+samp = Slider(axamp, 'Amp', 0.1, 10.0, valinit=1, facecolor='red', alpha=0.5)
def update(val):
amp = samp.val
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py
===
--- trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py 2008-05-28
18:19:30 UTC (rev 5294)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py 2008-05-28
18:22:39 UTC (rev 5295)
@@ -719,6 +719,13 @@
charprocDict['Type'] = Name('XObject')
charprocDict['Subtype'] = Name('Form')
charprocDict['BBox'] = bbox
+# Each glyph includes bounding box information,
+# but xpdf and ghostscript can't handle it in a
+# Form XObject (they segfault!!!), so we remove it
+# from the stream here. It's not needed anyway,
+# since the Form XObject includes it in its BBox
+# value.
+stream = stream[stream.find("d1") + 2:]
charprocObject = self.reserveObject('charProc')
self.beginStream(charprocObject.id, None, charprocDict)
self.currentstream.write(stream)
Modified: trunk/matplotlib/lib/matplotlib/widgets.py
===
--- trunk/matplotlib/lib/matplotlib/widgets.py 2008-05-28 18:19:30 UTC (rev
5294)
+++ trunk/matplotlib/lib/matplotlib/widgets.py 2008-05-28 18:22:39 UTC (rev
5295)
@@ -171,7 +171,7 @@
"""
def __init__(self, ax, label, valmin, valmax, valinit=0.5, valfmt='%1.2f',
closedmin=True, closedmax=True, slidermin=None,
slidermax=None,
- dragging=True):
+ dragging=True, **kwargs):
"""
Create a slider from valmin to valmax in axes ax;
@@ -185,6 +185,11 @@
slidermin and slidermax - be used to contrain the value of
this slider to the values of other sliders.
+
+additional kwargs are passed on to self.poly which is the
+matplotlib.patches.Rectangle which draws the slider. See the
+matplotlib.patches.Rectangle documentation for legal property
+names (
SF.net SVN: matplotlib: [5296] trunk/matplotlib
Revision: 5296
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5296&view=rev
Author: jdh2358
Date: 2008-05-28 11:39:05 -0700 (Wed, 28 May 2008)
Log Message:
---
readded minus/hyphen patch now that Michael has fixed PDF unicode
Modified Paths:
--
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/ticker.py
Modified: trunk/matplotlib/CHANGELOG
===
--- trunk/matplotlib/CHANGELOG 2008-05-28 18:22:39 UTC (rev 5295)
+++ trunk/matplotlib/CHANGELOG 2008-05-28 18:39:05 UTC (rev 5296)
@@ -6,8 +6,7 @@
http://sourceforge.net/tracker/index.php?func=detail&aid=1866207&group_id=80706&atid=560722
- JDH
-2008-05-28 REVERTING due to PDF problem. Replaced '-' with u'\u2212'
- for minus sign as requested in
+2008-05-28 Replaced '-' with u'\u2212' for minus sign as requested in
http://sourceforge.net/tracker/index.php?func=detail&aid=1962574&group_id=80706&atid=560720
2008-05-28 zero width/height Rectangles no longer influence the
Modified: trunk/matplotlib/lib/matplotlib/ticker.py
===
--- trunk/matplotlib/lib/matplotlib/ticker.py 2008-05-28 18:22:39 UTC (rev
5295)
+++ trunk/matplotlib/lib/matplotlib/ticker.py 2008-05-28 18:39:05 UTC (rev
5296)
@@ -175,6 +175,23 @@
def set_locs(self, locs):
self.locs = locs
+def fix_minus(self, s):
+"""
+some classes may want to replace a hyphen for minus with the
+proper unicode symbol as described here
+
+
http://sourceforge.net/tracker/index.php?func=detail&aid=1962574&group_id=80706&atid=560720.
+The default is to do nothing
+
+Note, if you use this method, eg in format_data or call, you
+probably don't want to use it for format_data_short since the
+toolbar uses this for interative coord reporting and I doubt
+we can expect GUIs across platforms will handle the unicode
+correctly. So for now the classes that override fix_minus
+should have an explicit format_data_short method
+"""
+return s
+
class NullFormatter(Formatter):
'Always return the empty string'
def __call__(self, x, pos=None):
@@ -270,6 +287,7 @@
such that the tick labels are meaningful. Scientific notation is used for
data < 1e-3 or data >= 1e4.
"""
+
def __init__(self, useOffset=True, useMathText=False):
# useOffset allows plotting small data ranges with large offsets:
# for example: [1+1e-9,1+2e-9,1+3e-9]
@@ -283,12 +301,17 @@
self._scientific = True
self._powerlimits = rcParams['axes.formatter.limits']
+def fix_minus(self, s):
+'use a unicode minus rather than hyphen'
+return s.replace('-', u'\u2212')
+
def __call__(self, x, pos=None):
'Return the format for tick val x at position pos'
if len(self.locs)==0:
return ''
else:
-return self.pprint_val(x)
+s = self.pprint_val(x)
+return self.fix_minus(s)
def set_scientific(self, b):
'''True or False to turn scientific notation on or off
@@ -314,11 +337,14 @@
def format_data(self,value):
'return a formatted string representation of a number'
-return self._formatSciNotation('%1.10e'% value)
+s = self._formatSciNotation('%1.10e'% value)
+return self.fix_minus(s)
+
def get_offset(self):
"""Return scientific notation, plus offset"""
if len(self.locs)==0: return ''
+s = ''
if self.orderOfMagnitude or self.offset:
offsetStr = ''
sciNotStr = ''
@@ -333,14 +359,15 @@
if self._useMathText:
if sciNotStr != '':
sciNotStr = r'\times\mathdefault{%s}' % sciNotStr
-return ''.join(('$',sciNotStr,r'\mathdefault{',offsetStr,'}$'))
+s = ''.join(('$',sciNotStr,r'\mathdefault{',offsetStr,'}$'))
elif self._usetex:
if sciNotStr != '':
sciNotStr = r'\times%s' % sciNotStr
-return ''.join(('$',sciNotStr,offsetStr,'$'))
+s = ''.join(('$',sciNotStr,offsetStr,'$'))
else:
-return ''.join((sciNotStr,offsetStr))
-else: return ''
+s = ''.join((sciNotStr,offsetStr))
+
+return self.fix_minus(s)
def set_locs(self, locs):
'set the locations of the ticks'
@@ -408,7 +435,6 @@
def pprint_val(self, x):
xp = (x-self.offset)/10**self.orderOfMagnitude
if np.absolute(xp) < 1e-8: xp = 0
-#return (self.format % xp).replace('-', u'\u2212') # crashes PDF
return self.format % xp
def _formatSciNotation(self, s):
@@ -429,8 +455,8 @@
else
