You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(115) |
Aug
(120) |
Sep
(137) |
Oct
(170) |
Nov
(461) |
Dec
(263) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(120) |
Feb
(74) |
Mar
(35) |
Apr
(74) |
May
(245) |
Jun
(356) |
Jul
(240) |
Aug
(115) |
Sep
(78) |
Oct
(225) |
Nov
(98) |
Dec
(271) |
| 2009 |
Jan
(132) |
Feb
(84) |
Mar
(74) |
Apr
(56) |
May
(90) |
Jun
(79) |
Jul
(83) |
Aug
(296) |
Sep
(214) |
Oct
(76) |
Nov
(82) |
Dec
(66) |
| 2010 |
Jan
(46) |
Feb
(58) |
Mar
(51) |
Apr
(77) |
May
(58) |
Jun
(126) |
Jul
(128) |
Aug
(64) |
Sep
(50) |
Oct
(44) |
Nov
(48) |
Dec
(54) |
| 2011 |
Jan
(68) |
Feb
(52) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <cm...@us...> - 2009-04-11 02:24:40
|
Revision: 7037
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7037&view=rev
Author: cmoad
Date: 2009-04-11 02:24:37 +0000 (Sat, 11 Apr 2009)
Log Message:
-----------
added python 2.6 / tcltk 8.5 check
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-04-06 19:05:57 UTC (rev 7036)
+++ branches/v0_98_5_maint/setupext.py 2009-04-11 02:24:37 UTC (rev 7037)
@@ -958,11 +958,14 @@
message = None
if sys.platform == 'win32':
major, minor1, minor2, s, tmp = sys.version_info
- if major == 2 and minor1 in [3, 4, 5]:
- module.include_dirs.extend(['win32_static/include/tcl8.4'])
+ if major == 2 and minor1 == 6:
+ module.include_dirs.extend(['win32_static/include/tcl85'])
+ module.libraries.extend(['tk85', 'tcl85'])
+ elif major == 2 and minor1 in [3, 4, 5]:
+ module.include_dirs.extend(['win32_static/include/tcl84'])
module.libraries.extend(['tk84', 'tcl84'])
elif major == 2 and minor1 == 2:
- module.include_dirs.extend(['win32_static/include/tcl8.3'])
+ module.include_dirs.extend(['win32_static/include/tcl83'])
module.libraries.extend(['tk83', 'tcl83'])
else:
raise RuntimeError('No tk/win32 support for this python version yet')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2009-04-06 19:06:03
|
Revision: 7036
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7036&view=rev
Author: jouni
Date: 2009-04-06 19:05:57 +0000 (Mon, 06 Apr 2009)
Log Message:
-----------
Merged revisions 7035 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r7035 | jouni | 2009-04-06 21:59:47 +0300 (Mon, 06 Apr 2009) | 1 line
The pdf backend now escapes newlines and linefeeds in strings - fixes #2708559
........
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/examples/pylab_examples/usetex_demo.py
trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py
Property Changed:
----------------
trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
trunk/matplotlib/doc/sphinxext/gen_gallery.py
trunk/matplotlib/doc/sphinxext/gen_rst.py
trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7033
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7035
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2009-04-06 18:59:47 UTC (rev 7035)
+++ trunk/matplotlib/CHANGELOG 2009-04-06 19:05:57 UTC (rev 7036)
@@ -1,3 +1,6 @@
+2009-04-06 The pdf backend now escapes newlines and linefeeds in strings.
+ Fixes sf bug #2708559; thanks to Tiago Pereira for the report.
+
2009-04-06 texmanager.make_dvi now raises an error if LaTeX failed to
create an output file. Thanks to Joao Luis Silva for reporting
this. - JKS
Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033
+ /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035
Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033
+ /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035
Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033
+ /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035
Modified: trunk/matplotlib/examples/pylab_examples/usetex_demo.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/usetex_demo.py 2009-04-06 18:59:47 UTC (rev 7035)
+++ trunk/matplotlib/examples/pylab_examples/usetex_demo.py 2009-04-06 19:05:57 UTC (rev 7036)
@@ -56,4 +56,8 @@
## phase field equations
pylab.text(0.2, 0.15, r'$\mathcal{F} = \int f\left( \phi, c \right) dV,$ \newline $ \frac{ \partial \phi } { \partial t } = -M_{ \phi } \frac{ \delta \mathcal{F} } { \delta \phi }$', {'color' : 'b', 'fontsize' : 20})
+## these went wrong in pdf in a previous version
+pylab.text(-.9,.42,r'gamma: $\gamma$', {'color': 'r', 'fontsize': 20})
+pylab.text(-.9,.36,r'Omega: $\Omega$', {'color': 'b', 'fontsize': 20})
+
pylab.show()
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py 2009-04-06 18:59:47 UTC (rev 7035)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py 2009-04-06 19:05:57 UTC (rev 7036)
@@ -110,7 +110,20 @@
result.append(' '.join(strings[lasti:]))
return '\n'.join(result)
-_string_escape_regex = re.compile(r'([\\()])')
+# PDF strings are supposed to be able to include any eight-bit data,
+# except that unbalanced parens and backslashes must be escaped by a
+# backslash. However, sf bug #2708559 shows that the carriage return
+# character may get read as a newline; these characters correspond to
+# \gamma and \Omega in TeX's math font encoding. Escaping them fixes
+# the bug.
+_string_escape_regex = re.compile(r'([\\()\r\n])')
+def _string_escape(match):
+ m = match.group(0)
+ if m in r'\()': return '\\' + m
+ elif m == '\n': return r'\n'
+ elif m == '\r': return r'\r'
+ assert False
+
def pdfRepr(obj):
"""Map Python objects to PDF syntax."""
@@ -136,7 +149,7 @@
# simpler to escape them all. TODO: cut long strings into lines;
# I believe there is some maximum line length in PDF.
elif is_string_like(obj):
- return '(' + _string_escape_regex.sub(r'\\\1', obj) + ')'
+ return '(' + _string_escape_regex.sub(_string_escape, obj) + ')'
# Dictionaries. The keys must be PDF names, so if we find strings
# there, we make Name objects from them. The values may be
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033
+ /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033
+ /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033
+ /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2009-04-06 18:59:49
|
Revision: 7035
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7035&view=rev
Author: jouni
Date: 2009-04-06 18:59:47 +0000 (Mon, 06 Apr 2009)
Log Message:
-----------
The pdf backend now escapes newlines and linefeeds in strings - fixes #2708559
Modified Paths:
--------------
branches/v0_98_5_maint/CHANGELOG
branches/v0_98_5_maint/examples/pylab_examples/usetex_demo.py
branches/v0_98_5_maint/lib/matplotlib/backends/backend_pdf.py
Modified: branches/v0_98_5_maint/CHANGELOG
===================================================================
--- branches/v0_98_5_maint/CHANGELOG 2009-04-06 17:12:37 UTC (rev 7034)
+++ branches/v0_98_5_maint/CHANGELOG 2009-04-06 18:59:47 UTC (rev 7035)
@@ -1,3 +1,6 @@
+2009-04-06 The pdf backend now escapes newlines and linefeeds in strings.
+ Fixes sf bug #2708559; thanks to Tiago Pereira for the report.
+
2009-04-06 texmanager.make_dvi now raises an error if LaTeX failed to
create an output file. Thanks to Joao Luis Silva for reporting
this. - JKS
Modified: branches/v0_98_5_maint/examples/pylab_examples/usetex_demo.py
===================================================================
--- branches/v0_98_5_maint/examples/pylab_examples/usetex_demo.py 2009-04-06 17:12:37 UTC (rev 7034)
+++ branches/v0_98_5_maint/examples/pylab_examples/usetex_demo.py 2009-04-06 18:59:47 UTC (rev 7035)
@@ -56,4 +56,8 @@
## phase field equations
pylab.text(0.2, 0.15, r'$\mathcal{F} = \int f\left( \phi, c \right) dV,$ \newline $ \frac{ \partial \phi } { \partial t } = -M_{ \phi } \frac{ \delta \mathcal{F} } { \delta \phi }$', {'color' : 'b', 'fontsize' : 20})
+## these went wrong in pdf in a previous version
+pylab.text(-.9,.42,r'gamma: $\gamma$', {'color': 'r', 'fontsize': 20})
+pylab.text(-.9,.36,r'Omega: $\Omega$', {'color': 'b', 'fontsize': 20})
+
pylab.show()
Modified: branches/v0_98_5_maint/lib/matplotlib/backends/backend_pdf.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/backends/backend_pdf.py 2009-04-06 17:12:37 UTC (rev 7034)
+++ branches/v0_98_5_maint/lib/matplotlib/backends/backend_pdf.py 2009-04-06 18:59:47 UTC (rev 7035)
@@ -112,7 +112,20 @@
result.append(' '.join(strings[lasti:]))
return '\n'.join(result)
-_string_escape_regex = re.compile(r'([\\()])')
+# PDF strings are supposed to be able to include any eight-bit data,
+# except that unbalanced parens and backslashes must be escaped by a
+# backslash. However, sf bug #2708559 shows that the carriage return
+# character may get read as a newline; these characters correspond to
+# \gamma and \Omega in TeX's math font encoding. Escaping them fixes
+# the bug.
+_string_escape_regex = re.compile(r'([\\()\r\n])')
+def _string_escape(match):
+ m = match.group(0)
+ if m in r'\()': return '\\' + m
+ elif m == '\n': return r'\n'
+ elif m == '\r': return r'\r'
+ assert False
+
def pdfRepr(obj):
"""Map Python objects to PDF syntax."""
@@ -138,7 +151,7 @@
# simpler to escape them all. TODO: cut long strings into lines;
# I believe there is some maximum line length in PDF.
elif is_string_like(obj):
- return '(' + _string_escape_regex.sub(r'\\\1', obj) + ')'
+ return '(' + _string_escape_regex.sub(_string_escape, obj) + ')'
# Dictionaries. The keys must be PDF names, so if we find strings
# there, we make Name objects from them. The values may be
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2009-04-06 17:12:43
|
Revision: 7034
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7034&view=rev
Author: jouni
Date: 2009-04-06 17:12:37 +0000 (Mon, 06 Apr 2009)
Log Message:
-----------
Merged revisions 7033 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r7033 | jouni | 2009-04-06 20:03:09 +0300 (Mon, 06 Apr 2009) | 1 line
texmanager.make_dvi now raises an error if LaTeX failed to create an output file
........
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/texmanager.py
Property Changed:
----------------
trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
trunk/matplotlib/doc/sphinxext/gen_gallery.py
trunk/matplotlib/doc/sphinxext/gen_rst.py
trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7025,7027-7031
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7033
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2009-04-06 17:03:09 UTC (rev 7033)
+++ trunk/matplotlib/CHANGELOG 2009-04-06 17:12:37 UTC (rev 7034)
@@ -1,3 +1,7 @@
+2009-04-06 texmanager.make_dvi now raises an error if LaTeX failed to
+ create an output file. Thanks to Joao Luis Silva for reporting
+ this. - JKS
+
2009-04-05 _png.read_png() reads 12 bit PNGs (patch from
Tobias Wood) - ADS
Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025
+ /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033
Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025
+ /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033
Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025
+ /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025
+ /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025
+ /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025
+ /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033
Modified: trunk/matplotlib/lib/matplotlib/texmanager.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/texmanager.py 2009-04-06 17:03:09 UTC (rev 7033)
+++ trunk/matplotlib/lib/matplotlib/texmanager.py 2009-04-06 17:12:37 UTC (rev 7034)
@@ -358,7 +358,12 @@
fh.close()
except IOError:
report = 'No latex error report available.'
- if exit_status:
+ try:
+ os.stat(dvifile)
+ exists = True
+ except OSError:
+ exists = False
+ if exit_status or not exists:
raise RuntimeError(('LaTeX was not able to process the following \
string:\n%s\nHere is the full report generated by LaTeX: \n\n'% repr(tex)) + report)
else: mpl.verbose.report(report, 'debug')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2009-04-06 17:03:16
|
Revision: 7033
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7033&view=rev
Author: jouni
Date: 2009-04-06 17:03:09 +0000 (Mon, 06 Apr 2009)
Log Message:
-----------
texmanager.make_dvi now raises an error if LaTeX failed to create an output file
Modified Paths:
--------------
branches/v0_98_5_maint/CHANGELOG
branches/v0_98_5_maint/lib/matplotlib/texmanager.py
Modified: branches/v0_98_5_maint/CHANGELOG
===================================================================
--- branches/v0_98_5_maint/CHANGELOG 2009-04-06 01:52:45 UTC (rev 7032)
+++ branches/v0_98_5_maint/CHANGELOG 2009-04-06 17:03:09 UTC (rev 7033)
@@ -1,3 +1,7 @@
+2009-04-06 texmanager.make_dvi now raises an error if LaTeX failed to
+ create an output file. Thanks to Joao Luis Silva for reporting
+ this. - JKS
+
2009-04-05 _png.read_png() reads 12 bit PNGs (patch from
Tobias Wood) - ADS
Modified: branches/v0_98_5_maint/lib/matplotlib/texmanager.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/texmanager.py 2009-04-06 01:52:45 UTC (rev 7032)
+++ branches/v0_98_5_maint/lib/matplotlib/texmanager.py 2009-04-06 17:03:09 UTC (rev 7033)
@@ -285,7 +285,12 @@
fh.close()
except IOError:
report = 'No latex error report available.'
- if exit_status:
+ try:
+ os.stat(dvifile)
+ exists = True
+ except OSError:
+ exists = False
+ if exit_status or not exists:
raise RuntimeError(('LaTeX was not able to process the following \
string:\n%s\nHere is the full report generated by LaTeX: \n\n'% repr(tex)) + report)
else: mpl.verbose.report(report, 'debug')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2009-04-06 01:52:54
|
Revision: 7032
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7032&view=rev
Author: astraw
Date: 2009-04-06 01:52:45 +0000 (Mon, 06 Apr 2009)
Log Message:
-----------
Merged revisions 7027-7031 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r7027 | astraw | 2009-04-05 15:06:05 -0700 (Sun, 05 Apr 2009) | 1 line
pngsuite test: plot images in grayscale if the input array is 2 dimensional
........
r7028 | astraw | 2009-04-05 15:07:01 -0700 (Sun, 05 Apr 2009) | 1 line
read 12 bit PNGs (patch from Tobias Wood)
........
r7029 | astraw | 2009-04-05 15:07:34 -0700 (Sun, 05 Apr 2009) | 1 line
trivial: remove trailing whitespace from source code
........
r7030 | astraw | 2009-04-05 15:08:24 -0700 (Sun, 05 Apr 2009) | 1 line
trivial: remove outdated comment
........
r7031 | astraw | 2009-04-05 15:09:45 -0700 (Sun, 05 Apr 2009) | 1 line
update changelog about Tobias' patch
........
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/examples/tests/pngsuite/pngsuite.py
trunk/matplotlib/lib/matplotlib/image.py
trunk/matplotlib/src/_png.cpp
Property Changed:
----------------
trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7025
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7025,7027-7031
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2009-04-05 22:09:45 UTC (rev 7031)
+++ trunk/matplotlib/CHANGELOG 2009-04-06 01:52:45 UTC (rev 7032)
@@ -1,3 +1,6 @@
+2009-04-05 _png.read_png() reads 12 bit PNGs (patch from
+ Tobias Wood) - ADS
+
2009-04-04 Allow log axis scale to clip non-positive values to
small positive value; this is useful for errorbars. - EF
Modified: trunk/matplotlib/examples/tests/pngsuite/pngsuite.py
===================================================================
--- trunk/matplotlib/examples/tests/pngsuite/pngsuite.py 2009-04-05 22:09:45 UTC (rev 7031)
+++ trunk/matplotlib/examples/tests/pngsuite/pngsuite.py 2009-04-06 01:52:45 UTC (rev 7032)
@@ -8,6 +8,7 @@
"""
from matplotlib import pyplot as plt
+import matplotlib.cm as cm
import glob
files = glob.glob("basn*.png")
@@ -17,7 +18,11 @@
for i, fname in enumerate(files):
data = plt.imread(fname)
- plt.imshow(data, extent=[i,i+1,0,1])
+ cmap = None # use default colormap
+ if data.ndim==2:
+ # keep grayscale images gray
+ cmap = cm.gray
+ plt.imshow(data, extent=[i,i+1,0,1], cmap=cmap)
plt.gca().get_frame().set_facecolor("#ddffff")
plt.gca().set_xlim(0, len(files))
Modified: trunk/matplotlib/lib/matplotlib/image.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/image.py 2009-04-05 22:09:45 UTC (rev 7031)
+++ trunk/matplotlib/lib/matplotlib/image.py 2009-04-06 01:52:45 UTC (rev 7032)
@@ -748,8 +748,6 @@
<http://www.pythonware.com/products/pil/>`_ is installed, it will
use it to load the image and return an array (if possible) which
can be used with :func:`~matplotlib.pyplot.imshow`.
-
- TODO: support RGB and grayscale return values in _image.readpng
"""
def pilread():
Modified: trunk/matplotlib/src/_png.cpp
===================================================================
--- trunk/matplotlib/src/_png.cpp 2009-04-05 22:09:45 UTC (rev 7031)
+++ trunk/matplotlib/src/_png.cpp 2009-04-06 01:52:45 UTC (rev 7032)
@@ -208,38 +208,37 @@
png_init_io(png_ptr, fp);
png_set_sig_bytes(png_ptr, 8);
-
png_read_info(png_ptr, info_ptr);
png_uint_32 width = info_ptr->width;
png_uint_32 height = info_ptr->height;
- bool do_gray_conversion = (info_ptr->bit_depth < 8 &&
- info_ptr->color_type == PNG_COLOR_TYPE_GRAY);
int bit_depth = info_ptr->bit_depth;
- if (bit_depth == 16) {
- png_set_strip_16(png_ptr);
- } else if (bit_depth < 8) {
+
+ // Unpack 1, 2, and 4-bit images
+ if (bit_depth < 8)
png_set_packing(png_ptr);
- }
- // convert misc color types to rgb for simplicity
- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY ||
- info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
- png_set_gray_to_rgb(png_ptr);
- } else if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) {
+ // If sig bits are set, shift data
+ png_color_8p sig_bit;
+ if ((info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) && png_get_sBIT(png_ptr, info_ptr, &sig_bit))
+ png_set_shift(png_ptr, sig_bit);
+
+ // Convert big endian to little
+ if (bit_depth == 16)
+ png_set_swap(png_ptr);
+
+ // Convert palletes to full RGB
+ if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
png_set_palette_to_rgb(png_ptr);
- }
+ // If there's an alpha channel convert gray to RGB
+ if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+ png_set_gray_to_rgb(png_ptr);
+
png_set_interlace_handling(png_ptr);
png_read_update_info(png_ptr, info_ptr);
- bool rgba = info_ptr->color_type == PNG_COLOR_TYPE_RGBA;
- if ( (info_ptr->color_type != PNG_COLOR_TYPE_RGB) && !rgba) {
- std::cerr << "Found color type " << (int)info_ptr->color_type << std::endl;
- throw Py::RuntimeError("_image_module::readpng: cannot handle color_type");
- }
-
/* read file */
if (setjmp(png_jmpbuf(png_ptr)))
throw Py::RuntimeError("_image_module::readpng: error during read_image");
@@ -255,35 +254,34 @@
npy_intp dimensions[3];
dimensions[0] = height; //numrows
dimensions[1] = width; //numcols
- dimensions[2] = 4;
+ if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA)
+ dimensions[2] = 4; //RGBA images
+ else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR)
+ dimensions[2] = 3; //RGB images
+ else
+ dimensions[2] = 1; //Greyscale images
+ //For gray, return an x by y array, not an x by y by 1
+ int num_dims = (info_ptr->color_type & PNG_COLOR_MASK_COLOR) ? 3 : 2;
- PyArrayObject *A = (PyArrayObject *) PyArray_SimpleNew(3, dimensions, PyArray_FLOAT);
+ double max_value = (1 << ((bit_depth < 8) ? 8 : bit_depth)) - 1;
+ PyArrayObject *A = (PyArrayObject *) PyArray_SimpleNew(num_dims, dimensions, PyArray_FLOAT);
- if (do_gray_conversion) {
- float max_value = (float)((1L << bit_depth) - 1);
- for (png_uint_32 y = 0; y < height; y++) {
- png_byte* row = row_pointers[y];
- for (png_uint_32 x = 0; x < width; x++) {
- float value = row[x] / max_value;
- size_t offset = y*A->strides[0] + x*A->strides[1];
- *(float*)(A->data + offset + 0*A->strides[2]) = value;
- *(float*)(A->data + offset + 1*A->strides[2]) = value;
- *(float*)(A->data + offset + 2*A->strides[2]) = value;
- *(float*)(A->data + offset + 3*A->strides[2]) = 1.0f;
- }
+ for (png_uint_32 y = 0; y < height; y++) {
+ png_byte* row = row_pointers[y];
+ for (png_uint_32 x = 0; x < width; x++) {
+ size_t offset = y*A->strides[0] + x*A->strides[1];
+ if (bit_depth == 16) {
+ png_uint_16* ptr = &reinterpret_cast<png_uint_16*> (row)[x * dimensions[2]];
+ for (png_uint_32 p = 0; p < dimensions[2]; p++)
+ *(float*)(A->data + offset + p*A->strides[2]) = (float)(ptr[p]) / max_value;
+ } else {
+ png_byte* ptr = &(row[x * dimensions[2]]);
+ for (png_uint_32 p = 0; p < dimensions[2]; p++)
+ {
+ *(float*)(A->data + offset + p*A->strides[2]) = (float)(ptr[p]) / max_value;
+ }
+ }
}
- } else {
- for (png_uint_32 y = 0; y < height; y++) {
- png_byte* row = row_pointers[y];
- for (png_uint_32 x = 0; x < width; x++) {
- png_byte* ptr = (rgba) ? &(row[x*4]) : &(row[x*3]);
- size_t offset = y*A->strides[0] + x*A->strides[1];
- *(float*)(A->data + offset + 0*A->strides[2]) = (float)(ptr[0]/255.0);
- *(float*)(A->data + offset + 1*A->strides[2]) = (float)(ptr[1]/255.0);
- *(float*)(A->data + offset + 2*A->strides[2]) = (float)(ptr[2]/255.0);
- *(float*)(A->data + offset + 3*A->strides[2]) = rgba ? (float)(ptr[3]/255.0) : 1.0f;
- }
- }
}
//free the png memory
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2009-04-05 22:09:47
|
Revision: 7031
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7031&view=rev
Author: astraw
Date: 2009-04-05 22:09:45 +0000 (Sun, 05 Apr 2009)
Log Message:
-----------
update changelog about Tobias' patch
Modified Paths:
--------------
branches/v0_98_5_maint/CHANGELOG
Modified: branches/v0_98_5_maint/CHANGELOG
===================================================================
--- branches/v0_98_5_maint/CHANGELOG 2009-04-05 22:08:24 UTC (rev 7030)
+++ branches/v0_98_5_maint/CHANGELOG 2009-04-05 22:09:45 UTC (rev 7031)
@@ -1,3 +1,6 @@
+2009-04-05 _png.read_png() reads 12 bit PNGs (patch from
+ Tobias Wood) - ADS
+
2009-03-17 Fix bugs in edge color handling by contourf, found
by Jae-Joon Lee. - EF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2009-04-05 22:08:29
|
Revision: 7030
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7030&view=rev
Author: astraw
Date: 2009-04-05 22:08:24 +0000 (Sun, 05 Apr 2009)
Log Message:
-----------
trivial: remove outdated comment
Modified Paths:
--------------
branches/v0_98_5_maint/lib/matplotlib/image.py
Modified: branches/v0_98_5_maint/lib/matplotlib/image.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/image.py 2009-04-05 22:07:34 UTC (rev 7029)
+++ branches/v0_98_5_maint/lib/matplotlib/image.py 2009-04-05 22:08:24 UTC (rev 7030)
@@ -720,8 +720,6 @@
<http://www.pythonware.com/products/pil/>`_ is installed, it will
use it to load the image and return an array (if possible) which
can be used with :func:`~matplotlib.pyplot.imshow`.
-
- TODO: support RGB and grayscale return values in _image.readpng
"""
def pilread():
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2009-04-05 22:07:35
|
Revision: 7029
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7029&view=rev
Author: astraw
Date: 2009-04-05 22:07:34 +0000 (Sun, 05 Apr 2009)
Log Message:
-----------
trivial: remove trailing whitespace from source code
Modified Paths:
--------------
branches/v0_98_5_maint/src/_png.cpp
Modified: branches/v0_98_5_maint/src/_png.cpp
===================================================================
--- branches/v0_98_5_maint/src/_png.cpp 2009-04-05 22:07:01 UTC (rev 7028)
+++ branches/v0_98_5_maint/src/_png.cpp 2009-04-05 22:07:34 UTC (rev 7029)
@@ -214,7 +214,7 @@
png_uint_32 height = info_ptr->height;
int bit_depth = info_ptr->bit_depth;
-
+
// Unpack 1, 2, and 4-bit images
if (bit_depth < 8)
png_set_packing(png_ptr);
@@ -231,7 +231,7 @@
// Convert palletes to full RGB
if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
png_set_palette_to_rgb(png_ptr);
-
+
// If there's an alpha channel convert gray to RGB
if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
png_set_gray_to_rgb(png_ptr);
@@ -262,7 +262,7 @@
dimensions[2] = 1; //Greyscale images
//For gray, return an x by y array, not an x by y by 1
int num_dims = (info_ptr->color_type & PNG_COLOR_MASK_COLOR) ? 3 : 2;
-
+
double max_value = (1 << ((bit_depth < 8) ? 8 : bit_depth)) - 1;
PyArrayObject *A = (PyArrayObject *) PyArray_SimpleNew(num_dims, dimensions, PyArray_FLOAT);
@@ -283,7 +283,7 @@
}
}
}
-
+
//free the png memory
png_read_end(png_ptr, info_ptr);
png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2009-04-05 22:07:02
|
Revision: 7028
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7028&view=rev
Author: astraw
Date: 2009-04-05 22:07:01 +0000 (Sun, 05 Apr 2009)
Log Message:
-----------
read 12 bit PNGs (patch from Tobias Wood)
Modified Paths:
--------------
branches/v0_98_5_maint/src/_png.cpp
Modified: branches/v0_98_5_maint/src/_png.cpp
===================================================================
--- branches/v0_98_5_maint/src/_png.cpp 2009-04-05 22:06:05 UTC (rev 7027)
+++ branches/v0_98_5_maint/src/_png.cpp 2009-04-05 22:07:01 UTC (rev 7028)
@@ -208,38 +208,37 @@
png_init_io(png_ptr, fp);
png_set_sig_bytes(png_ptr, 8);
-
png_read_info(png_ptr, info_ptr);
png_uint_32 width = info_ptr->width;
png_uint_32 height = info_ptr->height;
- bool do_gray_conversion = (info_ptr->bit_depth < 8 &&
- info_ptr->color_type == PNG_COLOR_TYPE_GRAY);
int bit_depth = info_ptr->bit_depth;
- if (bit_depth == 16) {
- png_set_strip_16(png_ptr);
- } else if (bit_depth < 8) {
+
+ // Unpack 1, 2, and 4-bit images
+ if (bit_depth < 8)
png_set_packing(png_ptr);
- }
- // convert misc color types to rgb for simplicity
- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY ||
- info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
- png_set_gray_to_rgb(png_ptr);
- } else if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) {
+ // If sig bits are set, shift data
+ png_color_8p sig_bit;
+ if ((info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) && png_get_sBIT(png_ptr, info_ptr, &sig_bit))
+ png_set_shift(png_ptr, sig_bit);
+
+ // Convert big endian to little
+ if (bit_depth == 16)
+ png_set_swap(png_ptr);
+
+ // Convert palletes to full RGB
+ if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
png_set_palette_to_rgb(png_ptr);
- }
+
+ // If there's an alpha channel convert gray to RGB
+ if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+ png_set_gray_to_rgb(png_ptr);
png_set_interlace_handling(png_ptr);
png_read_update_info(png_ptr, info_ptr);
- bool rgba = info_ptr->color_type == PNG_COLOR_TYPE_RGBA;
- if ( (info_ptr->color_type != PNG_COLOR_TYPE_RGB) && !rgba) {
- std::cerr << "Found color type " << (int)info_ptr->color_type << std::endl;
- throw Py::RuntimeError("_image_module::readpng: cannot handle color_type");
- }
-
/* read file */
if (setjmp(png_jmpbuf(png_ptr)))
throw Py::RuntimeError("_image_module::readpng: error during read_image");
@@ -255,37 +254,36 @@
npy_intp dimensions[3];
dimensions[0] = height; //numrows
dimensions[1] = width; //numcols
- dimensions[2] = 4;
+ if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA)
+ dimensions[2] = 4; //RGBA images
+ else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR)
+ dimensions[2] = 3; //RGB images
+ else
+ dimensions[2] = 1; //Greyscale images
+ //For gray, return an x by y array, not an x by y by 1
+ int num_dims = (info_ptr->color_type & PNG_COLOR_MASK_COLOR) ? 3 : 2;
+
+ double max_value = (1 << ((bit_depth < 8) ? 8 : bit_depth)) - 1;
+ PyArrayObject *A = (PyArrayObject *) PyArray_SimpleNew(num_dims, dimensions, PyArray_FLOAT);
- PyArrayObject *A = (PyArrayObject *) PyArray_SimpleNew(3, dimensions, PyArray_FLOAT);
-
- if (do_gray_conversion) {
- float max_value = (float)((1L << bit_depth) - 1);
- for (png_uint_32 y = 0; y < height; y++) {
- png_byte* row = row_pointers[y];
- for (png_uint_32 x = 0; x < width; x++) {
- float value = row[x] / max_value;
- size_t offset = y*A->strides[0] + x*A->strides[1];
- *(float*)(A->data + offset + 0*A->strides[2]) = value;
- *(float*)(A->data + offset + 1*A->strides[2]) = value;
- *(float*)(A->data + offset + 2*A->strides[2]) = value;
- *(float*)(A->data + offset + 3*A->strides[2]) = 1.0f;
- }
+ for (png_uint_32 y = 0; y < height; y++) {
+ png_byte* row = row_pointers[y];
+ for (png_uint_32 x = 0; x < width; x++) {
+ size_t offset = y*A->strides[0] + x*A->strides[1];
+ if (bit_depth == 16) {
+ png_uint_16* ptr = &reinterpret_cast<png_uint_16*> (row)[x * dimensions[2]];
+ for (png_uint_32 p = 0; p < dimensions[2]; p++)
+ *(float*)(A->data + offset + p*A->strides[2]) = (float)(ptr[p]) / max_value;
+ } else {
+ png_byte* ptr = &(row[x * dimensions[2]]);
+ for (png_uint_32 p = 0; p < dimensions[2]; p++)
+ {
+ *(float*)(A->data + offset + p*A->strides[2]) = (float)(ptr[p]) / max_value;
+ }
+ }
}
- } else {
- for (png_uint_32 y = 0; y < height; y++) {
- png_byte* row = row_pointers[y];
- for (png_uint_32 x = 0; x < width; x++) {
- png_byte* ptr = (rgba) ? &(row[x*4]) : &(row[x*3]);
- size_t offset = y*A->strides[0] + x*A->strides[1];
- *(float*)(A->data + offset + 0*A->strides[2]) = (float)(ptr[0]/255.0);
- *(float*)(A->data + offset + 1*A->strides[2]) = (float)(ptr[1]/255.0);
- *(float*)(A->data + offset + 2*A->strides[2]) = (float)(ptr[2]/255.0);
- *(float*)(A->data + offset + 3*A->strides[2]) = rgba ? (float)(ptr[3]/255.0) : 1.0f;
- }
- }
}
-
+
//free the png memory
png_read_end(png_ptr, info_ptr);
png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2009-04-05 22:06:07
|
Revision: 7027
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7027&view=rev
Author: astraw
Date: 2009-04-05 22:06:05 +0000 (Sun, 05 Apr 2009)
Log Message:
-----------
pngsuite test: plot images in grayscale if the input array is 2 dimensional
Modified Paths:
--------------
branches/v0_98_5_maint/examples/tests/pngsuite/pngsuite.py
Modified: branches/v0_98_5_maint/examples/tests/pngsuite/pngsuite.py
===================================================================
--- branches/v0_98_5_maint/examples/tests/pngsuite/pngsuite.py 2009-04-05 02:23:03 UTC (rev 7026)
+++ branches/v0_98_5_maint/examples/tests/pngsuite/pngsuite.py 2009-04-05 22:06:05 UTC (rev 7027)
@@ -8,6 +8,7 @@
"""
from matplotlib import pyplot as plt
+import matplotlib.cm as cm
import glob
files = glob.glob("basn*.png")
@@ -17,7 +18,11 @@
for i, fname in enumerate(files):
data = plt.imread(fname)
- plt.imshow(data, extent=[i,i+1,0,1])
+ cmap = None # use default colormap
+ if data.ndim==2:
+ # keep grayscale images gray
+ cmap = cm.gray
+ plt.imshow(data, extent=[i,i+1,0,1], cmap=cmap)
plt.gca().get_frame().set_facecolor("#ddffff")
plt.gca().set_xlim(0, len(files))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2009-04-05 02:23:08
|
Revision: 7026
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7026&view=rev
Author: efiring
Date: 2009-04-05 02:23:03 +0000 (Sun, 05 Apr 2009)
Log Message:
-----------
Merged revisions 7024-7025 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r7024 | efiring | 2009-04-04 15:37:26 -1000 (Sat, 04 Apr 2009) | 2 lines
Fix PatchCollection bug 2723527; thanks to Thomas Robitaille
........
r7025 | efiring | 2009-04-04 16:16:44 -1000 (Sat, 04 Apr 2009) | 2 lines
Fix PatchCollection bug 2732455 by letting to_rgba handle 'none'
........
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/collections.py
trunk/matplotlib/lib/matplotlib/colors.py
Property Changed:
----------------
trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
trunk/matplotlib/doc/sphinxext/gen_gallery.py
trunk/matplotlib/doc/sphinxext/gen_rst.py
trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7018
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7025
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025
Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018
+ /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025
Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018
+ /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025
Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018
+ /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025
Modified: trunk/matplotlib/lib/matplotlib/collections.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/collections.py 2009-04-05 02:16:44 UTC (rev 7025)
+++ trunk/matplotlib/lib/matplotlib/collections.py 2009-04-05 02:23:03 UTC (rev 7026)
@@ -1126,7 +1126,7 @@
facecolors = [determine_facecolor(p) for p in patches]
edgecolors = [p.get_edgecolor() for p in patches]
- linewidths = [p.get_linewidths() for p in patches]
+ linewidths = [p.get_linewidth() for p in patches]
antialiaseds = [p.get_antialiased() for p in patches]
Collection.__init__(
Modified: trunk/matplotlib/lib/matplotlib/colors.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/colors.py 2009-04-05 02:16:44 UTC (rev 7025)
+++ trunk/matplotlib/lib/matplotlib/colors.py 2009-04-05 02:23:03 UTC (rev 7026)
@@ -318,10 +318,18 @@
Returns an *RGBA* tuple of four floats from 0-1.
For acceptable values of *arg*, see :meth:`to_rgb`.
+ In addition, if *arg* is "none" (case-insensitive),
+ then (0,0,0,0) will be returned.
If *arg* is an *RGBA* sequence and *alpha* is not *None*,
*alpha* will replace the original *A*.
"""
try:
+ if arg.lower() == 'none':
+ return (0.0, 0.0, 0.0, 0.0)
+ except AttributeError:
+ pass
+
+ try:
if not cbook.is_string_like(arg) and cbook.iterable(arg):
if len(arg) == 4:
if [x for x in arg if (float(x) < 0) or (x > 1)]:
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018
+ /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018
+ /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018
+ /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2009-04-05 02:22:13
|
Revision: 7024
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7024&view=rev
Author: efiring
Date: 2009-04-05 01:37:26 +0000 (Sun, 05 Apr 2009)
Log Message:
-----------
Fix PatchCollection bug 2723527; thanks to Thomas Robitaille
Modified Paths:
--------------
branches/v0_98_5_maint/lib/matplotlib/collections.py
Modified: branches/v0_98_5_maint/lib/matplotlib/collections.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/collections.py 2009-04-04 22:52:53 UTC (rev 7023)
+++ branches/v0_98_5_maint/lib/matplotlib/collections.py 2009-04-05 01:37:26 UTC (rev 7024)
@@ -1108,7 +1108,7 @@
facecolors = [determine_facecolor(p) for p in patches]
edgecolors = [p.get_edgecolor() for p in patches]
- linewidths = [p.get_linewidths() for p in patches]
+ linewidths = [p.get_linewidth() for p in patches]
antialiaseds = [p.get_antialiased() for p in patches]
Collection.__init__(
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2009-04-05 02:16:46
|
Revision: 7025
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7025&view=rev
Author: efiring
Date: 2009-04-05 02:16:44 +0000 (Sun, 05 Apr 2009)
Log Message:
-----------
Fix PatchCollection bug 2732455 by letting to_rgba handle 'none'
Modified Paths:
--------------
branches/v0_98_5_maint/lib/matplotlib/colors.py
Modified: branches/v0_98_5_maint/lib/matplotlib/colors.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/colors.py 2009-04-05 01:37:26 UTC (rev 7024)
+++ branches/v0_98_5_maint/lib/matplotlib/colors.py 2009-04-05 02:16:44 UTC (rev 7025)
@@ -318,10 +318,18 @@
Returns an *RGBA* tuple of four floats from 0-1.
For acceptable values of *arg*, see :meth:`to_rgb`.
+ In addition, if *arg* is "none" (case-insensitive),
+ then (0,0,0,0) will be returned.
If *arg* is an *RGBA* sequence and *alpha* is not *None*,
*alpha* will replace the original *A*.
"""
try:
+ if arg.lower() == 'none':
+ return (0.0, 0.0, 0.0, 0.0)
+ except AttributeError:
+ pass
+
+ try:
if not cbook.is_string_like(arg) and cbook.iterable(arg):
if len(arg) == 4:
if [x for x in arg if (float(x) < 0) or (x > 1)]:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2009-04-04 22:52:59
|
Revision: 7023
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7023&view=rev
Author: efiring
Date: 2009-04-04 22:52:53 +0000 (Sat, 04 Apr 2009)
Log Message:
-----------
Add log scale option to clip non-positive values instead of masking
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/doc/api/api_changes.rst
trunk/matplotlib/examples/pylab_examples/log_demo.py
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/scale.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2009-04-01 20:44:58 UTC (rev 7022)
+++ trunk/matplotlib/CHANGELOG 2009-04-04 22:52:53 UTC (rev 7023)
@@ -1,3 +1,6 @@
+2009-04-04 Allow log axis scale to clip non-positive values to
+ small positive value; this is useful for errorbars. - EF
+
2009-03-28 Make images handle nan in their array argument.
A helper, cbook.safe_masked_invalid() was added. - EF
Modified: trunk/matplotlib/doc/api/api_changes.rst
===================================================================
--- trunk/matplotlib/doc/api/api_changes.rst 2009-04-01 20:44:58 UTC (rev 7022)
+++ trunk/matplotlib/doc/api/api_changes.rst 2009-04-04 22:52:53 UTC (rev 7023)
@@ -19,6 +19,12 @@
Changes for 0.98.x
==================
+* Added new keyword parameters *nonposx*, *nonposy* to
+ :class:`matplotlib.axes.Axes` methods that set log scale
+ parameters. The default is still to mask out non-positive
+ values, but the kwargs accept 'clip', which causes non-positive
+ values to be replaced with a very small positive value.
+
* Added new :func:`matplotlib.pyplot.fignum_exists` and
:func:`matplotlib.pyplot.get_fignums`; they merely expose
information that had been hidden in :mod:`matplotlib._pylab_helpers`.
Modified: trunk/matplotlib/examples/pylab_examples/log_demo.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/log_demo.py 2009-04-01 20:44:58 UTC (rev 7022)
+++ trunk/matplotlib/examples/pylab_examples/log_demo.py 2009-04-04 22:52:53 UTC (rev 7023)
@@ -6,21 +6,33 @@
t = np.arange(0.01, 20.0, 0.01)
# log y axis
-plt.subplot(311)
+plt.subplot(221)
plt.semilogy(t, np.exp(-t/5.0))
-plt.ylabel('semilogy')
+plt.title('semilogy')
plt.grid(True)
# log x axis
-plt.subplot(312)
+plt.subplot(222)
plt.semilogx(t, np.sin(2*np.pi*t))
-plt.ylabel('semilogx')
+plt.title('semilogx')
plt.grid(True)
# log x and y axis
-plt.subplot(313)
+plt.subplot(223)
plt.loglog(t, 20*np.exp(-t/10.0), basex=4)
plt.grid(True)
-plt.ylabel('loglog base 4 on x')
+plt.title('loglog base 4 on x')
+# with errorbars: clip non-positive values
+ax = plt.subplot(224)
+ax.set_xscale("log", nonposx='clip')
+ax.set_yscale("log", nonposy='clip')
+
+x = 10.0**np.linspace(0.0, 2.0, 20)
+y = x**2.0
+plt.errorbar(x, y, xerr=0.1*x, yerr=5.0+0.75*y)
+ax.set_ylim(ymin=0.1)
+ax.set_title('Errorbars go negative')
+
+
plt.show()
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2009-04-01 20:44:58 UTC (rev 7022)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2009-04-04 22:52:53 UTC (rev 7023)
@@ -3455,6 +3455,10 @@
plot; see :meth:`matplotlib.axes.Axes.set_xscale` /
:meth:`matplotlib.axes.Axes.set_yscale` for details
+ *nonposx*/*nonposy*: ['mask' | 'clip' ]
+ non-positive values in *x* or *y* can be masked as
+ invalid, or clipped to a very small positive number
+
The remaining valid kwargs are
:class:`~matplotlib.lines.Line2D` properties:
@@ -3469,9 +3473,11 @@
dx = {'basex': kwargs.pop('basex', 10),
'subsx': kwargs.pop('subsx', None),
+ 'nonposx': kwargs.pop('nonposx', 'mask'),
}
dy = {'basey': kwargs.pop('basey', 10),
'subsy': kwargs.pop('subsy', None),
+ 'nonposy': kwargs.pop('nonposy', 'mask'),
}
self.set_xscale('log', **dx)
@@ -3508,6 +3514,10 @@
plot; see :meth:`~matplotlib.axes.Axes.set_xscale` for
details.
+ *nonposx*: ['mask' | 'clip' ]
+ non-positive values in *x* can be masked as
+ invalid, or clipped to a very small positive number
+
The remaining valid kwargs are
:class:`~matplotlib.lines.Line2D` properties:
@@ -3521,6 +3531,7 @@
if not self._hold: self.cla()
d = {'basex': kwargs.pop( 'basex', 10),
'subsx': kwargs.pop( 'subsx', None),
+ 'nonposx': kwargs.pop('nonposx', 'mask'),
}
self.set_xscale('log', **d)
@@ -3554,6 +3565,10 @@
plot; see :meth:`~matplotlib.axes.Axes.set_yscale` for
details.
+ *nonposy*: ['mask' | 'clip' ]
+ non-positive values in *y* can be masked as
+ invalid, or clipped to a very small positive number
+
The remaining valid kwargs are
:class:`~matplotlib.lines.Line2D` properties:
@@ -3567,6 +3582,7 @@
if not self._hold: self.cla()
d = {'basey': kwargs.pop('basey', 10),
'subsy': kwargs.pop('subsy', None),
+ 'nonposy': kwargs.pop('nonposy', 'mask'),
}
self.set_yscale('log', **d)
b = self._hold
Modified: trunk/matplotlib/lib/matplotlib/scale.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/scale.py 2009-04-01 20:44:58 UTC (rev 7022)
+++ trunk/matplotlib/lib/matplotlib/scale.py 2009-04-04 22:52:53 UTC (rev 7023)
@@ -87,6 +87,10 @@
return ma.MaskedArray(a, mask=mask)
return a
+def _clip_non_positives(a):
+ a[a <= 0.0] = 1e-300
+ return a
+
class LogScale(ScaleBase):
"""
A standard logarithmic scale. Care is taken so non-positive
@@ -104,14 +108,24 @@
name = 'log'
- class Log10Transform(Transform):
+ class LogTransformBase(Transform):
input_dims = 1
output_dims = 1
is_separable = True
+
+ def __init__(self, nonpos):
+ Transform.__init__(self)
+ if nonpos == 'mask':
+ self._handle_nonpos = _mask_non_positives
+ else:
+ self._handle_nonpos = _clip_non_positives
+
+
+ class Log10Transform(LogTransformBase):
base = 10.0
def transform(self, a):
- a = _mask_non_positives(a * 10.0)
+ a = self._handle_nonpos(a * 10.0)
if isinstance(a, MaskedArray):
return ma.log10(a)
return np.log10(a)
@@ -131,14 +145,11 @@
def inverted(self):
return LogScale.Log10Transform()
- class Log2Transform(Transform):
- input_dims = 1
- output_dims = 1
- is_separable = True
+ class Log2Transform(LogTransformBase):
base = 2.0
def transform(self, a):
- a = _mask_non_positives(a * 2.0)
+ a = self._handle_nonpos(a * 2.0)
if isinstance(a, MaskedArray):
return ma.log(a) / np.log(2)
return np.log2(a)
@@ -158,14 +169,11 @@
def inverted(self):
return LogScale.Log2Transform()
- class NaturalLogTransform(Transform):
- input_dims = 1
- output_dims = 1
- is_separable = True
+ class NaturalLogTransform(LogTransformBase):
base = np.e
def transform(self, a):
- a = _mask_non_positives(a * np.e)
+ a = self._handle_nonpos(a * np.e)
if isinstance(a, MaskedArray):
return ma.log(a)
return np.log(a)
@@ -190,12 +198,16 @@
output_dims = 1
is_separable = True
- def __init__(self, base):
+ def __init__(self, base, nonpos):
Transform.__init__(self)
self.base = base
+ if nonpos == 'mask':
+ self._handle_nonpos = _mask_non_positives
+ else:
+ self._handle_nonpos = _clip_non_positives
def transform(self, a):
- a = _mask_non_positives(a * self.base)
+ a = self._handle_nonpos(a * self.base)
if isinstance(a, MaskedArray):
return ma.log(a) / np.log(self.base)
return np.log(a) / np.log(self.base)
@@ -224,6 +236,10 @@
*basex*/*basey*:
The base of the logarithm
+ *nonposx*/*nonposy*: ['mask' | 'clip' ]
+ non-positive values in *x* or *y* can be masked as
+ invalid, or clipped to a very small positive number
+
*subsx*/*subsy*:
Where to place the subticks between each major tick.
Should be a sequence of integers. For example, in a log10
@@ -235,18 +251,23 @@
if axis.axis_name == 'x':
base = kwargs.pop('basex', 10.0)
subs = kwargs.pop('subsx', None)
+ nonpos = kwargs.pop('nonposx', 'mask')
else:
base = kwargs.pop('basey', 10.0)
subs = kwargs.pop('subsy', None)
+ nonpos = kwargs.pop('nonposy', 'mask')
+ if nonpos not in ['mask', 'clip']:
+ raise ValueError("nonposx, nonposy kwarg must be 'mask' or 'clip'")
+
if base == 10.0:
- self._transform = self.Log10Transform()
+ self._transform = self.Log10Transform(nonpos)
elif base == 2.0:
- self._transform = self.Log2Transform()
+ self._transform = self.Log2Transform(nonpos)
elif base == np.e:
- self._transform = self.NaturalLogTransform()
+ self._transform = self.NaturalLogTransform(nonpos)
else:
- self._transform = self.LogTransform(base)
+ self._transform = self.LogTransform(base, nonpos)
self.base = base
self.subs = subs
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-04-01 20:45:03
|
Revision: 7022
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7022&view=rev
Author: jdh2358
Date: 2009-04-01 20:44:58 +0000 (Wed, 01 Apr 2009)
Log Message:
-----------
added compound path demo
Added Paths:
-----------
trunk/matplotlib/examples/api/compound_path.py
Removed Paths:
-------------
trunk/matplotlib/examples/api/complex_path.py
Deleted: trunk/matplotlib/examples/api/complex_path.py
===================================================================
--- trunk/matplotlib/examples/api/complex_path.py 2009-04-01 20:44:27 UTC (rev 7021)
+++ trunk/matplotlib/examples/api/complex_path.py 2009-04-01 20:44:58 UTC (rev 7022)
@@ -1,35 +0,0 @@
-"""
-Make a compund path -- in this case two simple polygons, a rectangle
-and a triangle. Use CLOSEOPOLY and MOVETO for the different parts of
-the compound path
-"""
-import numpy as np
-from matplotlib.path import Path
-from matplotlib.patches import PathPatch
-import matplotlib.pyplot as plt
-
-
-vertices = []
-codes = []
-
-codes = [Path.MOVETO] + [Path.LINETO]*3 + [Path.CLOSEPOLY]
-vertices = [(1,1), (1,2), (2, 2), (2, 1), (0,0)]
-
-codes += [Path.MOVETO] + [Path.LINETO]*2 + [Path.CLOSEPOLY]
-vertices += [(4,4), (5,5), (5, 4), (0,0)]
-
-vertices = np.array(vertices, float)
-path = Path(vertices, codes)
-
-pathpatch = PathPatch(path, facecolor='red', edgecolor='green')
-
-fig = plt.figure()
-ax = fig.add_subplot(111)
-ax.add_patch(pathpatch)
-ax.set_title('A compound path')
-
-ax.dataLim.update_from_data_xy(vertices)
-ax.autoscale_view()
-
-
-plt.show()
Copied: trunk/matplotlib/examples/api/compound_path.py (from rev 7021, trunk/matplotlib/examples/api/complex_path.py)
===================================================================
--- trunk/matplotlib/examples/api/compound_path.py (rev 0)
+++ trunk/matplotlib/examples/api/compound_path.py 2009-04-01 20:44:58 UTC (rev 7022)
@@ -0,0 +1,35 @@
+"""
+Make a compund path -- in this case two simple polygons, a rectangle
+and a triangle. Use CLOSEOPOLY and MOVETO for the different parts of
+the compound path
+"""
+import numpy as np
+from matplotlib.path import Path
+from matplotlib.patches import PathPatch
+import matplotlib.pyplot as plt
+
+
+vertices = []
+codes = []
+
+codes = [Path.MOVETO] + [Path.LINETO]*3 + [Path.CLOSEPOLY]
+vertices = [(1,1), (1,2), (2, 2), (2, 1), (0,0)]
+
+codes += [Path.MOVETO] + [Path.LINETO]*2 + [Path.CLOSEPOLY]
+vertices += [(4,4), (5,5), (5, 4), (0,0)]
+
+vertices = np.array(vertices, float)
+path = Path(vertices, codes)
+
+pathpatch = PathPatch(path, facecolor='red', edgecolor='green')
+
+fig = plt.figure()
+ax = fig.add_subplot(111)
+ax.add_patch(pathpatch)
+ax.set_title('A compound path')
+
+ax.dataLim.update_from_data_xy(vertices)
+ax.autoscale_view()
+
+
+plt.show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-04-01 20:44:34
|
Revision: 7021
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7021&view=rev
Author: jdh2358
Date: 2009-04-01 20:44:27 +0000 (Wed, 01 Apr 2009)
Log Message:
-----------
added compound path demo
Added Paths:
-----------
trunk/matplotlib/examples/api/complex_path.py
Added: trunk/matplotlib/examples/api/complex_path.py
===================================================================
--- trunk/matplotlib/examples/api/complex_path.py (rev 0)
+++ trunk/matplotlib/examples/api/complex_path.py 2009-04-01 20:44:27 UTC (rev 7021)
@@ -0,0 +1,35 @@
+"""
+Make a compund path -- in this case two simple polygons, a rectangle
+and a triangle. Use CLOSEOPOLY and MOVETO for the different parts of
+the compound path
+"""
+import numpy as np
+from matplotlib.path import Path
+from matplotlib.patches import PathPatch
+import matplotlib.pyplot as plt
+
+
+vertices = []
+codes = []
+
+codes = [Path.MOVETO] + [Path.LINETO]*3 + [Path.CLOSEPOLY]
+vertices = [(1,1), (1,2), (2, 2), (2, 1), (0,0)]
+
+codes += [Path.MOVETO] + [Path.LINETO]*2 + [Path.CLOSEPOLY]
+vertices += [(4,4), (5,5), (5, 4), (0,0)]
+
+vertices = np.array(vertices, float)
+path = Path(vertices, codes)
+
+pathpatch = PathPatch(path, facecolor='red', edgecolor='green')
+
+fig = plt.figure()
+ax = fig.add_subplot(111)
+ax.add_patch(pathpatch)
+ax.set_title('A compound path')
+
+ax.dataLim.update_from_data_xy(vertices)
+ax.autoscale_view()
+
+
+plt.show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jr...@us...> - 2009-04-01 17:28:21
|
Revision: 7020
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7020&view=rev
Author: jrevans
Date: 2009-04-01 17:28:11 +0000 (Wed, 01 Apr 2009)
Log Message:
-----------
Updated 'fill' to handle unitized data. Added a unit-test for it.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/test/mplTest/units/__init__.py
Added Paths:
-----------
trunk/matplotlib/test/test_plots/TestFill.py
trunk/matplotlib/test/test_plots/baseline/TestFill/
trunk/matplotlib/test/test_plots/baseline/TestFill/fill_units.png
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2009-03-31 17:59:53 UTC (rev 7019)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2009-04-01 17:28:11 UTC (rev 7020)
@@ -216,9 +216,10 @@
if self.axes.xaxis is not None and self.axes.yaxis is not None:
bx = self.axes.xaxis.update_units(x)
by = self.axes.yaxis.update_units(y)
- # right now multicol is not supported if either x or y are
- # unit enabled but this can be fixed..
- if bx or by: return x, y, False
+ if bx:
+ x = self.axes.convert_xunits(x)
+ if by:
+ y = self.axes.convert_yunits(y)
x = ma.asarray(x)
y = ma.asarray(y)
@@ -310,8 +311,6 @@
ret.append(seg)
def makefill(x, y):
- x = self.axes.convert_xunits(x)
- y = self.axes.convert_yunits(y)
facecolor = self._get_next_cycle_color()
seg = mpatches.Polygon(np.hstack(
(x[:,np.newaxis],y[:,np.newaxis])),
@@ -358,8 +357,6 @@
def makefill(x, y):
facecolor = color
- x = self.axes.convert_xunits(x)
- y = self.axes.convert_yunits(y)
seg = mpatches.Polygon(np.hstack(
(x[:,np.newaxis],y[:,np.newaxis])),
facecolor = facecolor,
Modified: trunk/matplotlib/test/mplTest/units/__init__.py
===================================================================
--- trunk/matplotlib/test/mplTest/units/__init__.py 2009-03-31 17:59:53 UTC (rev 7019)
+++ trunk/matplotlib/test/mplTest/units/__init__.py 2009-04-01 17:28:11 UTC (rev 7020)
@@ -71,6 +71,7 @@
# Angles
deg = UnitDbl( 1.0, "deg" )
+rad = UnitDbl( 1.0, "rad" )
# Time
sec = UnitDbl( 1.0, "sec" )
Added: trunk/matplotlib/test/test_plots/TestFill.py
===================================================================
--- trunk/matplotlib/test/test_plots/TestFill.py (rev 0)
+++ trunk/matplotlib/test/test_plots/TestFill.py 2009-04-01 17:28:11 UTC (rev 7020)
@@ -0,0 +1,87 @@
+#=======================================================================
+"""The Fill unit-test class implementation."""
+#=======================================================================
+
+from mplTest import *
+
+#=======================================================================
+# Add import modules below.
+import matplotlib
+matplotlib.use( "Agg", warn = False )
+
+import pylab
+import numpy as npy
+from datetime import datetime
+#
+#=======================================================================
+
+#=======================================================================
+class TestFill( MplTestCase ):
+ """Test the various axes fill methods."""
+
+ # Uncomment any appropriate tags
+ tags = [
+ # 'gui', # requires the creation of a gui window
+ 'agg', # uses agg in the backend
+ 'agg-only', # uses only agg in the backend
+ # 'wx', # uses wx in the backend
+ # 'qt', # uses qt in the backend
+ # 'ps', # uses the postscript backend
+ # 'units', # uses units in the test
+ 'PIL', # uses PIL for image comparison
+ ]
+
+ #--------------------------------------------------------------------
+ def setUp( self ):
+ """Setup any data needed for the unit test."""
+ units.register()
+
+ #--------------------------------------------------------------------
+ def tearDown( self ):
+ """Clean-up any generated files here."""
+ pass
+
+ #--------------------------------------------------------------------
+ def test_fill_units( self ):
+ """Test the fill method with unitized-data."""
+
+ fname = self.outFile( "fill_units.png" )
+
+ # generate some data
+ t = units.Epoch( "ET", dt=datetime(2009, 4, 27) )
+ value = 10.0 * units.deg
+ day = units.Duration( "ET", 24.0 * 60.0 * 60.0 )
+
+ fig = pylab.figure()
+
+ # Top-Left
+ ax1 = fig.add_subplot( 221 )
+ ax1.plot( [t], [value], yunits='deg', color='red' )
+ ax1.fill( [733525.0, 733525.0, 733526.0, 733526.0],
+ [0.0, 0.0, 90.0, 0.0], 'b' )
+
+ # Top-Right
+ ax2 = fig.add_subplot( 222 )
+ ax2.plot( [t], [value], yunits='deg', color='red' )
+ ax2.fill( [t, t, t+day, t+day],
+ [0.0, 0.0, 90.0, 0.0], 'b' )
+
+ # Bottom-Left
+ ax3 = fig.add_subplot( 223 )
+ ax3.plot( [t], [value], yunits='deg', color='red' )
+ ax1.fill( [733525.0, 733525.0, 733526.0, 733526.0],
+ [0*units.deg, 0*units.deg, 90*units.deg, 0*units.deg], 'b' )
+
+ # Bottom-Right
+ ax4 = fig.add_subplot( 224 )
+ ax4.plot( [t], [value], yunits='deg', color='red' )
+ ax4.fill( [t, t, t+day, t+day],
+ [0*units.deg, 0*units.deg, 90*units.deg, 0*units.deg],
+ facecolor="blue" )
+
+ fig.autofmt_xdate()
+ fig.savefig( fname )
+ self.checkImage( fname )
+
+ #--------------------------------------------------------------------
+
Added: trunk/matplotlib/test/test_plots/baseline/TestFill/fill_units.png
===================================================================
(Binary files differ)
Property changes on: trunk/matplotlib/test/test_plots/baseline/TestFill/fill_units.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-03-31 18:00:12
|
Revision: 7019
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7019&view=rev
Author: mdboom
Date: 2009-03-31 17:59:53 +0000 (Tue, 31 Mar 2009)
Log Message:
-----------
Merged revisions 7018 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r7018 | mdboom | 2009-03-31 13:47:27 -0400 (Tue, 31 Mar 2009) | 2 lines
Fix putmask update -- use np.ma.filled instead.
........
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/transforms.py
Property Changed:
----------------
trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
trunk/matplotlib/doc/sphinxext/gen_gallery.py
trunk/matplotlib/doc/sphinxext/gen_rst.py
trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7016
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7018
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018
Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016
+ /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018
Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016
+ /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018
Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016
+ /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016
+ /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016
+ /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016
+ /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018
Modified: trunk/matplotlib/lib/matplotlib/transforms.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/transforms.py 2009-03-31 17:47:27 UTC (rev 7018)
+++ trunk/matplotlib/lib/matplotlib/transforms.py 2009-03-31 17:59:53 UTC (rev 7019)
@@ -970,8 +970,7 @@
def get_points(self):
if self._invalid:
points = self._transform.transform(self._bbox.get_points())
- if ma.isMaskedArray(points):
- np.putmask(points, points.mask, 0.0)
+ points = np.ma.filled(points, 0.0)
self._points = points
self._invalid = 0
return self._points
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-03-31 17:47:30
|
Revision: 7018
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7018&view=rev
Author: mdboom
Date: 2009-03-31 17:47:27 +0000 (Tue, 31 Mar 2009)
Log Message:
-----------
Fix putmask update -- use np.ma.filled instead.
Modified Paths:
--------------
branches/v0_98_5_maint/lib/matplotlib/transforms.py
Modified: branches/v0_98_5_maint/lib/matplotlib/transforms.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/transforms.py 2009-03-31 15:23:54 UTC (rev 7017)
+++ branches/v0_98_5_maint/lib/matplotlib/transforms.py 2009-03-31 17:47:27 UTC (rev 7018)
@@ -974,8 +974,7 @@
def get_points(self):
if self._invalid:
points = self._transform.transform(self._bbox.get_points())
- if ma.isMaskedArray(points):
- np.putmask(points, points.mask, 0.0)
+ points = np.ma.filled(points, 0.0)
self._points = points
self._invalid = 0
return self._points
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-03-31 15:24:03
|
Revision: 7017
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7017&view=rev
Author: mdboom
Date: 2009-03-31 15:23:54 +0000 (Tue, 31 Mar 2009)
Log Message:
-----------
Merged revisions 7016 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r7016 | mdboom | 2009-03-31 11:22:06 -0400 (Tue, 31 Mar 2009) | 2 lines
Fix bug when specifying both scale and label in the axes constructor. Change to use new numpy putmask API.
........
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/transforms.py
Property Changed:
----------------
trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
trunk/matplotlib/doc/sphinxext/gen_gallery.py
trunk/matplotlib/doc/sphinxext/gen_rst.py
trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7014
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7016
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016
Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014
+ /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016
Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014
+ /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016
Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014
+ /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2009-03-31 15:22:06 UTC (rev 7016)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2009-03-31 15:23:54 UTC (rev 7017)
@@ -442,6 +442,8 @@
sharex=None, # use Axes instance's xaxis info
sharey=None, # use Axes instance's yaxis info
label='',
+ xscale=None,
+ yscale=None,
**kwargs
):
"""
@@ -548,6 +550,11 @@
self._axes_locator = None
+ if xscale:
+ self.set_xscale(xscale)
+ if yscale:
+ self.set_yscale(yscale)
+
if len(kwargs): martist.setp(self, **kwargs)
if self.xaxis is not None:
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014
+ /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014
+ /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014
+ /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016
Modified: trunk/matplotlib/lib/matplotlib/transforms.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/transforms.py 2009-03-31 15:22:06 UTC (rev 7016)
+++ trunk/matplotlib/lib/matplotlib/transforms.py 2009-03-31 15:23:54 UTC (rev 7017)
@@ -971,8 +971,7 @@
if self._invalid:
points = self._transform.transform(self._bbox.get_points())
if ma.isMaskedArray(points):
- points.putmask(0.0)
- points = np.asarray(points)
+ np.putmask(points, points.mask, 0.0)
self._points = points
self._invalid = 0
return self._points
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-03-31 15:22:25
|
Revision: 7016
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7016&view=rev
Author: mdboom
Date: 2009-03-31 15:22:06 +0000 (Tue, 31 Mar 2009)
Log Message:
-----------
Fix bug when specifying both scale and label in the axes constructor. Change to use new numpy putmask API.
Modified Paths:
--------------
branches/v0_98_5_maint/lib/matplotlib/axes.py
branches/v0_98_5_maint/lib/matplotlib/transforms.py
Modified: branches/v0_98_5_maint/lib/matplotlib/axes.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/axes.py 2009-03-31 15:13:24 UTC (rev 7015)
+++ branches/v0_98_5_maint/lib/matplotlib/axes.py 2009-03-31 15:22:06 UTC (rev 7016)
@@ -439,6 +439,8 @@
sharex=None, # use Axes instance's xaxis info
sharey=None, # use Axes instance's yaxis info
label='',
+ xscale=None,
+ yscale=None,
**kwargs
):
"""
@@ -543,6 +545,11 @@
self.set_navigate(True)
self.set_navigate_mode(None)
+ if xscale:
+ self.set_xscale(xscale)
+ if yscale:
+ self.set_yscale(yscale)
+
if len(kwargs): martist.setp(self, **kwargs)
if self.xaxis is not None:
Modified: branches/v0_98_5_maint/lib/matplotlib/transforms.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/transforms.py 2009-03-31 15:13:24 UTC (rev 7015)
+++ branches/v0_98_5_maint/lib/matplotlib/transforms.py 2009-03-31 15:22:06 UTC (rev 7016)
@@ -975,8 +975,7 @@
if self._invalid:
points = self._transform.transform(self._bbox.get_points())
if ma.isMaskedArray(points):
- points.putmask(0.0)
- points = np.asarray(points)
+ np.putmask(points, points.mask, 0.0)
self._points = points
self._invalid = 0
return self._points
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-03-31 15:13:38
|
Revision: 7015
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7015&view=rev
Author: mdboom
Date: 2009-03-31 15:13:24 +0000 (Tue, 31 Mar 2009)
Log Message:
-----------
Merged revisions 7014 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r7014 | mdboom | 2009-03-31 10:50:12 -0400 (Tue, 31 Mar 2009) | 2 lines
Remove some global caches in order to remove a theoretical threading problem.
........
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/mathtext.py
Property Changed:
----------------
trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
trunk/matplotlib/doc/sphinxext/gen_gallery.py
trunk/matplotlib/doc/sphinxext/gen_rst.py
trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7001
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7014
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014
Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001
+ /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014
Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001
+ /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014
Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001
+ /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014
Modified: trunk/matplotlib/lib/matplotlib/mathtext.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/mathtext.py 2009-03-31 14:50:12 UTC (rev 7014)
+++ trunk/matplotlib/lib/matplotlib/mathtext.py 2009-03-31 15:13:24 UTC (rev 7015)
@@ -653,17 +653,16 @@
'sf' : 'cmss10',
'ex' : 'cmex10'
}
- fontmap = {}
def __init__(self, *args, **kwargs):
self._stix_fallback = StixFonts(*args, **kwargs)
TruetypeFonts.__init__(self, *args, **kwargs)
- if not len(self.fontmap):
- for key, val in self._fontmap.iteritems():
- fullpath = findfont(val)
- self.fontmap[key] = fullpath
- self.fontmap[val] = fullpath
+ self.fontmap = {}
+ for key, val in self._fontmap.iteritems():
+ fullpath = findfont(val)
+ self.fontmap[key] = fullpath
+ self.fontmap[val] = fullpath
_slanted_symbols = set(r"\int \oint".split())
@@ -765,7 +764,6 @@
This class will "fallback" on the Bakoma fonts when a required
symbol can not be found in the font.
"""
- fontmap = {}
use_cmex = True
def __init__(self, *args, **kwargs):
@@ -775,14 +773,14 @@
else:
self.cm_fallback = None
TruetypeFonts.__init__(self, *args, **kwargs)
- if not len(self.fontmap):
- for texfont in "cal rm tt it bf sf".split():
- prop = rcParams['mathtext.' + texfont]
- font = findfont(prop)
- self.fontmap[texfont] = font
- prop = FontProperties('cmex10')
+ self.fontmap = {}
+ for texfont in "cal rm tt it bf sf".split():
+ prop = rcParams['mathtext.' + texfont]
font = findfont(prop)
- self.fontmap['ex'] = font
+ self.fontmap[texfont] = font
+ prop = FontProperties('cmex10')
+ font = findfont(prop)
+ self.fontmap['ex'] = font
_slanted_symbols = set(r"\int \oint".split())
@@ -891,18 +889,17 @@
4 : 'STIXSize4',
5 : 'STIXSize5'
}
- fontmap = {}
use_cmex = False
cm_fallback = False
_sans = False
def __init__(self, *args, **kwargs):
TruetypeFonts.__init__(self, *args, **kwargs)
- if not len(self.fontmap):
- for key, name in self._fontmap.iteritems():
- fullpath = findfont(name)
- self.fontmap[key] = fullpath
- self.fontmap[name] = fullpath
+ self.fontmap = {}
+ for key, name in self._fontmap.iteritems():
+ fullpath = findfont(name)
+ self.fontmap[key] = fullpath
+ self.fontmap[name] = fullpath
def _map_virtual_font(self, fontname, font_class, uniindex):
# Handle these "fonts" that are actually embedded in
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001
+ /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001
+ /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001
+ /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-03-31 14:50:38
|
Revision: 7014
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7014&view=rev
Author: mdboom
Date: 2009-03-31 14:50:12 +0000 (Tue, 31 Mar 2009)
Log Message:
-----------
Remove some global caches in order to remove a theoretical threading problem.
Modified Paths:
--------------
branches/v0_98_5_maint/lib/matplotlib/mathtext.py
Modified: branches/v0_98_5_maint/lib/matplotlib/mathtext.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/mathtext.py 2009-03-30 22:57:31 UTC (rev 7013)
+++ branches/v0_98_5_maint/lib/matplotlib/mathtext.py 2009-03-31 14:50:12 UTC (rev 7014)
@@ -652,17 +652,16 @@
'sf' : 'cmss10',
'ex' : 'cmex10'
}
- fontmap = {}
def __init__(self, *args, **kwargs):
self._stix_fallback = StixFonts(*args, **kwargs)
TruetypeFonts.__init__(self, *args, **kwargs)
- if not len(self.fontmap):
- for key, val in self._fontmap.iteritems():
- fullpath = findfont(val)
- self.fontmap[key] = fullpath
- self.fontmap[val] = fullpath
+ self.fontmap = {}
+ for key, val in self._fontmap.iteritems():
+ fullpath = findfont(val)
+ self.fontmap[key] = fullpath
+ self.fontmap[val] = fullpath
_slanted_symbols = set(r"\int \oint".split())
@@ -764,7 +763,6 @@
This class will "fallback" on the Bakoma fonts when a required
symbol can not be found in the font.
"""
- fontmap = {}
use_cmex = True
def __init__(self, *args, **kwargs):
@@ -774,14 +772,14 @@
else:
self.cm_fallback = None
TruetypeFonts.__init__(self, *args, **kwargs)
- if not len(self.fontmap):
- for texfont in "cal rm tt it bf sf".split():
- prop = rcParams['mathtext.' + texfont]
- font = findfont(prop)
- self.fontmap[texfont] = font
- prop = FontProperties('cmex10')
+ self.fontmap = {}
+ for texfont in "cal rm tt it bf sf".split():
+ prop = rcParams['mathtext.' + texfont]
font = findfont(prop)
- self.fontmap['ex'] = font
+ self.fontmap[texfont] = font
+ prop = FontProperties('cmex10')
+ font = findfont(prop)
+ self.fontmap['ex'] = font
_slanted_symbols = set(r"\int \oint".split())
@@ -890,18 +888,17 @@
4 : 'STIXSize4',
5 : 'STIXSize5'
}
- fontmap = {}
use_cmex = False
cm_fallback = False
_sans = False
def __init__(self, *args, **kwargs):
TruetypeFonts.__init__(self, *args, **kwargs)
- if not len(self.fontmap):
- for key, name in self._fontmap.iteritems():
- fullpath = findfont(name)
- self.fontmap[key] = fullpath
- self.fontmap[name] = fullpath
+ self.fontmap = {}
+ for key, name in self._fontmap.iteritems():
+ fullpath = findfont(name)
+ self.fontmap[key] = fullpath
+ self.fontmap[name] = fullpath
def _map_virtual_font(self, fontname, font_class, uniindex):
# Handle these "fonts" that are actually embedded in
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2009-03-30 22:57:50
|
Revision: 7013
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7013&view=rev
Author: jswhit
Date: 2009-03-30 22:57:31 +0000 (Mon, 30 Mar 2009)
Log Message:
-----------
added latmax kwarg to drawparallels and drawmeridians (patch from Chris Murphy).
Modified Paths:
--------------
trunk/toolkits/basemap/Changelog
trunk/toolkits/basemap/README
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog 2009-03-29 03:43:49 UTC (rev 7012)
+++ trunk/toolkits/basemap/Changelog 2009-03-30 22:57:31 UTC (rev 7013)
@@ -1,4 +1,6 @@
version 0.99.4 (not yet released)
+ * added latmax kwarg to drawparallels and drawmeridians
+ (patch from Chris Murphy).
* added new example "plotmap_shaded.py" (shaded relief plot).
* added new example "plothighsandlows.py".
* add fix_aspect kwarg to Basemap.__init__, when False
Modified: trunk/toolkits/basemap/README
===================================================================
--- trunk/toolkits/basemap/README 2009-03-29 03:43:49 UTC (rev 7012)
+++ trunk/toolkits/basemap/README 2009-03-30 22:57:31 UTC (rev 7013)
@@ -132,5 +132,6 @@
Ryan May
David Huard
Mauro Cavalcanti
+Chris Murphy
for valuable contributions.
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2009-03-29 03:43:49 UTC (rev 7012)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2009-03-30 22:57:31 UTC (rev 7013)
@@ -1711,7 +1711,8 @@
def drawparallels(self,circles,color='k',linewidth=1.,zorder=None, \
dashes=[1,1],labels=[0,0,0,0],labelstyle=None, \
- fmt='%g',xoffset=None,yoffset=None,ax=None,**kwargs):
+ fmt='%g',xoffset=None,yoffset=None,ax=None,latmax=None,
+ **kwargs):
"""
Draw and label parallels (latitude lines) for values (in degrees)
given in the sequence ``circles``.
@@ -1748,6 +1749,8 @@
(default is 0.01 times height of map in map
projection coordinates).
ax axes instance (overrides default axes instance)
+ latmax absolute value of latitude to which meridians are drawn
+ (default is 80).
\**kwargs additional keyword arguments controlling text
for labels that are passed on to
the text method of the axes instance (see
@@ -1769,7 +1772,7 @@
elif ax is None and self.ax is not None:
ax = self.ax
# don't draw meridians past latmax, always draw parallel at latmax.
- latmax = 80.
+ if latmax is None: latmax = 80.
# offset for labels.
if yoffset is None:
yoffset = (self.urcrnry-self.llcrnry)/100.
@@ -1968,7 +1971,8 @@
def drawmeridians(self,meridians,color='k',linewidth=1., zorder=None,\
dashes=[1,1],labels=[0,0,0,0],labelstyle=None,\
- fmt='%g',xoffset=None,yoffset=None,ax=None,**kwargs):
+ fmt='%g',xoffset=None,yoffset=None,ax=None,latmax=None,
+ **kwargs):
"""
Draw and label meridians (longitude lines) for values (in degrees)
given in the sequence ``meridians``.
@@ -2005,6 +2009,8 @@
(default is 0.01 times height of map in map
projection coordinates).
ax axes instance (overrides default axes instance)
+ latmax absolute value of latitude to which meridians are drawn
+ (default is 80).
\**kwargs additional keyword arguments controlling text
for labels that are passed on to
the text method of the axes instance (see
@@ -2026,7 +2032,7 @@
elif ax is None and self.ax is not None:
ax = self.ax
# don't draw meridians past latmax, always draw parallel at latmax.
- latmax = 80. # not used for cyl, merc or miller projections.
+ if latmax is None: latmax = 80. # unused w/ cyl, merc or miller proj.
# offset for labels.
if yoffset is None:
yoffset = (self.urcrnry-self.llcrnry)/100.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|