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: <ry...@us...> - 2010-05-28 16:56:51
|
Revision: 8340
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8340&view=rev
Author: ryanmay
Date: 2010-05-28 16:56:45 +0000 (Fri, 28 May 2010)
Log Message:
-----------
Fix typos in set_xlim docstring.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2010-05-27 18:56:19 UTC (rev 8339)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2010-05-28 16:56:45 UTC (rev 8340)
@@ -2184,9 +2184,9 @@
Keyword arguments:
- *ymin*: scalar
+ *xmin*: scalar
the min of the ylim
- *ymax*: scalar
+ *xmax*: scalar
the max of the ylim
*emit*: [ True | False ]
notify observers of lim change
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2010-05-27 18:56:25
|
Revision: 8339
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8339&view=rev
Author: jswhit
Date: 2010-05-27 18:56:19 +0000 (Thu, 27 May 2010)
Log Message:
-----------
raise ImportError if trying to plot on triangular grids with basemap < 1.0
Modified Paths:
--------------
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-05-27 12:43:32 UTC (rev 8338)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-05-27 18:56:19 UTC (rev 8339)
@@ -2755,6 +2755,11 @@
ax.hold(h)
try:
if tri:
+ try:
+ import matplotlib.tri as tri
+ except:
+ msg='need basemap > 0.99.1 to plot on unstructured grids'
+ Raise ImportError(msg)
# for unstructured grids, toss out points outside
# projection limb (don't use those points in triangulation).
if hasattr(data,'mask'):
@@ -2767,7 +2772,6 @@
y = np.compress(mask,y)
data = np.compress(mask,data)
if masked:
- import matplotlib.tri as tri
triang = tri.Triangulation(x, y)
z = data[triang.triangles]
mask = (z > 1.e20).sum(axis=-1)
@@ -2841,6 +2845,11 @@
ax.hold(h)
try:
if kwargs.has_key('tri') and kwargs['tri']:
+ try:
+ import matplotlib.tri as tri
+ except:
+ msg='need basemap > 0.99.1 to plot on unstructured grids'
+ Raise ImportError(msg)
# for unstructured grids, toss out points outside
# projection limb (don't use those points in triangulation).
if hasattr(data,'mask'):
@@ -2853,7 +2862,6 @@
y = np.compress(mask,y)
data = np.compress(mask,data)
if masked:
- import matplotlib.tri as tri
triang = tri.Triangulation(x, y)
z = data[triang.triangles]
mask = (z > 1.e20).sum(axis=-1)
@@ -2922,6 +2930,11 @@
ax.hold(h)
try:
if kwargs.has_key('tri') and kwargs['tri']:
+ try:
+ import matplotlib.tri as tri
+ except:
+ msg='need basemap > 0.99.1 to plot on unstructured grids'
+ Raise ImportError(msg)
# for unstructured grids, toss out points outside
# projection limb (don't use those points in triangulation).
if hasattr(data,'mask'):
@@ -2934,7 +2947,6 @@
y = np.compress(mask,y)
data = np.compress(mask,data)
if masked:
- import matplotlib.tri as tri
triang = tri.Triangulation(x, y)
z = data[triang.triangles]
mask = (z > 1.e20).sum(axis=-1)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2010-05-27 12:43:39
|
Revision: 8338
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8338&view=rev
Author: mdboom
Date: 2010-05-27 12:43:32 +0000 (Thu, 27 May 2010)
Log Message:
-----------
Fix bug where Truetype fonts were being used to calculate text metrics, even when rcParam['text.usetex'] is True.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/backends/backend_agg.py
trunk/matplotlib/lib/matplotlib/backends/backend_svg.py
trunk/matplotlib/lib/matplotlib/text.py
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_agg.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2010-05-26 15:03:34 UTC (rev 8337)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2010-05-27 12:43:32 UTC (rev 8338)
@@ -162,7 +162,7 @@
# texmanager more efficient. It is not meant to be used
# outside the backend
"""
- if ismath=='TeX':
+ if rcParams['text.usetex']:
# todo: handle props
size = prop.get_size_in_points()
texmanager = self.get_texmanager()
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_svg.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_svg.py 2010-05-26 15:03:34 UTC (rev 8337)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_svg.py 2010-05-27 12:43:32 UTC (rev 8338)
@@ -800,7 +800,7 @@
return self.width, self.height
def get_text_width_height_descent(self, s, prop, ismath):
- if ismath == "TeX":
+ if rcParams['text.usetex']:
size = prop.get_size_in_points()
texmanager = self._text2path.get_texmanager()
fontsize = prop.get_size_in_points()
Modified: trunk/matplotlib/lib/matplotlib/text.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/text.py 2010-05-26 15:03:34 UTC (rev 8337)
+++ trunk/matplotlib/lib/matplotlib/text.py 2010-05-27 12:43:32 UTC (rev 8338)
@@ -565,27 +565,24 @@
else:
renderer.draw_tex(gc, x, y, clean_line,
self._fontproperties, angle)
- gc.restore()
- renderer.close_group('text')
- return
+ else:
+ for line, wh, x, y in info:
+ x = x + posx
+ y = y + posy
+ if renderer.flipy():
+ y = canvash-y
+ clean_line, ismath = self.is_math_text(line)
- for line, wh, x, y in info:
- x = x + posx
- y = y + posy
- if renderer.flipy():
- y = canvash-y
- clean_line, ismath = self.is_math_text(line)
+ if self.get_path_effects():
+ for path_effect in self.get_path_effects():
+ path_effect.draw_text(renderer, gc, x, y, clean_line,
+ self._fontproperties, angle,
+ ismath=ismath)
+ else:
+ renderer.draw_text(gc, x, y, clean_line,
+ self._fontproperties, angle,
+ ismath=ismath)
- if self.get_path_effects():
- for path_effect in self.get_path_effects():
- path_effect.draw_text(renderer, gc, x, y, clean_line,
- self._fontproperties, angle,
- ismath=ismath)
- else:
- renderer.draw_text(gc, x, y, clean_line,
- self._fontproperties, angle,
- ismath=ismath)
-
gc.restore()
renderer.close_group('text')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2010-05-26 15:03:41
|
Revision: 8337
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8337&view=rev
Author: jdh2358
Date: 2010-05-26 15:03:34 +0000 (Wed, 26 May 2010)
Log Message:
-----------
fix the download urls for zlib and libpng for osx build
Modified Paths:
--------------
trunk/matplotlib/make.osx
Modified: trunk/matplotlib/make.osx
===================================================================
--- trunk/matplotlib/make.osx 2010-05-26 12:46:46 UTC (rev 8336)
+++ trunk/matplotlib/make.osx 2010-05-26 15:03:34 UTC (rev 8337)
@@ -29,9 +29,10 @@
build
+
fetch:
- ${PYTHON} -c 'import urllib; urllib.urlretrieve("http://www.zlib.net/zlib-${ZLIBVERSION}.tar.gz", "zlib-${ZLIBVERSION}.tar.gz")' &&\
- ${PYTHON} -c 'import urllib; urllib.urlretrieve("http://downloads.sourceforge.net/project/libpng/libpng-stable/${PNGVERSION}/libpng-${PNGVERSION}.tar.gz", "libpng-${PNGVERSION}.tar.gz")' &&\
+ ${PYTHON} -c 'import urllib; urllib.urlretrieve("http://superb-sea2.dl.sourceforge.net/project/libpng/zlib/${ZLIBVERSION}/zlib-${ZLIBVERSION}.tar.gz", "zlib-${ZLIBVERSION}.tar.gz")' &&\
+ ${PYTHON} -c 'import urllib; urllib.urlretrieve("http://sourceforge.net/projects/libpng/files/libpng-stable/${PNGVERSION}/libpng-${PNGVERSION}.tar.gz/download", "libpng-${PNGVERSION}.tar.gz")' &&\
${PYTHON} -c 'import urllib; urllib.urlretrieve("http://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPEVERSION}.tar.bz2", "freetype-${FREETYPEVERSION}.tar.bz2")'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2010-05-26 12:46:52
|
Revision: 8336
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8336&view=rev
Author: jdh2358
Date: 2010-05-26 12:46:46 +0000 (Wed, 26 May 2010)
Log Message:
-----------
fixed a tar argument bug in make.osx
Modified Paths:
--------------
trunk/matplotlib/make.osx
Modified: trunk/matplotlib/make.osx
===================================================================
--- trunk/matplotlib/make.osx 2010-05-24 20:06:20 UTC (rev 8335)
+++ trunk/matplotlib/make.osx 2010-05-26 12:46:46 UTC (rev 8336)
@@ -40,7 +40,7 @@
zlib:
export PKG_CONFIG_PATH=${PKG_CONFIG_PATH} &&\
rm -rf zlib-${ZLIBVERSION} &&\
- tar xvfj zlib-${ZLIBVERSION}.tar.gz &&\
+ tar xvfz zlib-${ZLIBVERSION}.tar.gz &&\
cd zlib-${ZLIBVERSION} &&\
export MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} &&\
export CFLAGS=${CFLAGS} &&\
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2010-05-24 20:06:26
|
Revision: 8335
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8335&view=rev
Author: efiring
Date: 2010-05-24 20:06:20 +0000 (Mon, 24 May 2010)
Log Message:
-----------
collections: fix bug in handling of antialiased kwarg
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/collections.py
Modified: trunk/matplotlib/lib/matplotlib/collections.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/collections.py 2010-05-24 13:27:58 UTC (rev 8334)
+++ trunk/matplotlib/lib/matplotlib/collections.py 2010-05-24 20:06:20 UTC (rev 8335)
@@ -109,29 +109,31 @@
self.update(kwargs)
self._paths = None
-
- def _get_value(self, val):
- try: return (float(val), )
+ @staticmethod
+ def _get_value(val):
+ try:
+ return (float(val), )
except TypeError:
if cbook.iterable(val) and len(val):
- try: float(val[0])
- except TypeError: pass # raise below
- except ValueError: pass
- else: return val
+ try:
+ float(val[0])
+ except (TypeError, ValueError):
+ pass # raise below
+ else:
+ return val
raise TypeError('val must be a float or nonzero sequence of floats')
- def _get_bool(self, val):
- try: return (bool(val), )
- except TypeError:
- if cbook.iterable(val) and len(val):
- try: bool(val[0])
- except TypeError: pass # raise below
- else: return val
+ @staticmethod
+ def _get_bool(val):
+ if not cbook.iterable(val):
+ val = (val,)
+ try:
+ bool(val[0])
+ except (TypeError, IndexError):
+ raise TypeError('val must be a bool or nonzero sequence of them')
+ return val
- raise TypeError('val must be a bool or nonzero sequence of them')
-
-
def get_paths(self):
return self._paths
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2010-05-24 13:28:05
|
Revision: 8334
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8334&view=rev
Author: mdboom
Date: 2010-05-24 13:27:58 +0000 (Mon, 24 May 2010)
Log Message:
-----------
Fix mathtext_stixsans.svg baseline image -- it was generated with a narrow Python build before...
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stixsans.svg
Modified: trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stixsans.svg
===================================================================
--- trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stixsans.svg 2010-05-23 16:49:22 UTC (rev 8333)
+++ trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stixsans.svg 2010-05-24 13:27:58 UTC (rev 8334)
@@ -15,21 +15,23 @@
</g>
<g id="text1">
<defs>
-<path id="c_d41d8cd98f00b204e9800998ecf8427e" d=""/>
+<path id="c_25d8d75d645916e52358352244005134" d="M33.406250 -13.203125l2.296875 -9.000000q-21.796875 3.500000 -21.796875 12.609375q0.000000 3.500000 4.796875 3.500000q6.796875 0.000000 14.703125 -7.109375M16.906250 -30.203125l-4.109375 -3.093750q3.000000 -6.796875 8.546875 -9.890625q5.562500 -3.109375 12.062500 -3.109375q6.296875 0.000000 9.796875 2.656250q3.500000 2.640625 3.500000 7.437500q0.000000 1.406250 -0.500000 3.609375l-6.296875 25.000000q-0.812500 2.890625 -0.812500 7.593750l-8.500000 0.000000l0.500000 -4.406250q-7.187500 5.406250 -16.187500 5.406250q-4.406250 0.000000 -6.906250 -1.953125q-2.500000 -1.953125 -2.500000 -5.640625q0.000000 -16.812500 32.000000 -22.812500l0.796875 -3.296875q0.203125 -1.000000 0.203125 -1.500000q0.000000 -2.296875 -1.953125 -3.640625q-1.953125 -1.359375 -5.140625 -1.359375q-7.609375 0.000000 -13.000000 9.000000z"/>
<path id="c_6d61cf1c82e1e3b046bf4a8a4ce74492" d="M63.593750 -22.000000l-26.093750 0.000000l0.000000 26.093750l-6.593750 0.000000l0.000000 -26.093750l-26.109375 0.000000l0.000000 -6.593750l26.109375 0.000000l0.000000 -26.109375l6.593750 0.000000l0.000000 26.109375l26.093750 0.000000z"/>
+<path id="c_826053ccf0eb1782eb81655b9ae21e32" d="M21.703125 -30.203125l-5.203125 20.796875q3.093750 3.312500 8.296875 3.312500q7.203125 0.000000 13.796875 -6.296875q6.609375 -6.312500 6.609375 -16.406250q0.000000 -4.796875 -2.562500 -7.593750q-2.546875 -2.812500 -7.437500 -2.812500q-3.609375 0.000000 -7.265625 2.359375q-3.640625 2.343750 -6.234375 6.640625M31.093750 -67.906250l-6.593750 26.500000q6.703125 -4.890625 14.000000 -4.890625q7.000000 0.000000 11.000000 4.046875q4.000000 4.046875 4.000000 10.953125q0.000000 13.093750 -9.500000 22.703125q-9.500000 9.593750 -21.500000 9.593750q-10.296875 0.000000 -15.093750 -5.703125l15.296875 -61.296875l7.593750 -2.406250z"/>
<path id="c_fc95c14ae53d84dcadbae58b59b619db" d="M88.796875 -4.296875q0.000000 2.203125 -1.656250 3.796875q-1.640625 1.593750 -3.937500 1.593750q-2.296875 0.000000 -3.906250 -1.593750q-1.593750 -1.593750 -1.593750 -3.890625q0.000000 -2.312500 1.640625 -3.953125q1.656250 -1.656250 3.953125 -1.656250q2.203125 0.000000 3.843750 1.703125q1.656250 1.703125 1.656250 4.000000M55.500000 -4.296875q0.000000 2.203125 -1.656250 3.796875q-1.640625 1.593750 -3.953125 1.593750q-2.296875 0.000000 -3.890625 -1.593750q-1.593750 -1.593750 -1.593750 -3.890625q0.000000 -2.312500 1.640625 -3.953125q1.656250 -1.656250 3.953125 -1.656250q2.203125 0.000000 3.843750 1.703125q1.656250 1.703125 1.656250 4.000000M22.203125 -4.296875q0.000000 2.203125 -1.656250 3.796875q-1.640625 1.593750 -3.953125 1.593750q-2.296875 0.000000 -3.906250 -1.593750q-1.593750 -1.593750 -1.593750 -3.890625q0.000000 -2.312500 1.656250 -3.953125q1.656250 -1.656250 3.953125 -1.656250q2.203125 0.000000 3.843750 1.703125q1.656250 1.703125 1.656250 4.000000"/>
<path id="c_1f9f21748a8192e4b02486ea6b430217" d="M29.906250 -57.203125q0.000000 2.109375 -1.453125 3.515625q-1.453125 1.390625 -3.546875 1.390625q-2.000000 0.000000 -3.453125 -1.453125q-1.453125 -1.453125 -1.453125 -3.453125q0.000000 -2.093750 1.343750 -3.546875q1.359375 -1.453125 3.562500 -1.453125q2.296875 0.000000 3.640625 1.406250q1.359375 1.390625 1.359375 3.593750"/>
+<path id="c_05f7a7ac53a947eba7756092cf3c70f2" d="M43.203125 -41.000000l-2.203125 8.906250l-1.500000 0.000000q-1.703125 -4.406250 -4.203125 -5.796875q-2.500000 -1.406250 -6.406250 -1.406250q-3.890625 0.000000 -5.843750 2.156250q-1.953125 2.140625 -1.953125 4.140625q0.000000 2.000000 1.703125 3.453125q1.703125 1.453125 5.000000 3.046875q6.000000 2.906250 8.343750 5.156250q2.359375 2.250000 2.359375 5.546875q0.000000 6.796875 -5.609375 11.796875q-5.593750 5.000000 -14.296875 5.000000q-4.500000 0.000000 -7.203125 -1.296875q-2.687500 -1.296875 -5.296875 -4.203125l2.500000 -10.296875l1.500000 0.000000q1.812500 8.703125 10.906250 8.703125q3.406250 0.000000 6.296875 -1.750000q2.906250 -1.750000 2.906250 -4.953125q0.000000 -1.500000 -1.609375 -2.843750q-1.593750 -1.359375 -5.390625 -3.265625q-5.500000 -2.796875 -7.953125 -5.390625q-2.453125 -2.609375 -2.453125 -6.000000q0.000000 -6.203125 5.203125 -11.093750q5.203125 -4.906250 12.906250 -4.906250q8.687500 0.000000 12.296875 5.296875"/>
</defs>
<g id="mathtext1">
<g style="fill: #000000" transform="translate(0.000000,37.000000)">
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(0.000000,-1.750000)scale(0.120000)"/>
+<use xlink:href="#c_25d8d75d645916e52358352244005134" transform="translate(0.000000,-1.750000)scale(0.120000)"/>
<use xlink:href="#c_6d61cf1c82e1e3b046bf4a8a4ce74492" transform="translate(7.190390,-1.750000)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(16.051663,-1.750000)scale(0.120000)"/>
+<use xlink:href="#c_826053ccf0eb1782eb81655b9ae21e32" transform="translate(16.051663,-1.750000)scale(0.120000)"/>
<use xlink:href="#c_6d61cf1c82e1e3b046bf4a8a4ce74492" transform="translate(23.818057,-1.750000)scale(0.120000)"/>
<use xlink:href="#c_fc95c14ae53d84dcadbae58b59b619db" transform="translate(34.493729,-1.750000)scale(0.120000)"/>
<use xlink:href="#c_6d61cf1c82e1e3b046bf4a8a4ce74492" transform="translate(47.435025,-1.750000)scale(0.120000)"/>
<use xlink:href="#c_1f9f21748a8192e4b02486ea6b430217" transform="translate(55.890048,-2.531250)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(56.296298,-1.750000)scale(0.120000)"/>
+<use xlink:href="#c_05f7a7ac53a947eba7756092cf3c70f2" transform="translate(56.296298,-1.750000)scale(0.120000)"/>
<use xlink:href="#c_6d61cf1c82e1e3b046bf4a8a4ce74492" transform="translate(62.778680,-1.750000)scale(0.120000)"/>
<use xlink:href="#c_fc95c14ae53d84dcadbae58b59b619db" transform="translate(71.639954,-1.750000)scale(0.120000)"/>
</g>
@@ -37,13 +39,15 @@
</g>
<g id="text2">
<defs>
+<path id="c_f05135d5b912bce163b97372f515d1c6" d="M54.406250 -45.296875l-20.000000 21.703125l10.796875 23.593750l-9.406250 0.000000l-7.890625 -17.500000l-15.500000 17.500000l-9.406250 0.000000l22.000000 -23.906250l-9.593750 -21.390625l9.390625 0.000000l6.796875 15.093750l13.406250 -15.093750z"/>
<path id="c_25b42bc508aceda29e22e0696b5a94c2" d="M40.500000 -54.796875q0.000000 2.593750 -1.750000 4.500000q-1.750000 1.890625 -4.546875 1.890625q-2.906250 0.000000 -4.656250 -1.750000q-1.750000 -1.750000 -1.750000 -4.640625q0.000000 -2.703125 1.953125 -4.500000q1.953125 -1.796875 4.453125 -1.796875q2.500000 0.000000 4.390625 1.796875q1.906250 1.796875 1.906250 4.500000M63.703125 -32.000000l-58.906250 0.000000l0.000000 -6.593750l58.906250 0.000000zM63.703125 -12.000000l-58.906250 0.000000l0.000000 -6.593750l58.906250 0.000000z"/>
+<path id="c_bace3846b2e287fe11636a6b244f3748" d="M56.500000 -45.296875l-30.093750 49.703125q-5.406250 8.890625 -10.265625 13.031250q-4.843750 4.156250 -11.234375 4.156250q-4.812500 0.000000 -6.812500 -2.390625l1.812500 -7.203125l1.593750 0.000000q2.593750 2.406250 5.406250 2.406250q3.187500 0.000000 6.890625 -3.859375q3.703125 -3.843750 7.109375 -9.953125q0.187500 -0.390625 0.890625 -1.531250q0.703125 -1.156250 1.000000 -1.765625q-1.390625 -8.093750 -4.500000 -23.687500q-3.093750 -15.609375 -3.703125 -18.906250l8.609375 0.000000l5.890625 32.296875l18.906250 -32.296875z"/>
</defs>
<g id="mathtext2">
<g style="fill: #000000" transform="translate(0.000000,75.000000)">
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(0.000000,-3.671875)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(0.000000,-3.671875)scale(0.120000)"/>
<use xlink:href="#c_25b42bc508aceda29e22e0696b5a94c2" transform="translate(7.598395,-3.671875)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(16.475293,-3.671875)scale(0.120000)"/>
+<use xlink:href="#c_bace3846b2e287fe11636a6b244f3748" transform="translate(16.475293,-3.671875)scale(0.120000)"/>
</g>
</g>
</g>
@@ -75,19 +79,20 @@
<g id="text4">
<defs>
<path id="c_0597d6c6085d3f9dda27f55e74086b94" d="M26.406250 -63.703125l0.000000 24.609375q8.500000 4.593750 11.796875 7.140625q3.296875 2.546875 5.500000 5.953125q2.093750 3.203125 2.093750 9.000000q0.000000 8.093750 -4.953125 11.906250q-4.937500 3.796875 -14.437500 5.093750l0.000000 8.703125l-3.406250 0.000000l0.000000 -8.703125q-6.406250 0.000000 -10.406250 -1.140625q-4.000000 -1.156250 -8.187500 -3.953125l0.000000 -13.000000l1.500000 0.000000q1.593750 7.390625 5.984375 11.343750q4.406250 3.953125 11.109375 3.953125l0.000000 -28.203125q-10.500000 -5.906250 -14.156250 -10.000000q-3.640625 -4.093750 -3.640625 -10.296875q0.000000 -7.000000 5.093750 -10.796875q5.109375 -3.812500 12.703125 -4.312500l0.000000 -6.296875l3.406250 0.000000l0.000000 6.296875q11.500000 0.703125 16.093750 5.312500l0.000000 11.093750l-1.500000 0.000000q-1.500000 -6.203125 -5.046875 -9.593750q-3.546875 -3.406250 -9.546875 -4.109375M23.000000 -40.703125l0.000000 -23.000000q-10.406250 2.109375 -10.406250 10.500000q0.000000 3.296875 2.046875 5.750000q2.062500 2.453125 8.359375 6.750000M26.406250 -29.296875l0.000000 26.500000q6.187500 -1.296875 8.781250 -3.953125q2.609375 -2.656250 2.609375 -7.953125q0.000000 -4.593750 -2.296875 -7.593750q-2.296875 -3.000000 -9.093750 -7.000000"/>
-<path id="c_d94169ffd7d02f6db3328022ee3a311d" d="M81.703125 -22.296875l-38.296875 44.000000l-37.906250 -43.796875l38.406250 -44.109375zM41.406250 -5.796875l3.796875 0.000000q0.890625 -7.203125 5.203125 -12.000000q6.890625 -5.609375 8.937500 -8.703125q2.062500 -3.093750 2.062500 -7.000000q0.000000 -5.796875 -5.656250 -10.046875q-5.656250 -4.250000 -12.156250 -4.250000q-7.593750 0.000000 -12.500000 4.546875q-4.890625 4.546875 -4.890625 10.250000q0.000000 2.203125 1.796875 3.656250q1.796875 1.437500 3.687500 1.437500q1.906250 0.000000 3.609375 -1.140625q1.703125 -1.156250 1.703125 -2.546875q0.000000 -1.312500 -1.609375 -2.500000q-1.593750 -1.203125 -1.593750 -2.703125q0.000000 -2.406250 2.593750 -4.656250q2.609375 -2.250000 6.203125 -2.250000q8.609375 0.000000 8.609375 9.500000q0.000000 2.609375 -0.859375 4.906250q-0.843750 2.296875 -2.640625 5.250000q-1.796875 2.953125 -2.406250 4.343750q-3.703125 8.000000 -3.890625 13.906250M48.296875 4.906250q0.000000 -2.406250 -1.546875 -3.859375q-1.546875 -1.453125 -3.656250 -1.453125q-2.000000 0.000000 -3.500000 1.453125q-1.500000 1.453125 -1.500000 3.953125q0.000000 1.703125 1.546875 3.250000q1.562500 1.546875 3.453125 1.546875q2.000000 0.000000 3.593750 -1.609375q1.609375 -1.593750 1.609375 -3.281250"/>
+<path id="c_60609572cbbae62115937cf2c175839d" d="M30.203125 -0.000000l-7.906250 0.000000l0.000000 -57.000000q-2.203125 1.000000 -6.546875 3.250000q-4.343750 2.250000 -4.953125 2.546875l0.000000 -7.296875l18.000000 -9.203125l1.406250 0.500000z"/>
+<path id="c_e4a2cb0daf610cb8203a7033b3934ddc" d="M47.703125 -33.000000q0.000000 9.203125 -2.156250 16.656250q-2.140625 7.437500 -7.453125 12.593750q-5.296875 5.156250 -13.093750 5.156250q-6.203125 0.000000 -10.750000 -3.093750q-4.546875 -3.109375 -7.046875 -8.359375q-2.500000 -5.250000 -3.703125 -11.093750q-1.203125 -5.859375 -1.203125 -12.453125q0.000000 -9.312500 2.296875 -16.750000q2.312500 -7.453125 7.703125 -12.343750q5.406250 -4.906250 13.109375 -4.906250q9.796875 0.000000 16.046875 9.656250q6.250000 9.640625 6.250000 24.937500M39.796875 -33.000000q0.000000 -12.203125 -4.046875 -19.843750q-4.046875 -7.656250 -10.546875 -7.656250q-7.406250 0.000000 -11.203125 7.750000q-3.796875 7.750000 -3.796875 19.343750q0.000000 5.203125 0.750000 9.859375q0.750000 4.640625 2.390625 8.796875q1.656250 4.156250 4.656250 6.609375q3.000000 2.437500 7.000000 2.437500q5.093750 0.000000 8.546875 -4.093750q3.453125 -4.109375 4.843750 -10.046875q1.406250 -5.953125 1.406250 -13.156250"/>
<path id="c_27834dfa4110c1591e7247b835f3cbea" d="M18.093750 -4.296875q0.000000 2.203125 -1.656250 3.796875q-1.640625 1.593750 -3.937500 1.593750q-2.296875 0.000000 -3.906250 -1.593750q-1.593750 -1.593750 -1.593750 -3.890625q0.000000 -2.312500 1.640625 -3.953125q1.656250 -1.656250 3.953125 -1.656250q2.203125 0.000000 3.843750 1.703125q1.656250 1.703125 1.656250 4.000000"/>
</defs>
<g id="mathtext4">
<g style="fill: #000000" transform="translate(0.000000,149.000000)">
<use xlink:href="#c_0597d6c6085d3f9dda27f55e74086b94" transform="translate(0.000000,-10.896875)scale(0.084000)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(4.199989,-10.896875)scale(0.084000)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(8.399979,-10.896875)scale(0.084000)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(12.599968,-10.896875)scale(0.084000)"/>
+<use xlink:href="#c_60609572cbbae62115937cf2c175839d" transform="translate(4.199989,-10.896875)scale(0.084000)"/>
+<use xlink:href="#c_e4a2cb0daf610cb8203a7033b3934ddc" transform="translate(8.399979,-10.896875)scale(0.084000)"/>
+<use xlink:href="#c_e4a2cb0daf610cb8203a7033b3934ddc" transform="translate(12.599968,-10.896875)scale(0.084000)"/>
<use xlink:href="#c_27834dfa4110c1591e7247b835f3cbea" transform="translate(16.799957,-10.896875)scale(0.084000)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(18.999724,-10.896875)scale(0.084000)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(23.199713,-10.896875)scale(0.084000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(12.000000,-2.607813)scale(0.084000)"/>
+<use xlink:href="#c_e4a2cb0daf610cb8203a7033b3934ddc" transform="translate(18.999724,-10.896875)scale(0.084000)"/>
+<use xlink:href="#c_e4a2cb0daf610cb8203a7033b3934ddc" transform="translate(23.199713,-10.896875)scale(0.084000)"/>
+<use xlink:href="#c_bace3846b2e287fe11636a6b244f3748" transform="translate(12.000000,-2.607813)scale(0.084000)"/>
</g>
<g style="fill: #000000; stroke: none" transform="translate(0.000000,149.000000)">
<rect x="0.000000" y="-8.164062" width="27.399702" height="0.750000" fill="black" stroke="none" /></g></g>
@@ -95,8 +100,8 @@
<g id="text5">
<g id="mathtext5">
<g style="fill: #000000" transform="translate(0.000000,183.000000)">
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(0.000000,-3.562500)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(5.783997,-3.562500)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(0.000000,-3.562500)scale(0.120000)"/>
+<use xlink:href="#c_bace3846b2e287fe11636a6b244f3748" transform="translate(5.783997,-3.562500)scale(0.120000)"/>
</g>
</g>
</g>
@@ -110,24 +115,24 @@
</defs>
<g id="mathtext6">
<g style="fill: #000000" transform="translate(0.000000,219.000000)">
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(0.000000,-3.890625)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(0.000000,-3.890625)scale(0.120000)"/>
<use xlink:href="#c_6d61cf1c82e1e3b046bf4a8a4ce74492" transform="translate(7.598395,-3.890625)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(16.459668,-3.890625)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(24.989249,-3.890625)scale(0.120000)"/>
+<use xlink:href="#c_bace3846b2e287fe11636a6b244f3748" transform="translate(16.459668,-3.890625)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(24.989249,-3.890625)scale(0.120000)"/>
<use xlink:href="#c_519059ea6f41296df30fe3fad0eae726" transform="translate(32.587643,-3.890625)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(41.464542,-3.890625)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(49.994122,-3.890625)scale(0.120000)"/>
+<use xlink:href="#c_bace3846b2e287fe11636a6b244f3748" transform="translate(41.464542,-3.890625)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(49.994122,-3.890625)scale(0.120000)"/>
<use xlink:href="#c_5eb151336d118bfd884917d60c118224" transform="translate(57.592517,-3.890625)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(66.172540,-3.890625)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(74.702121,-3.890625)scale(0.120000)"/>
+<use xlink:href="#c_bace3846b2e287fe11636a6b244f3748" transform="translate(66.172540,-3.890625)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(74.702121,-3.890625)scale(0.120000)"/>
<use xlink:href="#c_d384e9b476db90868848fe0faafedf48" transform="translate(82.300516,-3.890625)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(85.443039,-3.890625)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(93.972620,-3.890625)scale(0.120000)"/>
+<use xlink:href="#c_bace3846b2e287fe11636a6b244f3748" transform="translate(85.443039,-3.890625)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(93.972620,-3.890625)scale(0.120000)"/>
<use xlink:href="#c_30f1094e9378a8c1fca570b0466f2f41" transform="translate(99.756616,-3.890625)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(103.242889,-3.890625)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(111.772470,-3.890625)scale(0.120000)"/>
+<use xlink:href="#c_bace3846b2e287fe11636a6b244f3748" transform="translate(103.242889,-3.890625)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(111.772470,-3.890625)scale(0.120000)"/>
<use xlink:href="#c_9aa6e17223c545e8338f5ff0b24f4cda" transform="translate(117.556467,-3.890625)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(128.608453,-3.890625)scale(0.120000)"/>
+<use xlink:href="#c_bace3846b2e287fe11636a6b244f3748" transform="translate(128.608453,-3.890625)scale(0.120000)"/>
</g>
</g>
</g>
@@ -139,20 +144,20 @@
</defs>
<g id="mathtext7">
<g style="fill: #000000" transform="translate(0.000000,255.000000)">
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(0.000000,-3.281250)scale(0.120000)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(5.999985,-3.281250)scale(0.120000)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(11.999969,-3.281250)scale(0.120000)"/>
+<use xlink:href="#c_60609572cbbae62115937cf2c175839d" transform="translate(0.000000,-3.281250)scale(0.120000)"/>
+<use xlink:href="#c_e4a2cb0daf610cb8203a7033b3934ddc" transform="translate(5.999985,-3.281250)scale(0.120000)"/>
+<use xlink:href="#c_e4a2cb0daf610cb8203a7033b3934ddc" transform="translate(11.999969,-3.281250)scale(0.120000)"/>
<use xlink:href="#c_04ec219230301ffd3bdc1b0f3a6caace" transform="translate(17.999954,-3.281250)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(26.963943,-3.281250)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(35.493524,-3.281250)scale(0.120000)"/>
+<use xlink:href="#c_bace3846b2e287fe11636a6b244f3748" transform="translate(26.963943,-3.281250)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(35.493524,-3.281250)scale(0.120000)"/>
<use xlink:href="#c_a34adc27889ef263dda80df8727e283a" transform="translate(43.091919,-3.281250)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(49.281317,-3.281250)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(57.810898,-3.281250)scale(0.120000)"/>
+<use xlink:href="#c_bace3846b2e287fe11636a6b244f3748" transform="translate(49.281317,-3.281250)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(57.810898,-3.281250)scale(0.120000)"/>
<use xlink:href="#c_d8ef88ee6539049965d1028e821e417b" transform="translate(63.594894,-3.281250)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(66.930893,-3.281250)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(72.738876,-3.281250)scale(0.120000)"/>
+<use xlink:href="#c_bace3846b2e287fe11636a6b244f3748" transform="translate(66.930893,-3.281250)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(72.738876,-3.281250)scale(0.120000)"/>
<use xlink:href="#c_0597d6c6085d3f9dda27f55e74086b94" transform="translate(78.522873,-3.281250)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(84.522858,-3.281250)scale(0.120000)"/>
+<use xlink:href="#c_bace3846b2e287fe11636a6b244f3748" transform="translate(84.522858,-3.281250)scale(0.120000)"/>
</g>
</g>
</g>
@@ -164,61 +169,68 @@
</defs>
<g id="mathtext8">
<g style="fill: #000000" transform="translate(0.000000,291.000000)">
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(0.000000,-3.062500)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(0.000000,-3.062500)scale(0.120000)"/>
<use xlink:href="#c_24e9b3c9435a8f402fc637f2ae86056e" transform="translate(7.598395,-3.062500)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(18.834668,-3.062500)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(27.364249,-3.062500)scale(0.120000)"/>
+<use xlink:href="#c_bace3846b2e287fe11636a6b244f3748" transform="translate(18.834668,-3.062500)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(27.364249,-3.062500)scale(0.120000)"/>
<use xlink:href="#c_2f496cffb1de56e8d28181db159e6cc8" transform="translate(33.148245,-3.062500)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(39.868231,-3.062500)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(48.397812,-3.062500)scale(0.120000)"/>
+<use xlink:href="#c_bace3846b2e287fe11636a6b244f3748" transform="translate(39.868231,-3.062500)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(48.397812,-3.062500)scale(0.120000)"/>
<use xlink:href="#c_4af5377643bc74ce8d20e189a0088aad" transform="translate(54.181808,-3.062500)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(62.401794,-3.062500)scale(0.120000)"/>
+<use xlink:href="#c_bace3846b2e287fe11636a6b244f3748" transform="translate(62.401794,-3.062500)scale(0.120000)"/>
</g>
</g>
</g>
<g id="text9">
<defs>
-<path id="c_d41d8cd98f00b204e9800998ecf8427e" d=""/>
+<path id="c_5922300fc509de44a716b5ecdf576bd3" d="M48.593750 -0.000000l-13.796875 0.000000l-10.000000 -14.296875l-9.000000 14.296875l-13.796875 0.000000l15.906250 -24.296875l-14.812500 -21.796875l13.703125 0.000000l8.296875 12.093750l7.906250 -12.093750l13.796875 0.000000l-14.703125 22.296875z"/>
<path id="c_0ebbb5adb88e2b3131a3483365829b00" d="M44.406250 -47.296875l1.000000 9.500000q4.296875 -2.000000 6.843750 -3.250000q2.546875 -1.250000 5.937500 -3.203125q3.406250 -1.953125 5.250000 -3.546875q1.859375 -1.609375 3.203125 -3.609375q1.359375 -2.000000 1.359375 -4.093750q0.000000 -2.406250 -1.906250 -2.406250q-0.296875 0.000000 -1.000000 0.609375q-0.687500 0.593750 -2.296875 0.593750q-1.593750 0.000000 -2.500000 -1.390625q-0.890625 -1.406250 -0.890625 -3.312500q0.000000 -2.593750 1.890625 -4.187500q1.906250 -1.609375 5.000000 -1.609375q3.000000 0.000000 5.296875 2.500000q2.312500 2.500000 2.312500 7.000000q0.000000 6.796875 -6.500000 11.953125q-6.500000 5.156250 -21.312500 12.046875l2.500000 17.203125q1.406250 10.296875 6.703125 10.296875q3.703125 0.000000 5.703125 -3.296875l1.906250 1.406250q-3.906250 8.093750 -12.000000 8.093750q-5.000000 0.000000 -8.000000 -3.703125q-3.000000 -3.703125 -4.203125 -13.390625l-1.609375 -12.906250q-15.890625 7.906250 -21.593750 12.312500q-5.703125 4.390625 -5.703125 8.390625q0.000000 1.390625 0.796875 1.390625q0.203125 0.000000 1.000000 -0.437500q0.812500 -0.453125 1.609375 -0.453125q4.000000 0.000000 4.000000 4.203125q0.000000 2.296875 -1.859375 4.093750q-1.843750 1.796875 -5.250000 1.796875q-2.593750 0.000000 -4.453125 -2.046875q-1.843750 -2.046875 -1.843750 -5.843750q0.000000 -1.812500 0.593750 -3.609375q0.609375 -1.796875 1.250000 -3.187500q0.656250 -1.406250 2.500000 -3.203125q1.859375 -1.812500 2.906250 -2.859375q1.046875 -1.046875 4.093750 -2.937500q3.062500 -1.906250 4.359375 -2.750000q1.296875 -0.859375 5.343750 -3.000000q4.062500 -2.156250 5.500000 -2.859375q1.453125 -0.703125 6.250000 -3.203125l-2.390625 -15.296875q-1.703125 -10.500000 -6.406250 -10.500000q-3.796875 0.000000 -5.796875 3.406250l-2.203125 -1.000000q4.109375 -8.609375 12.406250 -8.609375q5.093750 0.000000 8.093750 4.359375q3.000000 4.343750 4.109375 14.546875"/>
+<path id="c_2daa8391d466ad72d03c8e0c91578b14" d="M45.203125 -0.000000l-9.406250 0.000000l-12.203125 -17.500000l-11.187500 17.500000l-9.406250 0.000000l16.093750 -23.906250l-14.890625 -21.390625l9.390625 0.000000l10.500000 15.093750l9.703125 -15.093750l9.406250 0.000000l-14.609375 21.703125z"/>
</defs>
<g id="mathtext9">
<g style="fill: #000000" transform="translate(0.000000,325.000000)">
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(0.000000,-1.937500)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(5.783997,-1.937500)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(11.567993,-1.937500)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(0.000000,-1.937500)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(5.783997,-1.937500)scale(0.120000)"/>
+<use xlink:href="#c_5922300fc509de44a716b5ecdf576bd3" transform="translate(11.567993,-1.937500)scale(0.120000)"/>
<use xlink:href="#c_0ebbb5adb88e2b3131a3483365829b00" transform="translate(17.639984,-1.937500)scale(0.120000)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(25.943970,-1.937500)scale(0.120000)"/>
+<use xlink:href="#c_2daa8391d466ad72d03c8e0c91578b14" transform="translate(25.943970,-1.937500)scale(0.120000)"/>
</g>
</g>
</g>
<g id="text10">
<g id="mathtext10">
<g style="fill: #000000" transform="translate(0.000000,363.000000)">
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(0.000000,-3.562500)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(8.505594,-3.562500)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(17.918387,-3.562500)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(30.959976,-3.562500)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(51.259158,-3.562500)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(86.073526,-3.562500)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(88.228726,-3.562500)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(98.548718,-3.562500)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(0.000000,-3.562500)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(8.505594,-3.562500)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(17.918387,-3.562500)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(30.959976,-3.562500)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(51.259158,-3.562500)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(86.073526,-3.562500)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(88.228726,-3.562500)scale(0.120000)"/>
+<use xlink:href="#c_bace3846b2e287fe11636a6b244f3748" transform="translate(98.548718,-3.562500)scale(0.120000)"/>
</g>
</g>
</g>
<g id="text11">
<defs>
<path id="c_8529437da6d51efc36e1de9273398218" d="M35.000000 17.000000l0.000000 1.093750q-8.406250 -0.093750 -12.093750 -2.500000q-4.406250 -2.796875 -4.406250 -11.500000l0.000000 -17.687500q0.000000 -5.203125 -1.750000 -7.500000q-1.750000 -2.312500 -6.750000 -3.906250q5.000000 -1.500000 6.750000 -3.796875q1.750000 -2.296875 1.750000 -7.500000l0.000000 -17.796875q0.000000 -8.703125 4.406250 -11.406250q3.796875 -2.406250 12.093750 -2.500000l0.000000 1.093750q-5.203125 1.312500 -7.156250 4.015625q-1.937500 2.687500 -1.937500 8.296875l0.000000 16.796875q0.000000 6.203125 -1.906250 8.796875q-1.906250 2.593750 -7.500000 4.093750q5.593750 1.406250 7.500000 4.015625q1.906250 2.593750 1.906250 8.796875l0.000000 16.796875q0.000000 5.593750 1.937500 8.296875q1.953125 2.703125 7.156250 4.000000"/>
+<path id="c_f37dfa0beb441bf8ab1bf71060f31980" d="M14.203125 -67.906250l0.000000 26.500000q5.500000 -4.890625 12.796875 -4.890625q8.703125 0.000000 14.140625 6.109375q5.453125 6.093750 5.453125 15.781250q0.000000 11.000000 -6.703125 18.203125q-6.687500 7.203125 -17.093750 7.203125q-10.390625 0.000000 -16.500000 -5.703125l0.000000 -61.296875l7.000000 -2.406250zM14.203125 -30.203125l0.000000 20.796875q3.890625 3.312500 9.093750 3.312500q6.109375 0.000000 10.750000 -4.593750q4.656250 -4.609375 4.656250 -12.312500q0.000000 -7.296875 -3.500000 -11.750000q-3.500000 -4.453125 -9.703125 -4.453125q-3.593750 0.000000 -6.703125 2.359375q-3.093750 2.343750 -4.593750 6.640625"/>
+<path id="c_40ae58b89eb01d7ac8f358082764507e" d="M32.796875 -37.703125l-2.000000 0.000000q-1.000000 -1.500000 -3.890625 -1.500000q-4.312500 0.000000 -7.656250 4.203125q-3.343750 4.203125 -5.046875 11.593750l0.000000 23.406250l-7.906250 0.000000l0.000000 -44.000000l7.000000 -2.406250l0.906250 0.500000l0.203125 6.406250q4.796875 -6.796875 12.687500 -6.796875q3.703125 0.000000 5.703125 1.593750z"/>
+<path id="c_9a353c3983159a0d8a595fe2dda26178" d="M39.093750 -0.000000l-8.500000 0.000000l-0.500000 -4.406250q-6.000000 5.406250 -14.890625 5.406250q-5.406250 0.000000 -8.562500 -2.796875q-3.140625 -2.796875 -3.140625 -8.296875q0.000000 -7.203125 6.343750 -11.906250q6.359375 -4.703125 20.359375 -7.406250l0.000000 -3.296875q0.000000 -2.890625 -2.359375 -4.687500q-2.343750 -1.812500 -6.140625 -1.812500q-7.609375 0.000000 -10.796875 9.000000l-1.500000 0.000000l-4.906250 -3.093750q1.296875 -6.796875 6.093750 -9.890625q4.812500 -3.109375 11.312500 -3.109375q7.390625 0.000000 11.781250 3.656250q4.406250 3.640625 4.406250 10.046875l0.000000 25.000000q0.000000 2.890625 1.000000 7.593750M30.203125 -13.203125l0.000000 -9.000000q-8.609375 1.406250 -13.796875 4.296875q-5.000000 2.609375 -5.000000 6.703125q0.000000 5.109375 5.796875 5.109375q6.703125 0.000000 13.000000 -7.109375"/>
+<path id="c_089cd0489fec6e8c6b82d254a2f6df3a" d="M36.703125 -16.593750l6.500000 3.390625q-3.203125 7.296875 -8.500000 10.796875q-4.906250 3.406250 -11.500000 3.406250q-7.296875 0.000000 -12.500000 -4.000000q-8.406250 -6.500000 -8.406250 -18.593750q0.000000 -10.906250 6.250000 -17.796875q6.250000 -6.906250 15.656250 -6.906250q5.500000 0.000000 10.000000 2.296875q4.500000 2.296875 6.890625 6.906250l-4.390625 5.390625l-1.609375 0.000000q-3.187500 -7.500000 -11.296875 -7.500000q-5.703125 0.000000 -9.656250 4.500000q-3.937500 4.500000 -3.937500 12.500000q0.000000 7.406250 3.890625 11.765625q3.906250 4.343750 9.703125 4.343750q8.109375 0.000000 12.906250 -10.500000"/>
+<path id="c_ef894e9c16e06b38c98ae0ebda247ba2" d="M36.203125 -16.703125l6.593750 3.500000q-3.796875 7.609375 -8.203125 10.906250q-4.390625 3.296875 -11.593750 3.296875q-9.093750 0.000000 -14.906250 -6.250000q-5.796875 -6.250000 -5.796875 -17.343750q0.000000 -11.500000 7.203125 -18.312500q5.703125 -5.390625 14.296875 -5.390625q7.906250 0.000000 12.593750 5.156250q4.703125 5.140625 4.703125 13.437500l0.000000 5.500000l-30.890625 0.000000q0.000000 7.609375 3.890625 11.859375q3.906250 4.250000 9.703125 4.250000q7.906250 0.000000 12.406250 -10.609375M11.500000 -29.296875l21.500000 0.000000q-0.296875 -9.906250 -10.000000 -9.906250q-4.000000 0.000000 -7.296875 2.500000q-3.296875 2.500000 -4.203125 7.406250"/>
+<path id="c_ac81bb7c454f21ee41a83ef5cbdc39e7" d="M33.000000 -32.093750l-1.500000 0.000000q-2.796875 -4.406250 -5.609375 -5.796875q-2.796875 -1.406250 -6.687500 -1.406250q-3.203125 0.000000 -4.812500 1.609375q-1.593750 1.593750 -1.593750 3.484375q0.000000 2.500000 2.093750 4.203125q2.109375 1.703125 6.312500 3.500000q8.296875 3.500000 11.046875 6.406250q2.750000 2.890625 2.750000 8.296875q0.000000 6.593750 -6.093750 10.390625q-3.812500 2.406250 -10.000000 2.406250q-4.500000 0.000000 -7.562500 -1.296875q-3.046875 -1.296875 -6.343750 -4.203125l0.000000 -10.296875l1.500000 0.000000q3.906250 8.703125 13.000000 8.703125q3.203125 0.000000 5.390625 -1.453125q2.203125 -1.453125 2.203125 -4.250000q0.000000 -2.000000 -1.843750 -3.453125q-1.843750 -1.453125 -6.750000 -3.656250q-7.593750 -3.390625 -10.593750 -6.687500q-3.000000 -3.312500 -3.000000 -8.203125q0.000000 -5.203125 4.000000 -8.843750q4.000000 -3.656250 10.500000 -3.656250q8.593750 0.000000 13.593750 5.296875z"/>
<path id="c_9c2ff3a1acf958cef9bca2c28cf9a90a" d="M29.500000 -54.000000l0.000000 17.703125q0.000000 5.203125 1.750000 7.500000q1.750000 2.296875 6.750000 3.796875q-5.000000 1.593750 -6.750000 3.906250q-1.750000 2.296875 -1.750000 7.500000l0.000000 17.796875q0.000000 8.703125 -4.406250 11.390625q-3.796875 2.406250 -12.093750 2.500000l0.000000 -1.093750q5.203125 -1.296875 7.140625 -4.000000q1.953125 -2.703125 1.953125 -8.296875l0.000000 -16.796875q0.000000 -6.203125 1.906250 -8.796875q1.906250 -2.609375 7.500000 -4.109375q-5.593750 -1.406250 -7.500000 -3.953125q-1.906250 -2.546875 -1.906250 -8.843750l0.000000 -16.796875q0.000000 -5.609375 -1.953125 -8.296875q-1.937500 -2.703125 -7.140625 -4.015625l0.000000 -1.093750q8.406250 0.093750 12.093750 2.500000q4.406250 2.796875 4.406250 11.500000"/>
</defs>
<g id="mathtext11">
<g style="fill: #000000" transform="translate(0.000000,399.000000)">
<use xlink:href="#c_8529437da6d51efc36e1de9273398218" transform="translate(0.000000,-3.796875)scale(0.120000)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(5.759995,-3.796875)scale(0.120000)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(11.711990,-3.796875)scale(0.120000)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(15.743988,-3.796875)scale(0.120000)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(21.119980,-3.796875)scale(0.120000)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(26.591965,-3.796875)scale(0.120000)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(31.919952,-3.796875)scale(0.120000)"/>
+<use xlink:href="#c_f37dfa0beb441bf8ab1bf71060f31980" transform="translate(5.759995,-3.796875)scale(0.120000)"/>
+<use xlink:href="#c_40ae58b89eb01d7ac8f358082764507e" transform="translate(11.711990,-3.796875)scale(0.120000)"/>
+<use xlink:href="#c_9a353c3983159a0d8a595fe2dda26178" transform="translate(15.743988,-3.796875)scale(0.120000)"/>
+<use xlink:href="#c_089cd0489fec6e8c6b82d254a2f6df3a" transform="translate(21.119980,-3.796875)scale(0.120000)"/>
+<use xlink:href="#c_ef894e9c16e06b38c98ae0ebda247ba2" transform="translate(26.591965,-3.796875)scale(0.120000)"/>
+<use xlink:href="#c_ac81bb7c454f21ee41a83ef5cbdc39e7" transform="translate(31.919952,-3.796875)scale(0.120000)"/>
<use xlink:href="#c_9c2ff3a1acf958cef9bca2c28cf9a90a" transform="translate(36.587936,-3.796875)scale(0.120000)"/>
</g>
</g>
@@ -227,8 +239,11 @@
<defs>
<path id="c_d6989a7effcb6ecccfabe3a5e101fb2e" d="M42.203125 27.906250l-23.203125 0.000000l0.000000 -184.500000l23.203125 0.000000l0.000000 4.000000l-15.609375 0.000000l0.000000 176.500000l15.609375 0.000000z"/>
<path id="c_b31333247316ccf8182704f9ffaa17a3" d="M47.906250 27.906250l-28.906250 0.000000l0.000000 -184.500000l7.593750 0.000000l0.000000 180.500000l21.312500 0.000000z"/>
+<path id="c_915f401d994765f81a0cd565f48e5587" d="M45.796875 -67.593750l-3.203125 7.093750l-17.687500 0.000000l-6.406250 12.703125q11.406250 1.593750 18.750000 8.046875q7.343750 6.453125 7.343750 17.156250q0.000000 9.890625 -6.750000 16.953125q-6.750000 7.046875 -16.843750 7.046875q-11.000000 0.000000 -17.406250 -7.000000l4.703125 -5.609375q5.109375 5.500000 12.203125 5.500000q7.406250 0.000000 11.796875 -5.046875q4.406250 -5.046875 4.406250 -11.843750q0.000000 -7.406250 -6.609375 -12.609375q-6.687500 -5.500000 -20.687500 -5.500000l-1.406250 -1.703125l11.593750 -25.187500z"/>
<path id="c_0355e62f30d2a8af02248668e932de01" d="M30.406250 16.093750l-1.203125 1.609375q-11.609375 -6.609375 -18.015625 -18.203125q-6.390625 -11.593750 -6.390625 -24.703125q0.000000 -27.703125 24.703125 -42.390625l0.906250 1.593750q-10.203125 8.703125 -13.609375 17.156250q-3.390625 8.437500 -3.390625 23.343750q0.000000 14.796875 3.500000 24.000000q3.500000 9.203125 13.500000 17.593750"/>
+<path id="c_23ba680eeb3735e01c71c045b680028a" d="M11.296875 -49.203125l-7.093750 -1.703125q2.203125 -7.796875 7.296875 -12.234375q5.093750 -4.453125 12.796875 -4.453125q7.109375 0.000000 11.906250 4.500000q4.796875 4.500000 4.796875 11.187500q0.000000 8.906250 -8.593750 14.906250q5.593750 2.000000 8.640625 6.656250q3.046875 4.640625 3.046875 9.343750q0.000000 9.703125 -6.296875 16.000000q-6.390625 6.406250 -17.296875 6.406250q-11.000000 0.000000 -17.406250 -7.000000l4.703125 -5.609375q5.109375 5.500000 12.203125 5.500000q7.406250 0.000000 11.593750 -3.593750q4.609375 -3.906250 4.609375 -9.796875q0.000000 -5.203125 -3.750000 -8.703125q-3.750000 -3.500000 -10.250000 -4.406250l-6.406250 0.000000l0.000000 -2.093750l4.796875 -5.109375q4.500000 0.000000 8.500000 -3.437500q4.000000 -3.453125 4.000000 -8.359375q0.000000 -4.203125 -2.656250 -6.750000q-2.640625 -2.546875 -6.437500 -2.546875q-4.000000 0.000000 -7.453125 2.859375q-3.453125 2.843750 -5.250000 8.437500"/>
<path id="c_6c22ba81277429799db94c804ef56c2d" d="M2.906250 -66.000000l1.187500 -1.593750q11.406250 6.796875 17.906250 18.406250q6.500000 11.593750 6.500000 24.484375q0.000000 27.296875 -24.703125 42.406250l-0.890625 -1.609375q10.296875 -8.500000 13.640625 -16.937500q3.359375 -8.453125 3.359375 -23.562500q0.000000 -15.187500 -3.359375 -24.343750q-3.343750 -9.156250 -13.640625 -17.250000"/>
+<path id="c_53cf969dad168e028aceaef3d0f00f6f" d="M48.906250 -23.593750l-3.312500 7.093750l-8.296875 0.000000l0.000000 16.500000l-7.890625 0.000000l0.000000 -16.500000l-28.312500 0.000000l0.000000 -6.796875l31.203125 -44.296875l5.000000 0.000000l0.000000 44.000000zM29.406250 -23.593750l0.000000 -27.406250l-19.406250 27.406250z"/>
<path id="c_b5e160d5da311abc63d5ec714d5eeba3" d="M11.406250 -153.000000l0.000000 -3.593750q16.796875 15.796875 26.593750 39.296875q9.796875 23.500000 9.796875 53.000000q0.000000 29.390625 -10.046875 54.250000q-10.046875 24.843750 -26.343750 37.953125l0.000000 -3.312500q11.390625 -11.687500 19.140625 -34.484375q7.750000 -22.812500 7.750000 -54.406250q0.000000 -55.609375 -26.890625 -88.703125"/>
<path id="c_8131f15d9c4849736733a20011ad0052" d="M26.906250 27.906250l-23.203125 0.000000l0.000000 -4.000000l15.593750 0.000000l0.000000 -176.500000l-15.593750 0.000000l0.000000 -4.000000l23.203125 0.000000z"/>
</defs>
@@ -236,12 +251,12 @@
<g style="fill: #000000" transform="translate(0.000000,442.000000)">
<use xlink:href="#c_d6989a7effcb6ecccfabe3a5e101fb2e" transform="translate(0.000000,-3.736719)scale(0.110164)"/>
<use xlink:href="#c_b31333247316ccf8182704f9ffaa17a3" transform="translate(5.056168,-3.736719)scale(0.110164)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(11.828354,-15.323438)scale(0.084000)"/>
+<use xlink:href="#c_915f401d994765f81a0cd565f48e5587" transform="translate(11.828354,-15.323438)scale(0.084000)"/>
<use xlink:href="#c_0355e62f30d2a8af02248668e932de01" transform="translate(10.828354,-8.137969)scale(0.047579)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(12.411613,-7.357031)scale(0.058800)"/>
+<use xlink:href="#c_23ba680eeb3735e01c71c045b680028a" transform="translate(12.411613,-7.357031)scale(0.058800)"/>
<use xlink:href="#c_6c22ba81277429799db94c804ef56c2d" transform="translate(15.351605,-8.137969)scale(0.047579)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(12.828354,-0.674219)scale(0.058800)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(19.484864,-10.671875)scale(0.120000)"/>
+<use xlink:href="#c_53cf969dad168e028aceaef3d0f00f6f" transform="translate(12.828354,-0.674219)scale(0.058800)"/>
+<use xlink:href="#c_bace3846b2e287fe11636a6b244f3748" transform="translate(19.484864,-10.671875)scale(0.120000)"/>
<use xlink:href="#c_b5e160d5da311abc63d5ec714d5eeba3" transform="translate(25.292847,-3.736719)scale(0.110164)"/>
<use xlink:href="#c_8131f15d9c4849736733a20011ad0052" transform="translate(31.990342,-3.736719)scale(0.110164)"/>
</g>
@@ -252,54 +267,61 @@
<g id="mathtext13">
<g style="fill: #000000" transform="translate(0.000000,468.000000)">
<use xlink:href="#c_0355e62f30d2a8af02248668e932de01" transform="translate(0.000000,-1.625000)scale(0.063756)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(2.122879,-0.562500)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(2.122879,-0.562500)scale(0.120000)"/>
<use xlink:href="#c_6c22ba81277429799db94c804ef56c2d" transform="translate(7.906876,-1.625000)scale(0.063756)"/>
</g>
</g>
</g>
<g id="text14">
+<defs>
+<path id="c_d35df9b4ff5b78da382cdbece5311315" d="M15.593750 -58.593750l-9.187500 0.000000l0.000000 -9.312500l9.187500 0.000000zM15.203125 -0.000000l-8.296875 0.000000l0.000000 -44.000000l7.390625 -2.406250l0.906250 0.500000z"/>
+<path id="c_84341e5a08d8360b9f73a37d8eb4d65f" d="M42.406250 -0.000000l-7.906250 0.000000l0.000000 -30.406250q0.000000 -8.796875 -8.203125 -8.796875q-2.890625 0.000000 -6.796875 2.500000q-3.906250 2.500000 -5.296875 6.500000l0.000000 30.203125l-7.906250 0.000000l0.000000 -44.000000l6.500000 -2.406250l0.906250 0.500000l0.203125 5.703125q3.687500 -3.593750 7.140625 -4.843750q3.453125 -1.250000 7.953125 -1.250000q2.906250 0.000000 5.906250 1.359375q3.000000 1.343750 4.796875 3.140625q2.703125 3.593750 2.703125 9.703125z"/>
+</defs>
<g id="mathtext14">
<g style="fill: #000000" transform="translate(0.000000,507.000000)">
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(0.000000,-3.859375)scale(0.120000)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(4.667984,-3.859375)scale(0.120000)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(7.307983,-3.859375)scale(0.120000)"/>
+<use xlink:href="#c_ac81bb7c454f21ee41a83ef5cbdc39e7" transform="translate(0.000000,-3.859375)scale(0.120000)"/>
+<use xlink:href="#c_d35df9b4ff5b78da382cdbece5311315" transform="translate(4.667984,-3.859375)scale(0.120000)"/>
+<use xlink:href="#c_84341e5a08d8360b9f73a37d8eb4d65f" transform="translate(7.307983,-3.859375)scale(0.120000)"/>
<use xlink:href="#c_0355e62f30d2a8af02248668e932de01" transform="translate(13.151978,-3.859375)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(17.147964,-3.859375)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(17.147964,-3.859375)scale(0.120000)"/>
<use xlink:href="#c_6c22ba81277429799db94c804ef56c2d" transform="translate(22.931961,-3.859375)scale(0.120000)"/>
</g>
</g>
</g>
<g id="text15">
+<defs>
+<path id="c_1a6baac8407a12487f980fb5c23c2ba5" d="M46.906250 -7.093750l-2.906250 7.093750l-40.500000 0.000000l0.000000 -2.093750l17.500000 -21.406250l0.000000 0.093750l5.593750 -6.796875q3.906250 -4.703125 5.500000 -6.750000q1.609375 -2.046875 3.109375 -5.000000q1.500000 -2.953125 1.500000 -5.546875q0.000000 -6.203125 -3.359375 -9.593750q-3.343750 -3.406250 -9.140625 -3.406250q-4.609375 0.000000 -8.453125 3.796875q-3.843750 3.796875 -4.843750 10.796875l-7.203125 -1.687500q1.593750 -8.906250 7.484375 -14.453125q5.906250 -5.546875 13.718750 -5.546875q8.687500 0.000000 14.187500 5.406250q5.500000 5.390625 5.500000 13.093750q0.000000 5.593750 -2.093750 9.640625q-2.093750 4.046875 -8.796875 12.453125l-16.000000 19.906250z"/>
+</defs>
<g id="mathtext15">
<g style="fill: #000000" transform="translate(0.000000,542.000000)">
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(0.000000,-2.562500)scale(0.120000)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(5.783997,-0.931250)scale(0.084000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(0.000000,-2.562500)scale(0.120000)"/>
+<use xlink:href="#c_1a6baac8407a12487f980fb5c23c2ba5" transform="translate(5.783997,-0.931250)scale(0.084000)"/>
</g>
</g>
</g>
<g id="text16">
<g id="mathtext16">
<g style="fill: #000000" transform="translate(0.000000,576.000000)">
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(0.000000,-0.517188)scale(0.120000)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(5.783997,-4.323438)scale(0.084000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(0.000000,-0.517188)scale(0.120000)"/>
+<use xlink:href="#c_1a6baac8407a12487f980fb5c23c2ba5" transform="translate(5.783997,-4.323438)scale(0.084000)"/>
</g>
</g>
</g>
<g id="text17">
<g id="mathtext17">
<g style="fill: #000000" transform="translate(0.000000,616.000000)">
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(0.000000,-4.517188)scale(0.120000)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(6.762747,-8.323438)scale(0.084000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(5.783997,-2.885938)scale(0.084000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(0.000000,-4.517188)scale(0.120000)"/>
+<use xlink:href="#c_1a6baac8407a12487f980fb5c23c2ba5" transform="translate(6.762747,-8.323438)scale(0.084000)"/>
+<use xlink:href="#c_bace3846b2e287fe11636a6b244f3748" transform="translate(5.783997,-2.885938)scale(0.084000)"/>
</g>
</g>
</g>
<g id="text18">
<g id="mathtext18">
<g style="fill: #000000" transform="translate(0.000000,652.000000)">
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(0.000000,-4.517188)scale(0.120000)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(6.762747,-8.323438)scale(0.084000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(5.783997,-2.885938)scale(0.084000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(0.000000,-4.517188)scale(0.120000)"/>
+<use xlink:href="#c_1a6baac8407a12487f980fb5c23c2ba5" transform="translate(6.762747,-8.323438)scale(0.084000)"/>
+<use xlink:href="#c_bace3846b2e287fe11636a6b244f3748" transform="translate(5.783997,-2.885938)scale(0.084000)"/>
</g>
</g>
</g>
@@ -307,62 +329,69 @@
<defs>
<path id="c_c61d4b0147945f186b199e2b3572b944" d="M85.406250 -22.203125q0.000000 8.109375 -5.500000 15.156250q-5.500000 7.046875 -14.312500 7.046875q-5.796875 0.000000 -10.453125 -3.546875q-4.640625 -3.546875 -9.640625 -10.953125q-7.203125 14.500000 -20.906250 14.500000q-7.093750 0.000000 -12.343750 -5.140625q-5.250000 -5.156250 -5.250000 -14.859375q0.000000 -5.203125 1.453125 -9.390625q1.453125 -4.203125 3.593750 -6.656250q2.156250 -2.453125 4.843750 -4.093750q2.703125 -1.656250 4.953125 -2.250000q2.250000 -0.609375 4.250000 -0.609375q6.000000 0.000000 10.546875 2.859375q4.562500 2.843750 11.265625 11.843750q4.093750 -7.406250 8.234375 -11.046875q4.156250 -3.656250 11.062500 -3.656250q7.296875 0.000000 12.750000 5.656250q5.453125 5.640625 5.453125 15.140625M49.906250 -24.500000l0.000000 0.296875q5.796875 9.500000 10.187500 13.906250q4.406250 4.390625 9.312500 4.390625q4.187500 0.000000 7.093750 -3.546875q2.906250 -3.546875 2.906250 -8.343750q0.000000 -7.109375 -3.750000 -11.953125q-3.750000 -4.843750 -10.156250 -4.843750q-3.093750 0.000000 -5.656250 0.843750q-2.546875 0.843750 -4.546875 2.750000q-2.000000 1.906250 -2.906250 3.000000q-0.890625 1.093750 -2.484375 3.500000M43.296875 -18.093750l0.000000 -0.312500q-5.703125 -9.390625 -10.546875 -14.031250q-4.843750 -4.656250 -9.750000 -4.656250q-4.203125 0.000000 -7.109375 3.546875q-2.890625 3.546875 -2.890625 8.343750q0.000000 6.796875 3.796875 11.796875q3.796875 5.000000 10.109375 5.000000q3.093750 0.000000 5.796875 -0.890625q2.703125 -0.906250 4.796875 -2.656250q2.093750 -1.750000 3.250000 -3.000000q1.156250 -1.250000 2.546875 -3.140625"/>
<path id="c_3d349e52e1ce3297fafae4bd8678b415" d="M94.796875 25.906250l-36.796875 0.000000l0.000000 -2.812500l3.203125 0.000000q4.890625 0.000000 6.843750 -3.500000q1.953125 -3.500000 1.953125 -9.890625l0.000000 -79.406250l-39.906250 0.000000l0.000000 79.406250q0.000000 7.093750 1.953125 10.234375q1.953125 3.156250 6.859375 3.156250l3.093750 0.000000l0.000000 2.812500l-36.796875 0.000000l0.000000 -2.812500l1.890625 0.000000q9.906250 0.000000 9.906250 -10.890625l0.000000 -73.296875q0.000000 -7.000000 -2.546875 -9.703125q-2.546875 -2.703125 -7.546875 -2.703125l-1.703125 0.000000l0.000000 -2.796875l89.593750 0.000000l0.000000 2.796875q-6.593750 0.000000 -9.156250 2.750000q-2.546875 2.750000 -2.546875 9.250000l0.000000 71.906250q0.000000 12.687500 9.906250 12.687500l1.796875 0.000000z"/>
+<path id="c_926f01af6cc1ad10212c7c5cac6ac044" d="M26.593750 -45.906250l-11.390625 45.906250l-8.296875 0.000000l10.890625 -44.000000l8.000000 -2.406250zM32.500000 -67.906250l-2.296875 9.312500l-9.203125 0.000000l2.296875 -9.312500z"/>
</defs>
<g id="mathtext19">
<g style="fill: #000000" transform="translate(0.000000,695.000000)">
<use xlink:href="#c_c61d4b0147945f186b199e2b3572b944" transform="translate(9.000000,-25.390625)scale(0.084000)"/>
<use xlink:href="#c_3d349e52e1ce3297fafae4bd8678b415" transform="translate(6.000000,-13.984375)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(0.000000,-2.926562)scale(0.084000)"/>
+<use xlink:href="#c_926f01af6cc1ad10212c7c5cac6ac044" transform="translate(0.000000,-2.926562)scale(0.084000)"/>
<use xlink:href="#c_519059ea6f41296df30fe3fad0eae726" transform="translate(3.118078,-2.926562)scale(0.084000)"/>
<use xlink:href="#c_f198850d2eab64761df58bb580348ad3" transform="translate(9.331907,-2.926562)scale(0.084000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(14.254305,-1.784688)scale(0.058800)"/>
+<use xlink:href="#c_926f01af6cc1ad10212c7c5cac6ac044" transform="translate(14.254305,-1.784688)scale(0.058800)"/>
<use xlink:href="#c_6d61cf1c82e1e3b046bf4a8a4ce74492" transform="translate(16.436960,-1.784688)scale(0.058800)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(20.778984,-1.784688)scale(0.058800)"/>
+<use xlink:href="#c_60609572cbbae62115937cf2c175839d" transform="translate(20.778984,-1.784688)scale(0.058800)"/>
</g>
</g>
</g>
<g id="text20">
+<defs>
+<path id="c_70c6cdbcdeb7742cf5f2ded141ade35e" d="M44.703125 -16.093750q0.000000 7.296875 -5.312500 12.406250q-5.296875 5.093750 -14.593750 5.093750q-8.500000 0.000000 -14.203125 -4.843750q-5.687500 -4.859375 -5.687500 -11.968750q0.000000 -5.390625 2.843750 -9.843750q2.843750 -4.453125 9.953125 -9.250000q-11.703125 -6.906250 -11.703125 -16.906250q0.000000 -7.187500 5.546875 -11.687500q5.546875 -4.500000 14.046875 -4.500000q7.312500 0.000000 12.203125 4.750000q4.906250 4.750000 4.906250 10.843750q0.000000 5.593750 -2.609375 9.296875q-2.593750 3.703125 -9.000000 7.406250q13.609375 8.296875 13.609375 19.203125M35.500000 -51.500000q0.000000 -4.000000 -3.109375 -6.500000q-3.093750 -2.500000 -7.984375 -2.500000q-4.609375 0.000000 -7.562500 2.656250q-2.937500 2.640625 -2.937500 6.046875q0.000000 4.296875 2.437500 6.953125q2.453125 2.640625 8.562500 5.437500q10.593750 -5.796875 10.593750 -12.093750M27.593750 -28.593750l-3.500000 -1.906250q-5.187500 1.796875 -8.250000 5.859375q-3.046875 4.046875 -3.046875 8.343750q0.000000 4.500000 3.203125 7.546875q3.203125 3.046875 9.203125 3.046875q4.593750 0.000000 8.093750 -2.750000q3.500000 -2.750000 3.500000 -7.343750q0.000000 -4.203125 -2.109375 -7.156250q-2.093750 -2.953125 -7.093750 -5.640625"/>
+</defs>
<g id="mathtext20">
<g style="fill: #000000" transform="translate(0.000000,732.000000)">
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(0.000000,-12.812344)scale(0.120000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(0.000000,-12.812344)scale(0.120000)"/>
<use xlink:href="#c_519059ea6f41296df30fe3fad0eae726" transform="translate(7.598395,-12.812344)scale(0.120000)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(16.475293,-20.770312)scale(0.084000)"/>
+<use xlink:href="#c_f05135d5b912bce163b97372f515d1c6" transform="translate(16.475293,-20.770312)scale(0.084000)"/>
<use xlink:href="#c_6d61cf1c82e1e3b046bf4a8a4ce74492" transform="translate(21.794169,-20.770312)scale(0.084000)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(27.997061,-24.026406)scale(0.058800)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(27.997061,-17.343594)scale(0.058800)"/>
-<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" transform="translate(18.475293,-9.620000)scale(0.058800)"/>
+<use xlink:href="#c_915f401d994765f81a0cd565f48e5587" transform="translate(27.997061,-24.026406)scale(0.058800)"/>
+<use xlink:href="#c_1a6baac8407a12487f980fb5c23c2ba5" transform="translate(27.997061,-17.343594)scale(0.058800)"/>
+<use xlink:href="#c_bace3846b2e287fe11636a6b244f3748" transform="translate(18.475293,-9.620000)scale(0.058800)"/>
<use xlink:href="#c_6d61cf1c82e1e3b046bf4a8a4ce74492" transform="translate(22.210260,-9.620000)scale(0.058800)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(26.552284,-9.620000)scale(0.058800)"/>
-<use xlink:href="#c_d94169ffd7d02f6db3328022ee3a311d" transform="translate(22.475293,-1.750469)scale(0.058800)"/>
+<use xlink:href="#c_23ba680eeb3735e01c71c045b680028a" transform="translate(26.552284,-9.620000)scale(0.058800)"/>
+<use xlink:href="#c_70c6cdbcdeb7742cf5f2ded141ade35e" transform="translate(22.475293,-1.750469)scale(0.058800)"/>
</g>
<g style="fill: #000000; stroke: none" transform="translate(0.000000,732.000000)">
<rect x="27.997061" y="-22.842188" width="2.939993" height="0.525000" fill="black" stroke="none" /><rect x="16.475293" y="-15.343594" width="15.511760" height="0.750000" fill="black" stroke="none" /><rect x="18.475293" y="-7.249063" width="11.016983" height="0.525000" fill="black" stroke="none" /></g></g>
</g>
<g id="text21">
<defs>
+<path id="c_0db03721524bf670a33ade1cf7b34aec" d="M39.093750 -15.796875l4.312500 -17.109375q-2.703125 -6.296875 -8.812500 -6.296875q-6.500000 0.000000 -12.796875 6.562500q-6.296875 6.546875 -6.296875 15.843750q0.000000 5.296875 2.640625 8.000000q2.656250 2.703125 7.062500 2.703125q3.500000 0.000000 7.296875 -2.656250q3.796875 -2.656250 6.593750 -7.046875M60.000000 -67.906250l-13.796875 55.109375q-1.609375 6.593750 -2.203125 11.500000l-7.796875 2.390625l-0.796875 -0.500000l1.000000 -5.000000q-6.906250 5.406250 -15.000000 5.406250q-6.500000 0.000000 -10.359375 -4.046875q-3.843750 -4.046875 -3.843750 -11.359375q0.000000 -12.500000 9.187500 -22.187500q9.203125 -9.703125 19.609375 -9.703125q5.500000 0.000000 9.796875 3.703125l5.796875 -23.406250l7.609375 -2.406250z"/>
+<path id="c_442afcf8ecdeb103721082b47bc49c72" d="M51.703125 -45.296875l-0.500000 2.000000l-34.203125 36.203125l26.406250 0.000000l-2.703125 7.093750l-38.203125 0.000000l0.406250 -2.000000l34.187500 -36.203125l-22.687500 0.000000l2.890625 -7.093750z"/>
+<path id="c_80db16f69768eb24dff3936cc80ecbb1" d="M37.593750 -45.296875l-1.687500 7.093750l-10.406250 0.000000l-6.093750 24.500000q-0.609375 2.406250 -0.609375 3.906250q0.000000 3.703125 3.796875 3.703125q3.609375 0.000000 7.000000 -2.609375l1.203125 0.000000l-3.000000 7.500000q-3.390625 2.203125 -9.296875 2.203125q-4.093750 0.000000 -6.250000 -2.046875q-2.156250 -2.046875 -2.156250 -5.656250q0.000000 -1.500000 0.500000 -3.703125l7.000000 -27.796875l-8.000000 0.000000l0.406250 -1.703125l5.796875 -5.390625l3.500000 0.000000l1.609375 -6.406250l7.687500 -6.296875l1.812500 0.000000l-3.203125 12.703125z"/>
<path id="c_33ff1a0ff067b04a056b4be08e696c4a" d="M52.703125 -45.296875l-28.906250 42.390625l-6.000000 24.000000l-1.000000 0.500000l-6.390625 -2.390625q4.093750 -14.296875 6.390625 -23.703125q1.796875 -7.593750 1.796875 -19.500000q0.000000 -2.906250 -0.796875 -6.093750q-0.796875 -3.203125 -3.296875 -6.156250q-2.500000 -2.953125 -6.093750 -2.953125l0.296875 -1.093750l5.500000 -6.000000q6.390625 0.000000 9.437500 5.703125q3.062500 5.687500 3.062500 14.093750q0.000000 3.906250 -0.609375 7.593750l18.000000 -26.390625z"/>
<path id="c_20c2384640bb57b0e738c04c5504e2a6" d="M58.906250 -45.296875l-1.703125 7.093750l-10.203125 0.000000q-1.296875 3.296875 -5.796875 20.609375q-1.109375 4.593750 -1.109375 6.593750q0.000000 3.296875 1.953125 4.109375q1.953125 0.796875 7.046875 0.796875l-0.500000 1.687500l-5.187500 5.406250q-5.500000 -0.093750 -8.656250 -2.093750q-3.156250 -2.000000 -3.156250 -7.109375q0.000000 -2.500000 0.703125 -5.296875q1.000000 -4.203125 3.593750 -13.453125q2.609375 -9.250000 3.312500 -11.250000l-8.609375 0.000000q-2.296875 9.000000 -4.500000 15.562500q-2.187500 6.546875 -5.140625 12.203125q-2.953125 5.640625 -6.750000 8.546875q-3.796875 2.890625 -8.296875 2.890625l-1.406250 -7.093750q5.703125 -0.312500 9.593750 -6.859375q3.906250 -6.546875 8.609375 -25.250000q-5.203125 0.406250 -9.203125 7.906250l-5.406250 -3.406250q4.000000 -7.000000 8.500000 -9.296875q4.500000 -2.296875 11.812500 -2.296875z"/>
<path id="c_5417197ca417065b85e928b42d5f2c4e" d="M49.203125 -67.703125l-5.406250 21.609375q9.703125 0.093750 14.453125 4.953125q4.750000 4.843750 4.750000 12.343750q0.000000 5.203125 -2.109375 10.406250q-2.093750 5.187500 -5.953125 9.593750q-3.843750 4.390625 -9.796875 7.140625q-5.937500 2.750000 -13.046875 2.859375l-4.500000 18.000000l-7.687500 2.390625l-0.812500 -0.500000l5.000000 -19.890625q-9.687500 -0.109375 -14.500000 -4.953125q-4.796875 -4.843750 -4.796875 -12.343750q0.000000 -7.109375 3.593750 -13.796875q3.609375 -6.703125 10.906250 -11.406250q7.296875 -4.703125 16.500000 -4.796875l4.906250 -19.406250l8.000000 -2.906250zM42.000000 -39.000000l-8.296875 33.093750q9.093750 -0.093750 15.187500 -6.296875q6.109375 -6.203125 6.109375 -14.796875q0.000000 -5.296875 -3.453125 -8.546875q-3.453125 -3.250000 -9.546875 -3.453125M25.906250 -5.906250l8.296875 -33.093750q-9.500000 0.000000 -15.406250 6.359375q-5.890625 6.343750 -5.890625 1...
[truncated message content] |
|
From: <js...@us...> - 2010-05-23 16:49:28
|
Revision: 8333
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8333&view=rev
Author: jswhit
Date: 2010-05-23 16:49:22 +0000 (Sun, 23 May 2010)
Log Message:
-----------
handle masked arrays for unstructured meshes.
Modified Paths:
--------------
trunk/toolkits/basemap/examples/ploticos.py
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/examples/ploticos.py
===================================================================
--- trunk/toolkits/basemap/examples/ploticos.py 2010-05-23 12:31:00 UTC (rev 8332)
+++ trunk/toolkits/basemap/examples/ploticos.py 2010-05-23 16:49:22 UTC (rev 8333)
@@ -1,6 +1,7 @@
from mpl_toolkits.basemap import Basemap, NetCDFFile
import matplotlib.pyplot as plt
import numpy as np
+from numpy import ma
# read in orography of icosahedral global grid.
f = NetCDFFile('C02562.orog.nc')
lons = (180./np.pi)*f.variables['grid_center_lon'][:]
@@ -11,5 +12,8 @@
map.drawcoastlines()
map.drawmapboundary()
# tri=True forwards to axes.tripcolor
-map.pcolor(x,y,z,tri=True,shading='faceted')
+#z = ma.masked_where(z < 1.e-5, z) # for testing masked arrays.
+map.pcolor(x,y,z,tri=True,shading='faceted',vmin=0,vmax=3000)
+#map.contourf(x,y,z,np.arange(0,3000,150),tri=True)
+#map.contour(x,y,z,np.arange(0,3000,150),tri=True)
plt.show()
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-05-23 12:31:00 UTC (rev 8332)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-05-23 16:49:22 UTC (rev 8333)
@@ -2757,11 +2757,24 @@
if tri:
# for unstructured grids, toss out points outside
# projection limb (don't use those points in triangulation).
+ if hasattr(data,'mask'):
+ data = data.filled(fill_value=1.e30)
+ masked=True
+ else:
+ masked=False
mask = np.logical_or(x<1.e20,y<1.e20)
x = np.compress(mask,x)
y = np.compress(mask,y)
data = np.compress(mask,data)
- ret = ax.tripcolor(x,y,data,**kwargs)
+ if masked:
+ import matplotlib.tri as tri
+ triang = tri.Triangulation(x, y)
+ z = data[triang.triangles]
+ mask = (z > 1.e20).sum(axis=-1)
+ triang.set_mask(mask)
+ ret = ax.tripcolor(triang,data,**kwargs)
+ else:
+ ret = ax.tripcolor(x,y,data,**kwargs)
else:
# make x,y masked arrays
# (masked where data is outside of projection limb)
@@ -2828,11 +2841,26 @@
ax.hold(h)
try:
if kwargs.has_key('tri') and kwargs['tri']:
+ # for unstructured grids, toss out points outside
+ # projection limb (don't use those points in triangulation).
+ if hasattr(data,'mask'):
+ data = data.filled(fill_value=1.e30)
+ masked=True
+ else:
+ masked=False
mask = np.logical_or(x<1.e20,y<1.e20)
x = np.compress(mask,x)
y = np.compress(mask,y)
data = np.compress(mask,data)
- CS = ax.tricontour(x,y,data,*args,**kwargs)
+ if masked:
+ import matplotlib.tri as tri
+ triang = tri.Triangulation(x, y)
+ z = data[triang.triangles]
+ mask = (z > 1.e20).sum(axis=-1)
+ triang.set_mask(mask)
+ CS = ax.tricontour(triang,data,*args,**kwargs)
+ else:
+ CS = ax.tricontour(x,y,data,*args,**kwargs)
else:
# make sure x is monotonically increasing - if not,
# print warning suggesting that the data be shifted in longitude
@@ -2894,11 +2922,26 @@
ax.hold(h)
try:
if kwargs.has_key('tri') and kwargs['tri']:
+ # for unstructured grids, toss out points outside
+ # projection limb (don't use those points in triangulation).
+ if hasattr(data,'mask'):
+ data = data.filled(fill_value=1.e30)
+ masked=True
+ else:
+ masked=False
mask = np.logical_or(x<1.e20,y<1.e20)
x = np.compress(mask,x)
y = np.compress(mask,y)
data = np.compress(mask,data)
- CS = ax.tricontourf(x,y,data,*args,**kwargs)
+ if masked:
+ import matplotlib.tri as tri
+ triang = tri.Triangulation(x, y)
+ z = data[triang.triangles]
+ mask = (z > 1.e20).sum(axis=-1)
+ triang.set_mask(mask)
+ CS = ax.tricontourf(triang,data,*args,**kwargs)
+ else:
+ CS = ax.tricontourf(x,y,data,*args,**kwargs)
else:
# make sure x is monotonically increasing - if not,
# print warning suggesting that the data be shifted in longitude
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2010-05-23 12:31:07
|
Revision: 8332
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8332&view=rev
Author: jswhit
Date: 2010-05-23 12:31:00 +0000 (Sun, 23 May 2010)
Log Message:
-----------
add support for unstructured meshes in pcolor, contour, contourf methods.
Modified Paths:
--------------
trunk/toolkits/basemap/Changelog
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Added Paths:
-----------
trunk/toolkits/basemap/examples/C02562.orog.nc
trunk/toolkits/basemap/examples/ploticos.py
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog 2010-05-21 18:26:12 UTC (rev 8331)
+++ trunk/toolkits/basemap/Changelog 2010-05-23 12:31:00 UTC (rev 8332)
@@ -1,7 +1,11 @@
version 0.99.5 (not yet released)
+ * add support for plotting on unstructured grids using
+ keyword 'tri' in pcolor,contour,contourf methods (which
+ then forward to tripcolor, tricontour, tricontourf axes
+ methods).
* let continents that fill the whole map be filled.
* added option for cubic spline interpolation in interp function
- (order=3) using scipy.ndimage.
+ (order=3) using scipy.ndimage.
* added "near-sided perspective" projection for a satellite
view at an arbitrary altitude.
* patch from Stephane Raynaud to pass format string to
Added: trunk/toolkits/basemap/examples/C02562.orog.nc
===================================================================
(Binary files differ)
Property changes on: trunk/toolkits/basemap/examples/C02562.orog.nc
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/toolkits/basemap/examples/ploticos.py
===================================================================
--- trunk/toolkits/basemap/examples/ploticos.py (rev 0)
+++ trunk/toolkits/basemap/examples/ploticos.py 2010-05-23 12:31:00 UTC (rev 8332)
@@ -0,0 +1,15 @@
+from mpl_toolkits.basemap import Basemap, NetCDFFile
+import matplotlib.pyplot as plt
+import numpy as np
+# read in orography of icosahedral global grid.
+f = NetCDFFile('C02562.orog.nc')
+lons = (180./np.pi)*f.variables['grid_center_lon'][:]
+lats = (180./np.pi)*f.variables['grid_center_lat'][:]
+z = f.variables['zs'][:]
+map = Basemap(projection='ortho',lon_0=-105,lat_0=40)
+x,y = map(lons, lats)
+map.drawcoastlines()
+map.drawmapboundary()
+# tri=True forwards to axes.tripcolor
+map.pcolor(x,y,z,tri=True,shading='faceted')
+plt.show()
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-05-21 18:26:12 UTC (rev 8331)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-05-23 12:31:00 UTC (rev 8332)
@@ -2730,7 +2730,7 @@
self.set_axes_limits(ax=ax)
return ret
- def pcolor(self,x,y,data,**kwargs):
+ def pcolor(self,x,y,data,tri=False,**kwargs):
"""
Make a pseudo-color plot over the map
(see matplotlib.pyplot.pcolor documentation).
@@ -2739,22 +2739,35 @@
they will be convert to masked arrays with those values masked.
As a result, those values will not be plotted.
+ If ``tri`` is set to ``True``, an unstructured grid is assumed
+ (x,y,data must be 1-d) and matplotlib.pyplot.tricolor is used.
+
Extra keyword ``ax`` can be used to override the default axis instance.
- Other \**kwargs passed on to matplotlib.pyplot.pcolor.
+ Other \**kwargs passed on to matplotlib.pyplot.pcolor (or tricolor if
+ ``tri=True``).
"""
ax, plt = self._ax_plt_from_kw(kwargs)
- # make x,y masked arrays
- # (masked where data is outside of projection limb)
- x = ma.masked_values(np.where(x > 1.e20,1.e20,x), 1.e20)
- y = ma.masked_values(np.where(y > 1.e20,1.e20,y), 1.e20)
# allow callers to override the hold state by passing hold=True|False
b = ax.ishold()
h = kwargs.pop('hold',None)
if h is not None:
ax.hold(h)
try:
- ret = ax.pcolor(x,y,data,**kwargs)
+ if tri:
+ # for unstructured grids, toss out points outside
+ # projection limb (don't use those points in triangulation).
+ mask = np.logical_or(x<1.e20,y<1.e20)
+ x = np.compress(mask,x)
+ y = np.compress(mask,y)
+ data = np.compress(mask,data)
+ ret = ax.tripcolor(x,y,data,**kwargs)
+ else:
+ # make x,y masked arrays
+ # (masked where data is outside of projection limb)
+ x = ma.masked_values(np.where(x > 1.e20,1.e20,x), 1.e20)
+ y = ma.masked_values(np.where(y > 1.e20,1.e20,y), 1.e20)
+ ret = ax.pcolor(x,y,data,**kwargs)
except:
ax.hold(b)
raise
@@ -2801,40 +2814,51 @@
Extra keyword ``ax`` can be used to override the default axis instance.
- Other \*args and \**kwargs passed on to matplotlib.pyplot.contour.
+ If ``tri`` is set to ``True``, an unstructured grid is assumed
+ (x,y,data must be 1-d) and matplotlib.pyplot.tricontour is used.
+
+ Other \*args and \**kwargs passed on to matplotlib.pyplot.contour
+ (or tricontour if ``tri=True``).
"""
ax, plt = self._ax_plt_from_kw(kwargs)
- # make sure x is monotonically increasing - if not,
- # print warning suggesting that the data be shifted in longitude
- # with the shiftgrid function.
- # only do this check for global projections.
- if self.projection in _cylproj + _pseudocyl:
- xx = x[x.shape[0]/2,:]
- condition = (xx >= self.xmin) & (xx <= self.xmax)
- xl = xx.compress(condition).tolist()
- xs = xl[:]
- xs.sort()
- if xl != xs:
- print dedent("""
- WARNING: x coordinate not montonically increasing - contour plot
- may not be what you expect. If it looks odd, your can either
- adjust the map projection region to be consistent with your data, or
- (if your data is on a global lat/lon grid) use the shiftgrid
- function to adjust the data to be consistent with the map projection
- region (see examples/contour_demo.py).""")
- # mask for points outside projection limb.
- xymask = np.logical_or(np.greater(x,1.e20),np.greater(y,1.e20))
- data = ma.asarray(data)
- # combine with data mask.
- mask = np.logical_or(ma.getmaskarray(data),xymask)
- data = ma.masked_array(data,mask=mask)
# allow callers to override the hold state by passing hold=True|False
b = ax.ishold()
h = kwargs.pop('hold',None)
if h is not None:
ax.hold(h)
try:
- CS = ax.contour(x,y,data,*args,**kwargs)
+ if kwargs.has_key('tri') and kwargs['tri']:
+ mask = np.logical_or(x<1.e20,y<1.e20)
+ x = np.compress(mask,x)
+ y = np.compress(mask,y)
+ data = np.compress(mask,data)
+ CS = ax.tricontour(x,y,data,*args,**kwargs)
+ else:
+ # make sure x is monotonically increasing - if not,
+ # print warning suggesting that the data be shifted in longitude
+ # with the shiftgrid function.
+ # only do this check for global projections.
+ if self.projection in _cylproj + _pseudocyl:
+ xx = x[x.shape[0]/2,:]
+ condition = (xx >= self.xmin) & (xx <= self.xmax)
+ xl = xx.compress(condition).tolist()
+ xs = xl[:]
+ xs.sort()
+ if xl != xs:
+ print dedent("""
+ WARNING: x coordinate not montonically increasing - contour plot
+ may not be what you expect. If it looks odd, your can either
+ adjust the map projection region to be consistent with your data, or
+ (if your data is on a global lat/lon grid) use the shiftgrid
+ function to adjust the data to be consistent with the map projection
+ region (see examples/contour_demo.py).""")
+ # mask for points outside projection limb.
+ xymask = np.logical_or(np.greater(x,1.e20),np.greater(y,1.e20))
+ data = ma.asarray(data)
+ # combine with data mask.
+ mask = np.logical_or(ma.getmaskarray(data),xymask)
+ data = ma.masked_array(data,mask=mask)
+ CS = ax.contour(x,y,data,*args,**kwargs)
except:
ax.hold(b)
raise
@@ -2856,48 +2880,59 @@
Extra keyword 'ax' can be used to override the default axis instance.
- Other \*args and \**kwargs passed on to matplotlib.pyplot.scatter.
+ If ``tri`` is set to ``True``, an unstructured grid is assumed
+ (x,y,data must be 1-d) and matplotlib.pyplot.tricontourf is used.
+
+ Other \*args and \**kwargs passed on to matplotlib.pyplot.contourf
+ (or tricontourf if ``tri=True``).
"""
ax, plt = self._ax_plt_from_kw(kwargs)
- # make sure x is monotonically increasing - if not,
- # print warning suggesting that the data be shifted in longitude
- # with the shiftgrid function.
- # only do this check for global projections.
- if self.projection in _cylproj + _pseudocyl:
- xx = x[x.shape[0]/2,:]
- condition = (xx >= self.xmin) & (xx <= self.xmax)
- xl = xx.compress(condition).tolist()
- xs = xl[:]
- xs.sort()
- if xl != xs:
- print dedent("""
- WARNING: x coordinate not montonically increasing - contour plot
- may not be what you expect. If it looks odd, your can either
- adjust the map projection region to be consistent with your data, or
- (if your data is on a global lat/lon grid) use the shiftgrid
- function to adjust the data to be consistent with the map projection
- region (see examples/contour_demo.py).""")
- # mask for points outside projection limb.
- xymask = np.logical_or(np.greater(x,1.e20),np.greater(y,1.e20))
- # mask outside projection region (workaround for contourf bug?)
- epsx = 0.1*(self.xmax-self.xmin)
- epsy = 0.1*(self.ymax-self.ymin)
- outsidemask = np.logical_or(np.logical_or(x > self.xmax+epsx,\
- x < self.xmin-epsy),\
- np.logical_or(y > self.ymax+epsy,\
- y < self.ymin-epsy))
- data = ma.asarray(data)
- # combine masks.
- mask = \
- np.logical_or(outsidemask,np.logical_or(ma.getmaskarray(data),xymask))
- data = ma.masked_array(data,mask=mask)
# allow callers to override the hold state by passing hold=True|False
b = ax.ishold()
h = kwargs.pop('hold',None)
if h is not None:
ax.hold(h)
try:
- CS = ax.contourf(x,y,data,*args,**kwargs)
+ if kwargs.has_key('tri') and kwargs['tri']:
+ mask = np.logical_or(x<1.e20,y<1.e20)
+ x = np.compress(mask,x)
+ y = np.compress(mask,y)
+ data = np.compress(mask,data)
+ CS = ax.tricontourf(x,y,data,*args,**kwargs)
+ else:
+ # make sure x is monotonically increasing - if not,
+ # print warning suggesting that the data be shifted in longitude
+ # with the shiftgrid function.
+ # only do this check for global projections.
+ if self.projection in _cylproj + _pseudocyl:
+ xx = x[x.shape[0]/2,:]
+ condition = (xx >= self.xmin) & (xx <= self.xmax)
+ xl = xx.compress(condition).tolist()
+ xs = xl[:]
+ xs.sort()
+ if xl != xs:
+ print dedent("""
+ WARNING: x coordinate not montonically increasing - contour plot
+ may not be what you expect. If it looks odd, your can either
+ adjust the map projection region to be consistent with your data, or
+ (if your data is on a global lat/lon grid) use the shiftgrid
+ function to adjust the data to be consistent with the map projection
+ region (see examples/contour_demo.py).""")
+ # mask for points outside projection limb.
+ xymask = np.logical_or(np.greater(x,1.e20),np.greater(y,1.e20))
+ # mask outside projection region (workaround for contourf bug?)
+ epsx = 0.1*(self.xmax-self.xmin)
+ epsy = 0.1*(self.ymax-self.ymin)
+ outsidemask = np.logical_or(np.logical_or(x > self.xmax+epsx,\
+ x < self.xmin-epsy),\
+ np.logical_or(y > self.ymax+epsy,\
+ y < self.ymin-epsy))
+ data = ma.asarray(data)
+ # combine masks.
+ mask = \
+ np.logical_or(outsidemask,np.logical_or(ma.getmaskarray(data),xymask))
+ data = ma.masked_array(data,mask=mask)
+ CS = ax.contourf(x,y,data,*args,**kwargs)
except:
ax.hold(b)
raise
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2010-05-21 18:26:19
|
Revision: 8331
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8331&view=rev
Author: efiring
Date: 2010-05-21 18:26:12 +0000 (Fri, 21 May 2010)
Log Message:
-----------
Fix bug introduced in 8308: allow vmin == vmax
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/colors.py
trunk/matplotlib/lib/matplotlib/dates.py
Modified: trunk/matplotlib/lib/matplotlib/colors.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/colors.py 2010-05-20 17:22:54 UTC (rev 8330)
+++ trunk/matplotlib/lib/matplotlib/colors.py 2010-05-21 18:26:12 UTC (rev 8331)
@@ -810,11 +810,8 @@
def inverse(self, value):
if not self.scaled():
raise ValueError("Not invertible until scaled")
- vmin, vmax = self.vmin, self.vmax
- if vmin >= vmax:
- raise ValueError("Inversion requires valid vmax > vmin")
- vmin = float(vmin)
- vmax = float(vmax)
+ vmin = float(self.vmin)
+ vmax = float(self.vmax)
if cbook.iterable(value):
val = ma.asarray(value)
Modified: trunk/matplotlib/lib/matplotlib/dates.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/dates.py 2010-05-20 17:22:54 UTC (rev 8330)
+++ trunk/matplotlib/lib/matplotlib/dates.py 2010-05-21 18:26:12 UTC (rev 8331)
@@ -512,7 +512,7 @@
Return the number of units for each tick.
"""
return 1
-
+
def nonsingular(self, vmin, vmax):
unit = self._get_unit()
interval = self._get_interval()
@@ -561,7 +561,7 @@
if estimate > self.MAXTICKS * 2:
raise RuntimeError(
'RRuleLocator estimated to generate %d ticks from %s to %s: exceeds Locator.MAXTICKS * 2 (%d) ' % (estimate, dmin, dmax, self.MAXTICKS * 2))
-
+
dates = self.rule.between(dmin, dmax, True)
if len(dates) == 0:
return date2num([dmin, dmax])
@@ -597,7 +597,7 @@
def _get_interval(self):
return self.rule._rrule._interval
-
+
def autoscale(self):
"""
Set the view limits to include the data range.
@@ -868,7 +868,7 @@
vmax = date2num(vmax)
return self.nonsingular(vmin, vmax)
-
+
class MonthLocator(RRuleLocator):
"""
Make ticks on occurances of each month month, eg 1, 3, 12.
@@ -925,7 +925,7 @@
interval=interval, **self.hms0d)
RRuleLocator.__init__(self, o, tz)
-
+
class HourLocator(RRuleLocator):
"""
Make ticks on occurances of each hour.
@@ -943,7 +943,7 @@
byminute=0, bysecond=0)
RRuleLocator.__init__(self, rule, tz)
-
+
class MinuteLocator(RRuleLocator):
"""
Make ticks on occurances of each minute.
@@ -961,7 +961,7 @@
bysecond=0)
RRuleLocator.__init__(self, rule, tz)
-
+
class SecondLocator(RRuleLocator):
"""
Make ticks on occurances of each second.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2010-05-20 17:23:01
|
Revision: 8330
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8330&view=rev
Author: mdboom
Date: 2010-05-20 17:22:54 +0000 (Thu, 20 May 2010)
Log Message:
-----------
Update text to use verticalalignment='baseline' by default. Update small number of unit tests to adapt to the new behavior.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/axis.py
trunk/matplotlib/lib/matplotlib/pyplot.py
trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/polar_axes.pdf
trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/polar_axes.png
trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/polar_axes.svg
trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext.pdf
trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext.png
trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext.svg
trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stix.pdf
trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stix.png
trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stix.svg
trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stixsans.pdf
trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stixsans.png
trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stixsans.svg
trunk/matplotlib/lib/matplotlib/tests/test_axes.py
trunk/matplotlib/lib/matplotlib/text.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2010-05-20 16:33:38 UTC (rev 8329)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2010-05-20 17:22:54 UTC (rev 8330)
@@ -865,7 +865,7 @@
self.title = mtext.Text(
x=0.5, y=1.0, text='',
fontproperties=props,
- verticalalignment='bottom',
+ verticalalignment='baseline',
horizontalalignment='center',
)
self.title.set_transform(self.transAxes + self.titleOffsetTrans)
@@ -2866,7 +2866,7 @@
"""
default = {
'fontsize':rcParams['axes.titlesize'],
- 'verticalalignment' : 'bottom',
+ 'verticalalignment' : 'baseline',
'horizontalalignment' : 'center'
}
@@ -2985,9 +2985,8 @@
%(Text)s
"""
default = {
- 'verticalalignment' : 'bottom',
+ 'verticalalignment' : 'baseline',
'horizontalalignment' : 'left',
- #'verticalalignment' : 'top',
'transform' : self.transData,
}
Modified: trunk/matplotlib/lib/matplotlib/axis.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axis.py 2010-05-20 16:33:38 UTC (rev 8329)
+++ trunk/matplotlib/lib/matplotlib/axis.py 2010-05-20 17:22:54 UTC (rev 8330)
@@ -1333,7 +1333,7 @@
"""
assert position == 'top' or position == 'bottom'
if position == 'top':
- self.label.set_verticalalignment('bottom')
+ self.label.set_verticalalignment('baseline')
else:
self.label.set_verticalalignment('top')
self.label_position=position
@@ -1571,7 +1571,7 @@
offsetText = mtext.Text(x=0, y=0.5,
fontproperties = font_manager.FontProperties(size=rcParams['ytick.labelsize']),
color = rcParams['ytick.color'],
- verticalalignment = 'bottom',
+ verticalalignment = 'baseline',
horizontalalignment = 'left',
)
offsetText.set_transform(mtransforms.blended_transform_factory(
Modified: trunk/matplotlib/lib/matplotlib/pyplot.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pyplot.py 2010-05-20 16:33:38 UTC (rev 8329)
+++ trunk/matplotlib/lib/matplotlib/pyplot.py 2010-05-20 17:22:54 UTC (rev 8330)
@@ -903,7 +903,7 @@
Default font override is::
override = {'fontsize': 'medium',
- 'verticalalignment': 'bottom',
+ 'verticalalignment': 'baseline',
'horizontalalignment': 'center'}
.. seealso::
Modified: trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/polar_axes.pdf
===================================================================
(Binary files differ)
Modified: trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/polar_axes.png
===================================================================
(Binary files differ)
Modified: trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/polar_axes.svg
===================================================================
--- trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/polar_axes.svg 2010-05-20 16:33:38 UTC (rev 8329)
+++ trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/polar_axes.svg 2010-05-20 17:22:54 UTC (rev 8330)
@@ -38,55 +38,90 @@
C122.400000 261.827096 140.607298 305.783402 173.011948 338.188052
C205.416598 370.592702 249.372904 388.800000 295.200000 388.800000z"/>
</clipPath>
-</defs><path style="fill: none; stroke: #ee8d18; stroke-width: 3.000000; stroke-linejoin: round; stroke-linecap: square; opacity: 1.000000" clip-path="url(#p904278a4c1c81ab8b13ccb57b319fa38)" d="M295.200000 216.000000L296.233854 215.921901L297.250068 215.688492
-L299.455123 214.558065L301.365078 212.509125L302.401144 210.341395
-L302.849329 208.253938L302.868676 205.984288L302.423165 203.609265
-L301.489531 201.211506L300.058108 198.877447L298.133365 196.695191
-L294.648505 194.061331L290.996086 192.351552L286.458295 191.231788
-L281.860627 190.996572L277.016035 191.622104L273.316398 192.696331
-L269.640487 194.308614L266.064025 196.465694L262.664365 199.163935
-L259.519099 202.389058L256.704631 206.116069L254.294735 210.309371
-L252.359134 214.923065L250.842696 220.474366L250.069271 226.386069
-L250.030230 231.306699L250.536367 236.335565L251.608498 241.411618
-L253.260559 246.470787L255.499222 251.446750L258.323587 256.271756
-L261.724974 260.877491L265.686810 265.195961L270.184615 269.160399
-L275.186096 272.706170L280.651338 275.771675L286.533101 278.299231
-L292.777215 280.235926L299.323077 281.534427L306.104236 282.153740
-L313.049071 282.059907L320.081541 281.226625L327.122015 279.635789
-L334.088165 277.277944L340.895908 274.152634L347.460395 270.268658
-L353.697029 265.644204L359.522508 260.306882L364.855865 254.293636
-L369.619518 247.650545L373.740282 240.432502L377.150373 232.702784
-L379.788348 224.532512L381.420392 217.083534L382.388383 209.413665
-L382.666157 201.582801L382.233009 193.653721L381.073999 185.691588
-L379.180210 177.763410L376.548954 169.937483L373.183925 162.282807
-L369.095302 154.868490L365.027333 148.756694L360.454244 142.914477
-L355.393854 137.383517L349.867410 132.204315L342.863857 126.658485
-L336.416361 122.373025L329.591708 118.556639L322.424341 115.241960
-L314.951490 112.459065L307.212975 110.235243L299.251001 108.594769
-L291.109922 107.558705L282.835996 107.144714L274.477126 107.366888
-L266.082576 108.235606L257.702686 109.757405L249.388571 111.934882
-L241.191807 114.766611L233.164117 118.247090L225.357045 122.366716
-L217.821631 127.111776L210.608085 132.464475L203.765454 138.402979
-L197.341304 144.901496L191.381396 151.930376L185.929375 159.456235
-L181.026467 167.442113L176.711183 175.847644L173.019046 184.629263
-L169.982320 193.740427L167.629768 203.131862L165.986420 212.751825
-L165.073363 222.546393L164.907561 232.459763L165.501682 242.434572
-L166.863969 252.412225L168.998122 262.333243L171.903212 272.137615
-L175.573622 281.765158L179.999023 291.155887L185.164364 300.250385
-L190.019947 307.560621L195.361868 314.591347L201.174043 321.310181
-L207.438232 327.685667L214.134090 333.687420L221.239234 339.286264
-L228.729310 344.454372L236.578081 349.165394L244.757510 353.394589
-L253.237868 357.118946L261.987833 360.317295L270.974609 362.970423
-L280.164049 365.061173L289.520783 366.574537L299.008355 367.497740
-L308.589366 367.820325L318.225617 367.534212L327.878267 366.633763
-L337.507987 365.115828L347.075118 362.979786L356.539838 360.227569
-L365.862325 356.863688L375.002924 352.895231L383.922314 348.331868
-L392.581679 343.185828L400.942873 337.471883L408.968586 331.207303
-L416.622509 324.411813L423.869497 317.107536L430.675724 309.318919
-L437.008840 301.072660L442.838119 292.397615L448.134603 283.324698
-L452.871241 273.886777L457.023016 264.118548L460.567075 254.056416
-L463.482840 243.738354L465.752115 233.203764L467.359189 222.493325
-L467.813570 218.169240L467.813570 218.169240"/>
+</defs><path style="fill: none; stroke: #ee8d18; stroke-width: 3.000000; stroke-linejoin: round; stroke-linecap: square; opacity: 1.000000" clip-path="url(#p904278a4c1c81ab8b13ccb57b319fa38)" d="M295.200000 216.000000L296.404923 215.893735L297.581858 215.576584
+L298.703177 215.053458L299.741970 214.332480L300.672394 213.424887
+L301.470011 212.344904L302.112108 211.109576L302.578004 209.738569
+L302.849329 208.253938L302.910281 206.679872L302.747854 205.042405
+L302.352036 203.369109L301.715973 201.688766L300.836099 200.031021
+L299.712229 198.426027L298.347615 196.904075L296.748960 195.495222
+L294.926402 194.228919L293.196149 193.278591L291.321689 192.471092
+L289.315148 191.822693L287.190280 191.348615L284.962371 191.062879
+L282.648140 190.978161L280.265615 191.105658L277.834006 191.454964
+L275.373564 192.033956L272.905428 192.848692L270.451463 193.903325
+L268.034095 195.200030L265.676132 196.738944L263.400583 198.518123
+L261.230477 200.533514L259.188667 202.778946L257.297649 205.246130
+L255.852840 207.464085L254.540313 209.821762L253.371951 212.311093
+L252.359134 214.923065L251.512663 217.647754L250.842696 220.474366
+L250.358676 223.391274L250.069271 226.386069L249.982310 229.445613
+L250.104727 232.556095L250.442510 235.703092L251.000646 238.871635
+L251.783082 242.046279L252.792683 245.211174L254.031196 248.350141
+L255.499222 251.446750L257.196193 254.484403L259.120350 257.446415
+L261.268735 260.316098L263.637181 263.076847L266.220312 265.712227
+L269.011551 268.206060L272.003126 270.542510L275.186096 272.706170
+L278.550369 274.682149L282.084731 276.456152L285.776890 278.014565
+L289.613507 279.344535L293.580255 280.434045L297.661862 281.271989
+L301.842179 281.848246L305.246126 282.114701L308.693365 282.203711
+L312.174577 282.111612L315.680185 281.835237L319.200382 281.371924
+L322.725153 280.719538L326.244311 279.876480L329.747519 278.841705
+L333.224324 277.614724L336.664183 276.195621L340.056502 274.585058
+L343.390657 272.784278L346.656037 270.795114L349.842066 268.619985
+L352.938245 266.261902L355.934177 263.724465L358.819604 261.011858
+L361.584439 258.128846L364.218799 255.080768L366.713035 251.873527
+L369.057766 248.513582L371.243911 245.007935L373.262719 241.364115
+L375.105797 237.590164L376.765143 233.694622L378.233174 229.686503
+L379.502753 225.575277L380.567214 221.370850L381.420392 217.083534
+L382.056642 212.724030L382.470867 208.303392L382.658536 203.833007
+L382.615707 199.324562L382.339043 194.790013L381.825832 190.241555
+L381.073999 185.691588L380.082124 181.152685L378.849451 176.637556
+L377.375899 172.159012L375.662069 167.729933L373.709253 163.363226
+L371.519437 159.071792L369.095302 154.868490L366.440227 150.766092
+L363.558286 146.777255L360.454244 142.914477L357.133553 139.190059
+L353.602343 135.616071L349.867410 132.204315L345.936210 128.966282
+L341.816840 125.913123L337.518023 123.055610L333.049094 120.404101
+L328.419974 117.968506L323.641155 115.758256L318.723670 113.782266
+L313.679075 112.048910L308.519413 110.565986L303.257196 109.340693
+L297.905365 108.379598L292.477265 107.688617L286.986606 107.272984
+L281.447435 107.137238L275.874094 107.285194L270.281186 107.719929
+L264.683537 108.443767L259.096155 109.458260L253.534191 110.764178
+L248.012898 112.361501L242.547590 114.249404L238.494572 115.855077
+L234.488132 117.622315L230.534712 119.549875L226.640728 121.636258
+L222.812556 123.879705L219.056525 126.278205L215.378904 128.829490
+L211.785893 131.531038L208.283613 134.380079L204.878095 137.373593
+L201.575273 140.508313L198.380968 143.780731L195.300884 147.187100
+L192.340595 150.723437L189.505536 154.385529L186.800994 158.168938
+L184.232100 162.069006L181.803815 166.080860L179.520929 170.199416
+L177.388043 174.419390L175.409569 178.735302L173.589716 183.141482
+L171.932486 187.632081L170.441661 192.201074L169.120802 196.842271
+L167.973238 201.549327L167.002061 206.315745L166.210116 211.134891
+L165.600000 216.000000L165.174053 220.904186L164.934352 225.840453
+L164.882710 230.801702L165.020666 235.780744L165.349484 240.770311
+L165.870149 245.763062L166.583363 250.751601L167.489541 255.728480
+L168.588810 260.686216L169.881006 265.617300L171.365673 270.514208
+L173.042059 275.369413L174.909120 280.175398L176.965515 284.924663
+L179.209607 289.609742L181.639467 294.223211L184.252869 298.757703
+L187.047298 303.205914L190.019947 307.560621L193.167719 311.814689
+L196.487235 315.961086L199.974832 319.992890L203.626570 323.903304
+L207.438232 327.685667L211.405334 331.333463L215.523128 334.840332
+L219.786604 338.200084L224.190501 341.406706L228.729310 344.454372
+L233.397284 347.337456L238.188441 350.050541L243.096575 352.588427
+L248.115262 354.946140L253.237868 357.118946L258.457561 359.102351
+L263.767317 360.892117L269.159929 362.484269L274.628020 363.875098
+L280.164049 365.061173L285.760324 366.039346L291.409015 366.806759
+L297.102157 367.360848L302.831670 367.699355L308.589366 367.820325
+L314.366961 367.722117L320.156088 367.403406L325.948307 366.863187
+L331.735122 366.100779L337.507987 365.115828L343.258323 363.908309
+L348.977530 362.478529L354.657000 360.827127L360.288127 358.955077
+L365.862325 356.863688L371.371037 354.554602L376.805749 352.029796
+L382.158005 349.291583L387.419416 346.342602L392.581679 343.185828
+L397.636585 339.824560L402.576032 336.262422L407.392041 332.503358
+L412.076766 328.551630L416.622509 324.411813L421.021730 320.088788
+L425.267061 315.587737L429.351315 310.914140L433.267502 306.073764
+L437.008840 301.072660L440.568763 295.917153L443.940934 290.613837
+L447.119257 285.169561L450.097888 279.591427L452.871241 273.886777
+L455.434002 268.063183L457.781137 262.128440L459.907902 256.090553
+L461.809850 249.957726L463.482840 243.738354L464.923046 237.441007
+L466.126964 231.074422L467.091419 224.647489L467.813570 218.169240
+L467.813570 218.169240"/>
</g>
<g id="line2d2">
<defs><path id="m87f81da4bcf58d853202912065521dc1" d="M0.000000 3.000000C0.795609 3.000000 1.558740 2.683901 2.121320 2.121320
@@ -228,22 +263,37 @@
<g id="matplotlib.axis2">
<g id="ytick1">
<g id="line2d11">
-<path style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; stroke-dasharray: 1.000000,3.000000; stroke-dashoffset: 0.000000; opacity: 1.000000" clip-path="url(#p904278a4c1c81ab8b13ccb57b319fa38)" d="M329.760000 216.000000L329.423664 211.190178L328.421204 206.473973
-L326.772131 201.943182L324.508542 197.685990L322.433652 194.722739
-L319.207393 191.139617L315.513858 188.040373L310.350107 184.937678
-L305.879627 183.131487L301.201281 181.965044L296.406127 181.461053
-L291.587496 181.629323L286.839179 182.466580L282.253596 183.956526
-L277.920000 186.070162L273.922739 188.766348L270.339617 191.992607
-L267.240373 195.686142L264.137678 200.849893L262.331487 205.320373
-L261.165044 209.998719L260.661053 214.793873L260.829323 219.612504
-L261.666580 224.360821L263.156526 228.946404L265.270162 233.280000
-L267.966348 237.277261L271.192607 240.860383L274.886142 243.959627
-L280.049893 247.062322L284.520373 248.868513L289.198719 250.034956
-L293.993873 250.538947L298.812504 250.370677L303.560821 249.533420
-L308.146404 248.043474L312.480000 245.929838L316.477261 243.233652
-L320.060383 240.007393L323.159627 236.313858L326.262322 231.150107
-L328.068513 226.679627L329.234956 222.001281L329.738947 217.206127
-L329.760000 216.000000L329.760000 216.000000"/>
+<path style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; stroke-dasharray: 1.000000,3.000000; stroke-dashoffset: 0.000000; opacity: 1.000000" clip-path="url(#p904278a4c1c81ab8b13ccb57b319fa38)" d="M329.760000 216.000000L329.738947 214.793873L329.675814 213.589216
+L329.423664 211.190178L329.004781 208.814572L328.421204 206.473973
+L327.675777 204.179784L326.772131 201.943182L325.714669 199.775063
+L324.508542 197.685990L323.159627 195.686142L321.674496 193.785260
+L320.060383 191.992607L318.325154 190.316915L316.477261 188.766348
+L314.525707 187.348461L312.480000 186.070162L310.350107 184.937678
+L308.146404 183.956526L305.879627 183.131487L303.560821 182.466580
+L301.201281 181.965044L298.812504 181.629323L296.406127 181.461053
+L293.993873 181.461053L291.587496 181.629323L289.198719 181.965044
+L286.839179 182.466580L284.520373 183.131487L282.253596 183.956526
+L280.049893 184.937678L277.920000 186.070162L275.874293 187.348461
+L273.922739 188.766348L272.074846 190.316915L270.339617 191.992607
+L268.725504 193.785260L267.240373 195.686142L265.891458 197.685990
+L264.685331 199.775063L263.627869 201.943182L262.724223 204.179784
+L261.978796 206.473973L261.395219 208.814572L260.976336 211.190178
+L260.724186 213.589216L260.640000 216.000000L260.724186 218.410784
+L260.976336 220.809822L261.395219 223.185428L261.978796 225.526027
+L262.724223 227.820216L263.627869 230.056818L264.685331 232.224937
+L265.891458 234.314010L267.240373 236.313858L268.725504 238.214740
+L270.339617 240.007393L272.074846 241.683085L273.922739 243.233652
+L275.874293 244.651539L277.920000 245.929838L280.049893 247.062322
+L282.253596 248.043474L284.520373 248.868513L286.839179 249.533420
+L289.198719 250.034956L291.587496 250.370677L293.993873 250.538947
+L296.406127 250.538947L298.812504 250.370677L301.201281 250.034956
+L303.560821 249.533420L305.879627 248.868513L308.146404 248.043474
+L310.350107 247.062322L312.480000 245.929838L314.525707 244.651539
+L316.477261 243.233652L318.325154 241.683085L320.060383 240.007393
+L321.674496 238.214740L323.159627 236.313858L324.508542 234.314010
+L325.714669 232.224937L326.772131 230.056818L327.675777 227.820216
+L328.421204 225.526027L329.004781 223.185428L329.423664 220.809822
+L329.675814 218.410784L329.760000 216.000000L329.760000 216.000000"/>
</g>
<g id="text9">
<defs>
@@ -258,27 +308,37 @@
</g>
<g id="ytick2">
<g id="line2d12">
-<path style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; stroke-dasharray: 1.000000,3.000000; stroke-dashoffset: 0.000000; opacity: 1.000000" clip-path="url(#p904278a4c1c81ab8b13ccb57b319fa38)" d="M364.320000 216.000000L363.941353 208.774993L362.809562 201.629144
-L360.937026 194.640745L358.344262 187.886363L355.059676 181.440000
-L351.119255 175.372283L346.566170 169.749692L341.450308 164.633830
-L335.827717 160.080745L329.760000 156.140324L323.313637 152.855738
-L316.559255 150.262974L309.570856 148.390438L302.425007 147.258647
-L295.200000 146.880000L287.974993 147.258647L280.829144 148.390438
-L273.840745 150.262974L267.086363 152.855738L260.640000 156.140324
-L254.572283 160.080745L248.949692 164.633830L243.833830 169.749692
-L239.280745 175.372283L235.340324 181.440000L232.055738 187.886363
-L229.462974 194.640745L227.590438 201.629144L226.458647 208.774993
-L226.080000 216.000000L226.458647 223.225007L227.590438 230.370856
-L229.462974 237.359255L232.055738 244.113637L235.340324 250.560000
-L239.280745 256.627717L243.833830 262.250308L248.949692 267.366170
-L254.572283 271.919255L260.640000 275.859676L267.086363 279.144262
-L273.840745 281.737026L280.829144 283.609562L287.974993 284.741353
-L295.200000 285.120000L302.425007 284.741353L309.570856 283.609562
-L316.559255 281.737026L323.313637 279.144262L329.760000 275.859676
-L335.827717 271.919255L341.450308 267.366170L346.566170 262.250308
-L351.119255 256.627717L355.059676 250.560000L358.344262 244.113637
-L360.937026 237.359255L362.809562 230.370856L363.941353 223.225007
-L364.320000 216.000000L364.320000 216.000000"/>
+<path style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; stroke-dasharray: 1.000000,3.000000; stroke-dashoffset: 0.000000; opacity: 1.000000" clip-path="url(#p904278a4c1c81ab8b13ccb57b319fa38)" d="M364.320000 216.000000L364.277894 213.587747L364.151627 211.178433
+L363.647329 206.380355L362.809562 201.629144L361.642408 196.947946
+L360.151554 192.359568L358.344262 187.886363L356.229338 183.550126
+L353.817084 179.371980L351.119255 175.372283L348.148992 171.570520
+L344.920767 167.985213L341.450308 164.633830L337.754521 161.532697
+L333.851413 158.696923L329.760000 156.140324L325.500214 153.875356
+L321.092808 151.913052L316.559255 150.262974L311.921641 148.933159
+L307.202562 147.930088L302.425007 147.258647L297.612253 146.922106
+L292.787747 146.922106L287.974993 147.258647L283.197438 147.930088
+L278.478359 148.933159L273.840745 150.262974L269.307192 151.913052
+L264.899786 153.875356L260.640000 156.140324L256.548587 158.696923
+L252.645479 161.532697L248.949692 164.633830L245.479233 167.985213
+L242.251008 171.570520L239.280745 175.372283L236.582916 179.371980
+L234.170662 183.550126L232.055738 187.886363L230.248446 192.359568
+L228.757592 196.947946L227.590438 201.629144L226.752671 206.380355
+L226.248373 211.178433L226.080000 216.000000L226.248373 220.821567
+L226.752671 225.619645L227.590438 230.370856L228.757592 235.052054
+L230.248446 239.640432L232.055738 244.113637L234.170662 248.449874
+L236.582916 252.628020L239.280745 256.627717L242.251008 260.429480
+L245.479233 264.014787L248.949692 267.366170L252.645479 270.467303
+L256.548587 273.303077L260.640000 275.859676L264.899786 278.124644
+L269.307192 280.086948L273.840745 281.737026L278.478359 283.066841
+L283.197438 284.069912L287.974993 284.741353L292.787747 285.077894
+L297.612253 285.077894L302.425007 284.741353L307.202562 284.069912
+L311.921641 283.066841L316.559255 281.737026L321.092808 280.086948
+L325.500214 278.124644L329.760000 275.859676L333.851413 273.303077
+L337.754521 270.467303L341.450308 267.366170L344.920767 264.014787
+L348.148992 260.429480L351.119255 256.627717L353.817084 252.628020
+L356.229338 248.449874L358.344262 244.113637L360.151554 239.640432
+L361.642408 235.052054L362.809562 230.370856L363.647329 225.619645
+L364.151627 220.821567L364.320000 216.000000L364.320000 216.000000"/>
</g>
<g id="text10">
<g style="fill: #000000; opacity: 1.000000" transform="translate(358.228372,190.609724)scale(0.120000)">
@@ -291,36 +351,66 @@
<g id="ytick3">
<g id="line2d13">
<path style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; stroke-dasharray: 1.000000,3.000000; stroke-dashoffset: 0.000000; opacity: 1.000000" clip-path="url(#p904278a4c1c81ab8b13ccb57b319fa38)" d="M398.880000 216.000000L398.816841 212.381620L398.627441 208.767649
-L397.870993 201.570533L396.614343 194.443716L394.863613 187.421919
-L392.627331 180.539352L389.916393 173.829545L386.744006 167.325188
-L383.125627 161.057971L379.078882 155.058425L374.623488 149.355781
-L369.781150 143.977820L364.575461 138.950744L359.031782 134.299045
-L353.177120 130.045384L347.040000 126.210486L340.650320 122.813033
-L334.039212 119.869578L327.238882 117.394460L320.282462 115.399739
-L313.203843 113.895132L306.037511 112.887970L298.818380 112.383159
-L291.581620 112.383159L284.362489 112.887970L277.196157 113.895132
-L270.117538 115.399739L263.161118 117.394460L256.360788 119.869578
-L249.749680 122.813033L243.360000 126.210486L237.222880 130.045384
-L231.368218 134.299045L225.824539 138.950744L220.618850 143.977820
-L215.776512 149.355781L211.321118 155.058425L207.274373 161.057971
-L203.655994 167.325188L200.483607 173.829545L197.772669 180.539352
-L195.536387 187.421919L193.785657 194.443716L192.529007 201.570533
-L191.772559 208.767649L191.520000 216.000000L191.772559 223.232351
-L192.529007 230.429467L193.785657 237.556284L195.536387 244.578081
-L197.772669 251.460648L200.483607 258.170455L203.655994 264.674812
-L207.274373 270.942029L211.321118 276.941575L215.776512 282.644219
-L220.618850 288.022180L225.824539 293.049256L231.368218 297.700955
-L237.222880 301.954616L243.360000 305.789514L249.749680 309.186967
-L256.360788 312.130422L263.161118 314.605540L270.117538 316.600261
-L277.196157 318.104868L284.362489 319.112030L291.581620 319.616841
-L298.818380 319.616841L306.037511 319.112030L313.203843 318.104868
-L320.282462 316.600261L327.238882 314.605540L334.039212 312.130422
-L340.650320 309.186967L347.040000 305.789514L353.177120 301.954616
-L359.031782 297.700955L364.575461 293.049256L369.781150 288.022180
-L374.623488 282.644219L379.078882 276.941575L383.125627 270.942029
-L386.744006 264.674812L389.916393 258.170455L392.627331 251.460648
-L394.863613 244.578081L396.614343 237.556284L397.870993 230.429467
-L398.627441 223.232351L398.880000 216.000000L398.880000 216.000000"/>
+L398.312030 205.162489L397.870993 201.570533L397.304868 197.996157
+L396.614343 194.443716L395.800261 190.917538L394.863613 187.421919
+L393.805540 183.961118L392.627331 180.539352L391.330422 177.160788
+L389.916393 173.829545L388.386967 170.549680L386.744006 167.325188
+L384.989514 164.160000L383.125627 161.057971L381.154616 158.022880
+L379.078882 155.058425L376.900955 152.168218L374.623488 149.355781
+L372.249256 146.624539L369.781150 143.977820L367.222180 141.418850
+L364.575461 138.950744L361.844219 136.576512L359.031782 134.299045
+L356.141575 132.121118L353.177120 130.045384L350.142029 128.074373
+L347.040000 126.210486L343.874812 124.455994L340.650320 122.813033
+L337.370455 121.283607L334.039212 119.869578L330.660648 118.572669
+L327.238882 117.394460L323.778081 116.336387L320.282462 115.399739
+L316.756284 114.585657L313.203843 113.895132L309.629467 113.329007
+L306.037511 112.887970L302.432351 112.572559L298.818380 112.383159
+L295.200000 112.320000L291.581620 112.383159L287.967649 112.572559
+L284.362489 112.887970L280.770533 113.329007L277.196157 113.895132
+L273.643716 114.585657L270.117538 115.399739L266.621919 116.336387
+L263.161118 117.394460L259.739352 118.572669L256.360788 119.869578
+L253.029545 121.283607L249.749680 122.813033L246.525188 124.455994
+L243.360000 126.210486L240.257971 128.074373L237.222880 130.045384
+L234.258425 132.121118L231.368218 134.299045L228.555781 136.576512
+L225.824539 138.950744L223.177820 141.418850L220.618850 143.977820
+L218.150744 146.624539L215.776512 149.355781L213.499045 152.168218
+L211.321118 155.058425L209.245384 158.022880L207.274373 161.057971
+L205.410486 164.160000L203.655994 167.325188L202.013033 170.549680
+L200.483607 173.829545L199.069578 177.160788L197.772669 180.539352
+L196.594460 183.961118L195.536387 187.421919L194.599739 190.917538
+L193.785657 194.443716L193.095132 197.996157L192.529007 201.570533
+L192.087970 205.162489L191.772559 208.767649L191.583159 212.381620
+L191.520000 216.000000L191.583159 219.618380L191.772559 223.232351
+L192.087970 226.837511L192.529007 230.429467L193.095132 234.003843
+L193.785657 237.556284L194.599739 241.082462L195.536387 244.578081
+L196.594460 248.038882L197.772669 251.460648L199.069578 254.839212
+L200.483607 258.170455L202.013033 261.450320L203.655994 264.674812
+L205.410486 267.840000L207.274373 270.942029L209.245384 273.977120
+L211.321118 276.941575L213.499045 279.831782L215.776512 282.644219
+L218.150744 285.375461L220.618850 288.022180L223.177820 290.581150
+L225.824539 293.049256L228.555781 295.423488L231.368218 297.700955
+L234.258425 299.878882L237.222880 301.954616L240.257971 303.925627
+L243.360000 305.789514L246.525188 307.544006L249.749680 309.186967
+L253.029545 310.716393L256.360788 312.130422L259.739352 313.427331
+L263.161118 314.605540L266.621919 315.663613L270.117538 316.600261
+L273.643716 317.414343L277.196157 318.104868L280.770533 318.670993
+L284.362489 319.112030L287.967649 319.427441L291.581620 319.616841
+L295.200000 319.680000L298.818380 319.616841L302.432351 319.427441
+L306.037511 319.112030L309.629467 318.670993L313.203843 318.104868
+L316.756284 317.414343L320.282462 316.600261L323.778081 315.663613
+L327.238882 314.605540L330.660648 313.427331L334.039212 312.130422
+L337.370455 310.716393L340.650320 309.186967L343.874812 307.544006
+L347.040000 305.789514L350.142029 303.925627L353.177120 301.954616
+L356.141575 299.878882L359.031782 297.700955L361.844219 295.423488
+L364.575461 293.049256L367.222180 290.581150L369.781150 288.022180
+L372.249256 285.375461L374.623488 282.644219L376.900955 279.831782
+L379.078882 276.941575L381.154616 273.977120L383.125627 270.942029
+L384.989514 267.840000L386.744006 264.674812L388.386967 261.450320
+L389.916393 258.170455L391.330422 254.839212L392.627331 251.460648
+L393.805540 248.038882L394.863613 244.578081L395.800261 241.082462
+L396.614343 237.556284L397.304868 234.003843L397.870993 230.429467
+L398.312030 226.837511L398.627441 223.232351L398.816841 219.618380
+L398.880000 216.000000L398.880000 216.000000"/>
</g>
<g id="text11">
<defs>
@@ -336,36 +426,66 @@
<g id="ytick4">
<g id="line2d14">
<path style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; stroke-dasharray: 1.000000,3.000000; stroke-dashoffset: 0.000000; opacity: 1.000000" clip-path="url(#p904278a4c1c81ab8b13ccb57b319fa38)" d="M433.440000 216.000000L433.355788 211.175494L433.103254 206.356865
-L432.094658 196.760711L430.419124 187.258288L428.084817 177.895892
-L425.103108 168.719135L421.488524 159.772726L417.258675 151.100251
-L412.434169 142.743961L407.038509 134.744567L401.097984 127.141041
-L394.641534 119.970427L387.700615 113.267659L380.309042 107.065393
-L372.502827 101.393846L364.320000 96.280648L355.800427 91.750711
-L346.985615 87.826104L337.918509 84.525947L328.643283 81.866319
-L319.205124 79.860176L309.650015 78.517293L300.024506 77.844212
-L290.375494 77.844212L280.749985 78.517293L271.194876 79.860176
-L261.756717 81.866319L252.481491 84.525947L243.414385 87.826104
-L234.599573 91.750711L226.080000 96.280648L217.897173 101.393846
-L210.090958 107.065393L202.699385 113.267659L195.758466 119.970427
-L189.302016 127.141041L183.361491 134.744567L177.965831 142.743961
-L173.141325 151.100251L168.911476 159.772726L165.296892 168.719135
-L162.315183 177.895892L159.980876 187.258288L158.305342 196.760711
-L157.296746 206.356865L156.960000 216.000000L157.296746 225.643135
-L158.305342 235.239289L159.980876 244.741712L162.315183 254.104108
-L165.296892 263.280865L168.911476 272.227274L173.141325 280.899749
-L177.965831 289.256039L183.361491 297.255433L189.302016 304.858959
-L195.758466 312.029573L202.699385 318.732341L210.090958 324.934607
-L217.897173 330.606154L226.080000 335.719352L234.599573 340.249289
-L243.414385 344.173896L252.481491 347.474053L261.756717 350.133681
-L271.194876 352.139824L280.749985 353.482707L290.375494 354.155788
-L300.024506 354.155788L309.650015 353.482707L319.205124 352.139824
-L328.643283 350.133681L337.918509 347.474053L346.985615 344.173896
-L355.800427 340.249289L364.320000 335.719352L372.502827 330.606154
-L380.309042 324.934607L387.700615 318.732341L394.641534 312.029573
-L401.097984 304.858959L407.038509 297.255433L412.434169 289.256039
-L417.258675 280.899749L421.488524 272.227274L425.103108 263.280865
-L428.084817 254.104108L430.419124 244.741712L432.094658 235.239289
-L433.103254 225.643135L433.440000 216.000000L433.440000 216.000000"/>
+L432.682707 201.549985L432.094658 196.760711L431.339824 191.994876
+L430.419124 187.258288L429.333681 182.556717L428.084817 177.895892
+L426.674053 173.281491L425.103108 168.719135L423.373896 164.214385
+L421.488524 159.772726L419.449289 155.399573L417.258675 151.100251
+L414.919352 146.880000L412.434169 142.743961L409.806154 138.697173
+L407.038509 134.744567L404.134607 130.890958L401.097984 127.141041
+L397.932341 123.499385L394.641534 119.970427L391.229573 116.558466
+L387.700615 113.267659L384.058959 110.102016L380.309042 107.065393
+L376.455433 104.161491L372.502827 101.393846L368.456039 98.765831
+L364.320000 96.280648L360.099749 93.941325L355.800427 91.750711
+L351.427274 89.711476L346.985615 87.826104L342.480865 86.096892
+L337.918509 84.525947L333.304108 83.115183L328.643283 81.866319
+L323.941712 80.780876L319.205124 79.860176L314.439289 79.105342
+L309.650015 78.517293L304.843135 78.096746L300.024506 77.844212
+L295.200000 77.760000L290.375494 77.844212L285.556865 78.096746
+L280.749985 78.517293L275.960711 79.105342L271.194876 79.860176
+L266.458288 80.780876L261.756717 81.866319L257.095892 83.115183
+L252.481491 84.525947L247.919135 86.096892L243.414385 87.826104
+L238.972726 89.711476L234.599573 91.750711L230.300251 93.941325
+L226.080000 96.280648L221.943961 98.765831L217.897173 101.393846
+L213.944567 104.161491L210.090958 107.065393L206.341041 110.102016
+L202.699385 113.267659L199.170427 116.558466L195.758466 119.970427
+L192.467659 123.499385L189.302016 127.141041L186.265393 130.890958
+L183.361491 134.744567L180.593846 138.697173L177.965831 142.743961
+L175.480648 146.880000L173.141325 151.100251L170.950711 155.399573
+L168.911476 159.772726L167.026104 164.214385L165.296892 168.719135
+L163.725947 173.281491L162.315183 177.895892L161.066319 182.556717
+L159.980876 187.258288L159.060176 191.994876L158.305342 196.760711
+L157.717293 201.549985L157.296746 206.356865L157.044212 211.175494
+L156.960000 216.000000L157.044212 220.824506L157.296746 225.643135
+L157.717293 230.450015L158.305342 235.239289L159.060176 240.005124
+L159.980876 244.741712L161.066319 249.443283L162.315183 254.104108
+L163.725947 258.718509L165.296892 263.280865L167.026104 267.785615
+L168.911476 272.227274L170.950711 276.600427L173.141325 280.899749
+L175.480648 285.120000L177.965831 289.256039L180.593846 293.302827
+L183.361491 297.255433L186.265393 301.109042L189.302016 304.858959
+L192.467659 308.500615L195.758466 312.029573L199.170427 315.441534
+L202.699385 318.732341L206.341041 321.897984L210.090958 324.934607
+L213.944567 327.838509L217.897173 330.606154L221.943961 333.234169
+L226.080000 335.719352L230.300251 338.058675L234.599573 340.249289
+L238.972726 342.288524L243.414385 344.173896L247.919135 345.903108
+L252.481491 347.474053L257.095892 348.884817L261.756717 350.133681
+L266.458288 351.219124L271.194876 352.139824L275.960711 352.894658
+L280.749985 353.482707L285.556865 353.903254L290.375494 354.155788
+L295.200000 354.240000L300.024506 354.155788L304.843135 353.903254
+L309.650015 353.482707L314.439289 352.894658L319.205124 352.139824
+L323.941712 351.219124L328.643283 350.133681L333.304108 348.884817
+L337.918509 347.474053L342.480865 345.903108L346.985615 344.173896
+L351.427274 342.288524L355.800427 340.249289L360.099749 338.058675
+L364.320000 335.719352L368.456039 333.234169L372.502827 330.606154
+L376.455433 327.838509L380.309042 324.934607L384.058959 321.897984
+L387.700615 318.732341L391.229573 315.441534L394.641534 312.029573
+L397.932341 308.500615L401.097984 304.858959L404.134607 301.109042
+L407.038509 297.255433L409.806154 293.302827L412.434169 289.256039
+L414.919352 285.120000L417.258675 280.899749L419.449289 276.600427
+L421.488524 272.227274L423.373896 267.785615L425.103108 263.280865
+L426.674053 258.718509L428.084817 254.104108L429.333681 249.443283
+L430.419124 244.741712L431.339824 240.005124L432.094658 235.239289
+L432.682707 230.450015L433.103254 225.643135L433.355788 220.824506
+L433.440000 216.000000L433.440000 216.000000"/>
</g>
<g id="text12">
<g style="fill: #000000; opacity: 1.000000" transform="translate(422.165051,164.158645)scale(0.120000)">
@@ -378,36 +498,66 @@
<g id="ytick5">
<g id="line2d15">
<path style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; stroke-dasharray: 1.000000,3.000000; stroke-dashoffset: 0.000000; opacity: 1.000000" clip-path="url(#p904278a4c1c81ab8b13ccb57b319fa38)" d="M468.000000 216.000000L467.894735 209.969367L467.579068 203.946081
-L466.318322 191.950888L464.223905 180.072860L461.306021 168.369865
-L457.578885 156.898919L453.060655 145.715908L447.773344 134.875314
-L441.742711 124.429951L434.998137 114.430708L427.572480 104.926301
-L419.501917 95.963034L410.825769 87.584574L401.586303 79.831742
-L391.828534 72.742307L381.600000 66.350810L370.950534 60.688389
-L359.932019 55.782630L348.598137 51.657434L337.004104 48.332898
-L325.206405 45.825220L313.262518 44.146616L301.230633 43.305265
-L289.169367 43.305265L277.137482 44.146616L265.193595 45.825220
-L253.395896 48.332898L241.801863 51.657434L230.467981 55.782630
-L219.449466 60.688389L208.800000 66.350810L198.571466 72.742307
-L188.813697 79.831742L179.574231 87.584574L170.898083 95.963034
-L162.827520 104.926301L155.401863 114.430708L148.657289 124.429951
-L142.626656 134.875314L137.339345 145.715908L132.821115 156.898919
-L129.093979 168.369865L126.176095 180.072860L124.081678 191.950888
-L122.820932 203.946081L122.400000 216.000000L122.820932 228.053919
-L124.081678 240.049112L126.176095 251.927140L129.093979 263.630135
-L132.821115 275.101081L137.339345 286.284092L142.626656 297.124686
-L148.657289 307.570049L155.401863 317.569292L162.827520 327.073699
-L170.898083 336.036966L179.574231 344.415426L188.813697 352.168258
-L198.571466 359.257693L208.800000 365.649190L219.449466 371.311611
-L230.467981 376.217370L241.801863 380.342566L253.395896 383.667102
-L265.193595 386.174780L277.137482 387.853384L289.169367 388.694735
-L301.230633 388.694735L313.262518 387.853384L325.206405 386.174780
-L337.004104 383.667102L348.598137 380.342566L359.932019 376.217370
-L370.950534 371.311611L381.600000 365.649190L391.828534 359.257693
-L401.586303 352.168258L410.825769 344.415426L419.501917 336.036966
-L427.572480 327.073699L434.998137 317.569292L441.742711 307.570049
-L447.773344 297.124686L453.060655 286.284092L457.578885 275.101081
-L461.306021 263.630135L464.223905 251.927140L466.318322 240.049112
-L467.579068 228.053919L468.000000 216.000000L468.000000 216.000000"/>
+L467.053384 197.937482L466.318322 191.950888L465.374780 185.993595
+L464.223905 180.072860L462.867102 174.195896L461.306021 168.369865
+L459.542566 162.601863L457.578885 156.898919L455.417370 151.267981
+L453.060655 145.715908L450.511611 140.249466L447.773344 134.875314
+L444.849190 129.600000L441.742711 124.429951L438.457693 119.371466
+L434.998137 114.430708L431.368258 109.613697L427.572480 104.926301
+L423.615426 100.374231L419.501917 95.963034L415.236966 91.698083
+L410.825769 87.584574L406.273699 83.627520L401.586303 79.831742
+L396.769292 76.201863L391.828534 72.742307L386.770049 69.457289
+L381.600000 66.350810L376.324686 63.426656L370.950534 60.688389
+L365.484092 58.139345L359.932019 55.782630L354.301081 53.621115
+L348.598137 51.657434L342.830135 49.893979L337.004104 48.332898
+L331.127140 46.976095L325.206405 45.825220L319.249112 44.881678
+L313.262518 44.146616L307.253919 43.620932L301.230633 43.305265
+L295.200000 43.200000L289.169367 43.305265L283.146081 43.620932
+L277.137482 44.146616L271.150888 44.881678L265.193595 45.825220
+L259.272860 46.976095L253.395896 48.332898L247.569865 49.893979
+L241.801863 51.657434L236.098919 53.621115L230.467981 55.782630
+L224.915908 58.139345L219.449466 60.688389L214.075314 63.426656
+L208.800000 66.350810L203.629951 69.457289L198.571466 72.742307
+L193.630708 76.201863L188.813697 79.831742L184.126301 83.627520
+L179.574231 87.584574L175.163034 91.698083L170.898083 95.963034
+L166.784574 100.374231L162.827520 104.926301L159.031742 109.613697
+L155.401863 114.430708L151.942307 119.371466L148.657289 124.429951
+L145.550810 129.600000L142.626656 134.875314L139.888389 140.249466
+L137.339345 145.715908L134.982630 151.267981L132.821115 156.898919
+L130.857434 162.601863L129.093979 168.369865L127.532898 174.195896
+L126.176095 180.072860L125.025220 185.993595L124.081678 191.950888
+L123.346616 197.937482L122.820932 203.946081L122.505265 209.969367
+L122.400000 216.000000L122.505265 222.030633L122.820932 228.053919
+L123.346616 234.062518L124.081678 240.049112L125.025220 246.006405
+L126.176095 251.927140L127.532898 257.804104L129.093979 263.630135
+L130.857434 269.398137L132.821115 275.101081L134.982630 280.732019
+L137.339345 286.284092L139.888389 291.750534L142.626656 297.124686
+L145.550810 302.400000L148.657289 307.570049L151.942307 312.628534
+L155.401863 317.569292L159.031742 322.386303L162.827520 327.073699
+L166.784574 331.625769L170.898083 336.036966L175.163034 340.301917
+L179.574231 344.415426L184.126301 348.372480L188.813697 352.168258
+L193.630708 355.798137L198.571466 359.257693L203.629951 362.542711
+L208.800000 365.649190L214.075314 368.573344L219.449466 371.311611
+L224.915908 373.860655L230.467981 376.217370L236.098919 378.378885
+L241.801863 380.342566L247.569865 382.106021L253.395896 383.667102
+L259.272860 385.023905L265.193595 386.174780L271.150888 387.118322
+L277.137482 387.853384L283.146081 388.379068L289.169367 388.694735
+L295.200000 388.800000L301.230633 388.694735L307.253919 388.379068
+L313.262518 387.853384L319.249112 387.118322L325.206405 386.174780
+L331.127140 385.023905L337.004104 383.667102L342.830135 382.106021
+L348.598137 380.342566L354.301081 378.378885L359.932019 376.217370
+L365.484092 373.860655L370.950534 371.311611L376.324686 368.573344
+L381.600000 365.649190L386.770049 362.542711L391.828534 359.257693
+L396.769292 355.798137L401.586303 352.168258L406.273699 348.372480
+L410.825769 344.415426L415.236966 340.301917L419.501917 336.036966
+L423.615426 331.625769L427.572480 327.073699L431.368258 322.386303
+L434.998137 317.569292L438.457693 312.628534L441.742711 307.570049
+L444.849190 302.400000L447.773344 297.124686L450.511611 291.750534
+L453.060655 286.284092L455.417370 280.732019L457.578885 275.101081
+L459.542566 269.398137L461.306021 263.630135L462.867102 257.804104
+L464.223905 251.927140L465.374780 246.006405L466.318322 240.049112
+L467.053384 234.062518L467.579068 228.053919L467.894735 222.030633
+L468.000000 216.000000L468.000000 216.000000"/>
</g>
<g id="text13">
<g style="fill: #000000; opacity: 1.000000" transform="translate(454.336515,150.933106)scale(0.120000)">
@@ -430,9 +580,9 @@
C205.416598 370.592702 249.372904 388.800000 295.200000 388.800000z"/>
</g>
<g id="patch4">
-<path style="fill: #000000; stroke: #000000; stroke-width: 1.000000; stroke-linejoin: round; stroke-linecap: square; opacity: 1.000000" d="M138.076545 392.877319L141.723354 394.520725L178.780037 312.289876
-L182.426846 313.933281L181.074041 302.331412L171.486418 309.003064
-L175.133227 310.646470L138.076545 392.877319"/>
+<path style="fill: #000000; stroke: #000000; stroke-width: 1.000000; stroke-linejoin: round; stroke-linecap: square; opacity: 1.000000" d="M138.069192 395.268834L141.730707 396.879210L178.787389 312.623361
+L182.448904 314.233736L181.074041 302.456412L171.464360 309.402609
+L175.125875 311.012985L138.069192 395.268834"/>
</g>
<g id="text14">
<defs>
@@ -446,7 +596,7 @@
<path id="c_0f8c41144cfbf448378cb6fd1cc8e549" d="M18.312500 -70.218750l0.000000 15.531250l18.500000 0.000000l0.000000 6.984375l-18.500000 0.000000l0.000000 29.687500q0.000000 6.687500 1.828125 8.593750q1.828125 1.906250 7.453125 1.906250l9.218750 0.000000l0.000000 7.515625l-9.218750 0.000000q-10.406250 0.000000 -14.359375 -3.875000q-3.953125 -3.890625 -3.953125 -14.140625l0.000000 -29.687500l-6.593750 0.000000l0.000000 -6.984375l6.593750 0.000000l0.000000 -15.531250z"/>
<path id="c_6a63bda47b2f3da1cec6aadd80692cfe" d="M9.421875 -54.687500l8.984375 0.000000l0.000000 54.687500l-8.984375 0.000000zM9.421875 -75.984375l8.984375 0.000000l0.000000 11.390625l-8.984375 0.000000z"/>
</defs>
-<g style="fill: #000000; opacity: 1.000000" transform="translate(28.800000,407.900000)scale(0.120000)">
+<g style="fill: #000000; opacity: 1.000000" transform="translate(28.800000,410.400000)scale(0.120000)">
<use xlink:href="#c_01d93a582460e35a7945ca50d148ffeb"/>
<use xlink:href="#c_d41d8cd98f00b204e9800998ecf8427e" x="61.279297"/>
<use xlink:href="#c_f15a64fcd463ef4629c48bab42cde24c" x="93.066406"/>
Modified: trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext.pdf
===================================================================
--- trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext.pdf 2010-05-20 16:33:38 UTC (rev 8329)
+++ trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_mathtext/mathtext.pdf 2010-05-20 17:22:54 UTC (rev 8330)
@@ -16,53 +16,51 @@
<< /Filter /FlateDecode /Length 11 0 R >>
stream
x\x9C\xED\y\xAFG\xB1\xFF\xFF~\x8A\xC3&\xAE\x9DI\xEFKދ\x84$\xC0?0\xE0 rb;ر/AJ@\xE2\xBB$\xECH,\x81\x80X\x9C\xC0>ث\x9A\xAE\xEE\xA9\xEE\xE9\x9Esν~z\x80\x82l\xCF\xE9\xA9\xE5WK\xB7\xDC\xDD9S\xBB/\xEC\xE4\xEEU\xF8\xEF\xC53\xB1\xBB{;\xED\xF0ϻ\xF3\x9FJe\x81_\xCE>
-#\xBF |
|
From: <md...@us...> - 2010-05-20 16:33:44
|
Revision: 8329
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8329&view=rev
Author: mdboom
Date: 2010-05-20 16:33:38 +0000 (Thu, 20 May 2010)
Log Message:
-----------
Fix font manager bug.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/font_manager.py
Modified: trunk/matplotlib/lib/matplotlib/font_manager.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/font_manager.py 2010-05-20 16:19:53 UTC (rev 8328)
+++ trunk/matplotlib/lib/matplotlib/font_manager.py 2010-05-20 16:33:38 UTC (rev 8329)
@@ -1070,7 +1070,7 @@
family1 = family1.lower()
if family1 in font_family_aliases:
if family1 in ('sans', 'sans serif'):
- family1 == 'sans-serif'
+ family1 = 'sans-serif'
options = rcParams['font.' + family1]
options = [x.lower() for x in options]
if family2 in options:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2010-05-20 16:20:00
|
Revision: 8328
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8328&view=rev
Author: mdboom
Date: 2010-05-20 16:19:53 +0000 (Thu, 20 May 2010)
Log Message:
-----------
Fix bug in symlog with 0-values in data. (Thanks Christer)
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/tests/test_axes.py
trunk/matplotlib/lib/matplotlib/ticker.py
Added Paths:
-----------
trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/symlog.pdf
trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/symlog.png
trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/symlog.svg
Added: trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/symlog.pdf
===================================================================
(Binary files differ)
Property changes on: trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/symlog.pdf
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/symlog.png
===================================================================
(Binary files differ)
Property changes on: trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/symlog.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/symlog.svg
===================================================================
--- trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/symlog.svg (rev 0)
+++ trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/symlog.svg 2010-05-20 16:19:53 UTC (rev 8328)
@@ -0,0 +1,521 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!-- Created with matplotlib (http://matplotlib.sourceforge.net/) -->
+<svg width="576pt" height="432pt" viewBox="0 0 576 432"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ version="1.1"
+ id="svg1">
+<filter id="colorAdd"><feComposite in="SourceGraphic" in2="BackgroundImage" operator="arithmetic" k2="1" k3="1"/></filter>
+<g id="figure1">
+<g id="patch1">
+<path style="fill: #ffffff; stroke: #ffffff; stroke-width: 1.000000; stroke-linejoin: round; stroke-linecap: square; opacity: 1.000000" d="M0.000000 432.000000L576.000000 432.000000L576.000000 0.000000
+L0.000000 0.000000L0.000000 432.000000"/>
+</g>
+<g id="axes1">
+<g id="patch2">
+<path style="fill: #ffffff; opacity: 1.000000" d="M72.000000 388.800000L518.400000 388.800000L518.400000 43.200000
+L72.000000 43.200000L72.000000 388.800000"/>
+</g>
+<g id="line2d1">
+<defs>
+ <clipPath id="p50431ccdcb28178602d99d9270004dde">
+<rect x="72.000000" y="43.200000" width="446.400000" height="345.600000"/>
+ </clipPath>
+</defs><path style="fill: none; stroke: #0000ff; stroke-width: 1.000000; stroke-linejoin: round; stroke-linecap: square; opacity: 1.000000" clip-path="url(#p50431ccdcb28178602d99d9270004dde)" d="M72.000000 91.532183L89.856000 106.081620L107.712000 139.864366
+L143.424000 284.860915L179.136000 347.742535L232.704000 381.525282
+L286.272000 381.525282L500.544000 381.525282"/>
+</g>
+<g id="matplotlib.axis1">
+<g id="xtick1">
+<g id="line2d2">
+<defs><path id="m30e32995789d870ad79a2e54c91cf9c6" d="M0.000000 0.000000L0.000000 -4.000000"/></defs>
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m30e32995789d870ad79a2e54c91cf9c6" x="72.000000" y="388.800000"/>
+</g></g>
+<g id="line2d3">
+<defs><path id="m9281cae24120827b11d5ea8a7ad3e96b" d="M0.000000 0.000000L0.000000 4.000000"/></defs>
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m9281cae24120827b11d5ea8a7ad3e96b" x="72.000000" y="43.200000"/>
+</g></g>
+<g id="text1">
+<defs>
+<path id="c_7a2040fe3b94fcd41d0a72c84e93b115" d="M31.781250 -66.406250q-7.609375 0.000000 -11.453125 7.500000q-3.828125 7.484375 -3.828125 22.531250q0.000000 14.984375 3.828125 22.484375q3.843750 7.500000 11.453125 7.500000q7.671875 0.000000 11.500000 -7.500000q3.843750 -7.500000 3.843750 -22.484375q0.000000 -15.046875 -3.843750 -22.531250q-3.828125 -7.500000 -11.500000 -7.500000M31.781250 -74.218750q12.265625 0.000000 18.734375 9.703125q6.468750 9.687500 6.468750 28.140625q0.000000 18.406250 -6.468750 28.109375q-6.468750 9.687500 -18.734375 9.687500q-12.250000 0.000000 -18.718750 -9.687500q-6.468750 -9.703125 -6.468750 -28.109375q0.000000 -18.453125 6.468750 -28.140625q6.468750 -9.703125 18.718750 -9.703125"/>
+</defs>
+<g style="fill: #000000; opacity: 1.000000" transform="translate(68.976562,401.706250)scale(0.120000)">
+<use xlink:href="#c_7a2040fe3b94fcd41d0a72c84e93b115"/>
+</g>
+</g>
+</g>
+<g id="xtick2">
+<g id="line2d4">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m30e32995789d870ad79a2e54c91cf9c6" x="161.280000" y="388.800000"/>
+</g></g>
+<g id="line2d5">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m9281cae24120827b11d5ea8a7ad3e96b" x="161.280000" y="43.200000"/>
+</g></g>
+<g id="text2">
+<defs>
+<path id="c_1260a2df50f305f3db244e29828f968e" d="M10.796875 -72.906250l38.718750 0.000000l0.000000 8.312500l-29.687500 0.000000l0.000000 17.859375q2.140625 -0.734375 4.281250 -1.093750q2.156250 -0.359375 4.312500 -0.359375q12.203125 0.000000 19.328125 6.687500q7.140625 6.687500 7.140625 18.109375q0.000000 11.765625 -7.328125 18.296875q-7.328125 6.515625 -20.656250 6.515625q-4.593750 0.000000 -9.359375 -0.781250q-4.750000 -0.781250 -9.828125 -2.343750l0.000000 -9.921875q4.390625 2.390625 9.078125 3.562500q4.687500 1.171875 9.906250 1.171875q8.453125 0.000000 13.375000 -4.437500q4.937500 -4.437500 4.937500 -12.062500q0.000000 -7.609375 -4.937500 -12.046875q-4.921875 -4.453125 -13.375000 -4.453125q-3.953125 0.000000 -7.890625 0.875000q-3.921875 0.875000 -8.015625 2.734375z"/>
+</defs>
+<g style="fill: #000000; opacity: 1.000000" transform="translate(158.444062,401.550000)scale(0.120000)">
+<use xlink:href="#c_1260a2df50f305f3db244e29828f968e"/>
+</g>
+</g>
+</g>
+<g id="xtick3">
+<g id="line2d6">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m30e32995789d870ad79a2e54c91cf9c6" x="250.560000" y="388.800000"/>
+</g></g>
+<g id="line2d7">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m9281cae24120827b11d5ea8a7ad3e96b" x="250.560000" y="43.200000"/>
+</g></g>
+<g id="text3">
+<defs>
+<path id="c_42baa63129a918535c52adb20d687ea7" d="M12.406250 -8.296875l16.109375 0.000000l0.000000 -55.625000l-17.531250 3.515625l0.000000 -8.984375l17.437500 -3.515625l9.859375 0.000000l0.000000 64.609375l16.109375 0.000000l0.000000 8.296875l-41.984375 0.000000z"/>
+</defs>
+<g style="fill: #000000; opacity: 1.000000" transform="translate(243.974062,401.706250)scale(0.120000)">
+<use xlink:href="#c_42baa63129a918535c52adb20d687ea7"/>
+<use xlink:href="#c_7a2040fe3b94fcd41d0a72c84e93b115" x="63.623047"/>
+</g>
+</g>
+</g>
+<g id="xtick4">
+<g id="line2d8">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m30e32995789d870ad79a2e54c91cf9c6" x="339.840000" y="388.800000"/>
+</g></g>
+<g id="line2d9">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m9281cae24120827b11d5ea8a7ad3e96b" x="339.840000" y="43.200000"/>
+</g></g>
+<g id="text4">
+<g style="fill: #000000; opacity: 1.000000" transform="translate(333.379062,401.550000)scale(0.120000)">
+<use xlink:href="#c_42baa63129a918535c52adb20d687ea7"/>
+<use xlink:href="#c_1260a2df50f305f3db244e29828f968e" x="63.623047"/>
+</g>
+</g>
+</g>
+<g id="xtick5">
+<g id="line2d10">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m30e32995789d870ad79a2e54c91cf9c6" x="429.120000" y="388.800000"/>
+</g></g>
+<g id="line2d11">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m9281cae24120827b11d5ea8a7ad3e96b" x="429.120000" y="43.200000"/>
+</g></g>
+<g id="text5">
+<defs>
+<path id="c_ed3f3ed3ebfbd18bcb9c012009a68ad1" d="M19.187500 -8.296875l34.421875 0.000000l0.000000 8.296875l-46.281250 0.000000l0.000000 -8.296875q5.609375 -5.812500 15.296875 -15.593750q9.703125 -9.796875 12.187500 -12.640625q4.734375 -5.312500 6.609375 -9.000000q1.890625 -3.687500 1.890625 -7.250000q0.000000 -5.812500 -4.078125 -9.468750q-4.078125 -3.671875 -10.625000 -3.671875q-4.640625 0.000000 -9.796875 1.609375q-5.140625 1.609375 -11.000000 4.890625l0.000000 -9.968750q5.953125 -2.390625 11.125000 -3.609375q5.187500 -1.218750 9.484375 -1.218750q11.328125 0.000000 18.062500 5.671875q6.734375 5.656250 6.734375 15.125000q0.000000 4.500000 -1.687500 8.531250q-1.671875 4.015625 -6.125000 9.484375q-1.218750 1.421875 -7.765625 8.187500q-6.531250 6.765625 -18.453125 18.921875"/>
+</defs>
+<g style="fill: #000000; opacity: 1.000000" transform="translate(422.315312,401.706250)scale(0.120000)">
+<use xlink:href="#c_ed3f3ed3ebfbd18bcb9c012009a68ad1"/>
+<use xlink:href="#c_7a2040fe3b94fcd41d0a72c84e93b115" x="63.623047"/>
+</g>
+</g>
+</g>
+<g id="xtick6">
+<g id="line2d12">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m30e32995789d870ad79a2e54c91cf9c6" x="518.400000" y="388.800000"/>
+</g></g>
+<g id="line2d13">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m9281cae24120827b11d5ea8a7ad3e96b" x="518.400000" y="43.200000"/>
+</g></g>
+<g id="text6">
+<g style="fill: #000000; opacity: 1.000000" transform="translate(511.720312,401.706250)scale(0.120000)">
+<use xlink:href="#c_ed3f3ed3ebfbd18bcb9c012009a68ad1"/>
+<use xlink:href="#c_1260a2df50f305f3db244e29828f968e" x="63.623047"/>
+</g>
+</g>
+</g>
+</g>
+<g id="matplotlib.axis2">
+<g id="ytick1">
+<g id="line2d14">
+<defs><path id="m3400efa6b1638b3fea9e19e898273957" d="M0.000000 0.000000L4.000000 0.000000"/></defs>
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m3400efa6b1638b3fea9e19e898273957" x="72.000000" y="381.525282"/>
+</g></g>
+<g id="line2d15">
+<defs><path id="m20b58b2501143cb5e0a5e8f1ef6f1643" d="M0.000000 0.000000L-4.000000 0.000000"/></defs>
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m20b58b2501143cb5e0a5e8f1ef6f1643" x="518.400000" y="381.525282"/>
+</g></g>
+<g id="text7">
+<defs>
+<path id="c_f47f2818876b2f1a61c47f270461e46e" d="M25.000000 2.203125q-12.250000 0.000000 -16.671875 -10.078125q-4.421875 -10.093750 -4.421875 -24.015625q0.000000 -8.687500 1.578125 -16.343750q1.593750 -7.671875 6.296875 -13.015625q4.718750 -5.359375 13.218750 -5.359375q6.593750 0.000000 10.781250 3.234375q4.203125 3.218750 6.406250 8.328125q2.203125 5.093750 3.000000 10.937500q0.812500 5.828125 0.812500 12.218750q0.000000 8.593750 -1.593750 16.093750q-1.578125 7.500000 -6.218750 12.750000q-4.640625 5.250000 -13.187500 5.250000M25.000000 -0.390625q5.562500 0.000000 8.296875 -5.703125q2.734375 -5.718750 3.375000 -12.656250q0.640625 -6.937500 0.640625 -14.750000q0.000000 -7.515625 -0.640625 -13.859375q-0.640625 -6.359375 -3.359375 -11.500000q-2.703125 -5.156250 -8.312500 -5.156250q-5.656250 0.000000 -8.390625 5.187500q-2.734375 5.171875 -3.375000 11.500000q-0.640625 6.312500 -0.640625 13.828125q0.000000 5.562500 0.265625 10.500000q0.281250 4.937500 1.453125 10.187500q1.171875 5.250000 3.781250 8.843750q2.609375 3.578125 6.906250 3.578125"/>
+</defs>
+<g id="mathtext1">
+<g style="fill: #000000" transform="translate(62.000000,386.025282)">
+<use xlink:href="#c_f47f2818876b2f1a61c47f270461e46e" transform="translate(0.000000,-1.000000)scale(0.120000)"/>
+</g>
+</g>
+</g>
+</g>
+<g id="ytick2">
+<g id="line2d16">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m3400efa6b1638b3fea9e19e898273957" x="72.000000" y="333.193098"/>
+</g></g>
+<g id="line2d17">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m20b58b2501143cb5e0a5e8f1ef6f1643" x="518.400000" y="333.193098"/>
+</g></g>
+<g id="text8">
+<g id="mathtext2">
+<g style="fill: #000000" transform="translate(44.000000,340.193098)">
+<use xlink:href="#c_42baa63129a918535c52adb20d687ea7" transform="translate(0.000000,-1.575000)scale(0.120000)"/>
+<use xlink:href="#c_7a2040fe3b94fcd41d0a72c84e93b115" transform="translate(7.634766,-1.575000)scale(0.120000)"/>
+<use xlink:href="#c_42baa63129a918535c52adb20d687ea7" transform="translate(15.269531,-7.875000)scale(0.084000)"/>
+</g>
+</g>
+</g>
+</g>
+<g id="ytick3">
+<g id="line2d18">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m3400efa6b1638b3fea9e19e898273957" x="72.000000" y="284.860915"/>
+</g></g>
+<g id="line2d19">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m20b58b2501143cb5e0a5e8f1ef6f1643" x="518.400000" y="284.860915"/>
+</g></g>
+<g id="text9">
+<g id="mathtext3">
+<g style="fill: #000000" transform="translate(44.000000,291.860915)">
+<use xlink:href="#c_42baa63129a918535c52adb20d687ea7" transform="translate(0.000000,-1.465625)scale(0.120000)"/>
+<use xlink:href="#c_7a2040fe3b94fcd41d0a72c84e93b115" transform="translate(7.634766,-1.465625)scale(0.120000)"/>
+<use xlink:href="#c_ed3f3ed3ebfbd18bcb9c012009a68ad1" transform="translate(15.269531,-7.765625)scale(0.084000)"/>
+</g>
+</g>
+</g>
+</g>
+<g id="ytick4">
+<g id="line2d20">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m3400efa6b1638b3fea9e19e898273957" x="72.000000" y="236.528732"/>
+</g></g>
+<g id="line2d21">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m20b58b2501143cb5e0a5e8f1ef6f1643" x="518.400000" y="236.528732"/>
+</g></g>
+<g id="text10">
+<defs>
+<path id="c_3dcfa38a02242cb63ec6726c6e70be7a" d="M40.578125 -39.312500q7.078125 1.515625 11.046875 6.312500q3.984375 4.781250 3.984375 11.812500q0.000000 10.781250 -7.421875 16.703125q-7.421875 5.906250 -21.093750 5.906250q-4.578125 0.000000 -9.437500 -0.906250q-4.859375 -0.906250 -10.031250 -2.718750l0.000000 -9.515625q4.093750 2.390625 8.968750 3.609375q4.890625 1.218750 10.218750 1.218750q9.265625 0.000000 14.125000 -3.656250q4.859375 -3.656250 4.859375 -10.640625q0.000000 -6.453125 -4.515625 -10.078125q-4.515625 -3.640625 -12.562500 -3.640625l-8.500000 0.000000l0.000000 -8.109375l8.890625 0.000000q7.265625 0.000000 11.125000 -2.906250q3.859375 -2.906250 3.859375 -8.375000q0.000000 -5.609375 -3.984375 -8.609375q-3.968750 -3.015625 -11.390625 -3.015625q-4.062500 0.000000 -8.703125 0.890625q-4.640625 0.875000 -10.203125 2.718750l0.000000 -8.781250q5.625000 -1.562500 10.531250 -2.343750q4.906250 -0.781250 9.250000 -0.781250q11.234375 0.000000 17.765625 5.109375q6.546875 5.093750 6.546875 13.781250q0.000000 6.062500 -3.468750 10.234375q-3.468750 4.171875 -9.859375 5.781250"/>
+</defs>
+<g id="mathtext4">
+<g style="fill: #000000" transform="translate(44.000000,243.528732)">
+<use xlink:href="#c_42baa63129a918535c52adb20d687ea7" transform="translate(0.000000,-1.465625)scale(0.120000)"/>
+<use xlink:href="#c_7a2040fe3b94fcd41d0a72c84e93b115" transform="translate(7.634766,-1.465625)scale(0.120000)"/>
+<use xlink:href="#c_3dcfa38a02242cb63ec6726c6e70be7a" transform="translate(15.269531,-7.765625)scale(0.084000)"/>
+</g>
+</g>
+</g>
+</g>
+<g id="ytick5">
+<g id="line2d22">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m3400efa6b1638b3fea9e19e898273957" x="72.000000" y="188.196549"/>
+</g></g>
+<g id="line2d23">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m20b58b2501143cb5e0a5e8f1ef6f1643" x="518.400000" y="188.196549"/>
+</g></g>
+<g id="text11">
+<defs>
+<path id="c_a0416418d96557a09b8c1332d34883ba" d="M37.796875 -64.312500l-24.906250 38.921875l24.906250 0.000000zM35.203125 -72.906250l12.406250 0.000000l0.000000 47.515625l10.406250 0.000000l0.000000 8.203125l-10.406250 0.000000l0.000000 17.187500l-9.812500 0.000000l0.000000 -17.187500l-32.906250 0.000000l0.000000 -9.515625z"/>
+</defs>
+<g id="mathtext5">
+<g style="fill: #000000" transform="translate(44.000000,195.196549)">
+<use xlink:href="#c_42baa63129a918535c52adb20d687ea7" transform="translate(0.000000,-1.575000)scale(0.120000)"/>
+<use xlink:href="#c_7a2040fe3b94fcd41d0a72c84e93b115" transform="translate(7.634766,-1.575000)scale(0.120000)"/>
+<use xlink:href="#c_a0416418d96557a09b8c1332d34883ba" transform="translate(15.269531,-7.875000)scale(0.084000)"/>
+</g>
+</g>
+</g>
+</g>
+<g id="ytick6">
+<g id="line2d24">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m3400efa6b1638b3fea9e19e898273957" x="72.000000" y="139.864366"/>
+</g></g>
+<g id="line2d25">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m20b58b2501143cb5e0a5e8f1ef6f1643" x="518.400000" y="139.864366"/>
+</g></g>
+<g id="text12">
+<g id="mathtext6">
+<g style="fill: #000000" transform="translate(44.000000,146.864366)">
+<use xlink:href="#c_42baa63129a918535c52adb20d687ea7" transform="translate(0.000000,-1.575000)scale(0.120000)"/>
+<use xlink:href="#c_7a2040fe3b94fcd41d0a72c84e93b115" transform="translate(7.634766,-1.575000)scale(0.120000)"/>
+<use xlink:href="#c_1260a2df50f305f3db244e29828f968e" transform="translate(15.269531,-7.875000)scale(0.084000)"/>
+</g>
+</g>
+</g>
+</g>
+<g id="ytick7">
+<g id="line2d26">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m3400efa6b1638b3fea9e19e898273957" x="72.000000" y="91.532183"/>
+</g></g>
+<g id="line2d27">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m20b58b2501143cb5e0a5e8f1ef6f1643" x="518.400000" y="91.532183"/>
+</g></g>
+<g id="text13">
+<defs>
+<path id="c_cc8d6d580d1b10c8632f7a42cd53db8a" d="M33.015625 -40.375000q-6.640625 0.000000 -10.531250 4.546875q-3.875000 4.531250 -3.875000 12.437500q0.000000 7.859375 3.875000 12.437500q3.890625 4.562500 10.531250 4.562500q6.640625 0.000000 10.515625 -4.562500q3.875000 -4.578125 3.875000 -12.437500q0.000000 -7.906250 -3.875000 -12.437500q-3.875000 -4.546875 -10.515625 -4.546875M52.593750 -71.296875l0.000000 8.984375q-3.718750 -1.750000 -7.500000 -2.671875q-3.781250 -0.937500 -7.500000 -0.937500q-9.765625 0.000000 -14.921875 6.593750q-5.140625 6.593750 -5.875000 19.921875q2.875000 -4.250000 7.218750 -6.515625q4.359375 -2.265625 9.578125 -2.265625q10.984375 0.000000 17.359375 6.671875q6.375000 6.656250 6.375000 18.125000q0.000000 11.234375 -6.640625 18.031250q-6.640625 6.781250 -17.671875 6.781250q-12.656250 0.000000 -19.343750 -9.687500q-6.687500 -9.703125 -6.687500 -28.109375q0.000000 -17.281250 8.203125 -27.562500q8.203125 -10.281250 22.015625 -10.281250q3.718750 0.000000 7.500000 0.734375q3.781250 0.734375 7.890625 2.187500"/>
+</defs>
+<g id="mathtext7">
+<g style="fill: #000000" transform="translate(44.000000,98.532183)">
+<use xlink:href="#c_42baa63129a918535c52adb20d687ea7" transform="translate(0.000000,-1.465625)scale(0.120000)"/>
+<use xlink:href="#c_7a2040fe3b94fcd41d0a72c84e93b115" transform="translate(7.634766,-1.465625)scale(0.120000)"/>
+<use xlink:href="#c_cc8d6d580d1b10c8632f7a42cd53db8a" transform="translate(15.269531,-7.765625)scale(0.084000)"/>
+</g>
+</g>
+</g>
+</g>
+<g id="ytick8">
+<g id="line2d28">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m3400efa6b1638b3fea9e19e898273957" x="72.000000" y="43.200000"/>
+</g></g>
+<g id="line2d29">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m20b58b2501143cb5e0a5e8f1ef6f1643" x="518.400000" y="43.200000"/>
+</g></g>
+<g id="text14">
+<defs>
+<path id="c_956f18cfdaf972f35a6c2b4aaac2532b" d="M8.203125 -72.906250l46.875000 0.000000l0.000000 4.203125l-26.468750 68.703125l-10.296875 0.000000l24.906250 -64.593750l-35.015625 0.000000z"/>
+</defs>
+<g id="mathtext8">
+<g style="fill: #000000" transform="translate(44.000000,50.200000)">
+<use xlink:href="#c_42baa63129a918535c52adb20d687ea7" transform="translate(0.000000,-1.575000)scale(0.120000)"/>
+<use xlink:href="#c_7a2040fe3b94fcd41d0a72c84e93b115" transform="translate(7.634766,-1.575000)scale(0.120000)"/>
+<use xlink:href="#c_956f18cfdaf972f35a6c2b4aaac2532b" transform="translate(15.269531,-7.875000)scale(0.084000)"/>
+</g>
+</g>
+</g>
+</g>
+<g id="ytick9">
+<g id="line2d30">
+<defs><path id="mb39cfcf7402899e54c4d755745537394" d="M0.000000 0.000000L2.000000 0.000000"/></defs>
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="381.525282"/>
+</g></g>
+<g id="line2d31">
+<defs><path id="m6046ccd8b6d57b9fb587e3fdd930e9c5" d="M0.000000 0.000000L-2.000000 0.000000"/></defs>
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="381.525282"/>
+</g></g>
+</g>
+<g id="ytick10">
+<g id="line2d32">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="381.525282"/>
+</g></g>
+<g id="line2d33">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="381.525282"/>
+</g></g>
+</g>
+<g id="ytick11">
+<g id="line2d34">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="381.525282"/>
+</g></g>
+<g id="line2d35">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="381.525282"/>
+</g></g>
+</g>
+<g id="ytick12">
+<g id="line2d36">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="381.525282"/>
+</g></g>
+<g id="line2d37">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="381.525282"/>
+</g></g>
+</g>
+<g id="ytick13">
+<g id="line2d38">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="318.643662"/>
+</g></g>
+<g id="line2d39">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="318.643662"/>
+</g></g>
+</g>
+<g id="ytick14">
+<g id="line2d40">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="304.094225"/>
+</g></g>
+<g id="line2d41">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="304.094225"/>
+</g></g>
+</g>
+<g id="ytick15">
+<g id="line2d42">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="295.583350"/>
+</g></g>
+<g id="line2d43">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="295.583350"/>
+</g></g>
+</g>
+<g id="ytick16">
+<g id="line2d44">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="289.544788"/>
+</g></g>
+<g id="line2d45">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="289.544788"/>
+</g></g>
+</g>
+<g id="ytick17">
+<g id="line2d46">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="270.311479"/>
+</g></g>
+<g id="line2d47">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="270.311479"/>
+</g></g>
+</g>
+<g id="ytick18">
+<g id="line2d48">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="255.762042"/>
+</g></g>
+<g id="line2d49">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="255.762042"/>
+</g></g>
+</g>
+<g id="ytick19">
+<g id="line2d50">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="247.251167"/>
+</g></g>
+<g id="line2d51">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="247.251167"/>
+</g></g>
+</g>
+<g id="ytick20">
+<g id="line2d52">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="241.212605"/>
+</g></g>
+<g id="line2d53">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="241.212605"/>
+</g></g>
+</g>
+<g id="ytick21">
+<g id="line2d54">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="221.979295"/>
+</g></g>
+<g id="line2d55">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="221.979295"/>
+</g></g>
+</g>
+<g id="ytick22">
+<g id="line2d56">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="207.429859"/>
+</g></g>
+<g id="line2d57">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="207.429859"/>
+</g></g>
+</g>
+<g id="ytick23">
+<g id="line2d58">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="198.918984"/>
+</g></g>
+<g id="line2d59">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="198.918984"/>
+</g></g>
+</g>
+<g id="ytick24">
+<g id="line2d60">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="192.880422"/>
+</g></g>
+<g id="line2d61">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="192.880422"/>
+</g></g>
+</g>
+<g id="ytick25">
+<g id="line2d62">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="173.647112"/>
+</g></g>
+<g id="line2d63">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="173.647112"/>
+</g></g>
+</g>
+<g id="ytick26">
+<g id="line2d64">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="159.097676"/>
+</g></g>
+<g id="line2d65">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="159.097676"/>
+</g></g>
+</g>
+<g id="ytick27">
+<g id="line2d66">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="150.586801"/>
+</g></g>
+<g id="line2d67">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="150.586801"/>
+</g></g>
+</g>
+<g id="ytick28">
+<g id="line2d68">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="144.548239"/>
+</g></g>
+<g id="line2d69">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="144.548239"/>
+</g></g>
+</g>
+<g id="ytick29">
+<g id="line2d70">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="125.314929"/>
+</g></g>
+<g id="line2d71">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="125.314929"/>
+</g></g>
+</g>
+<g id="ytick30">
+<g id="line2d72">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="110.765492"/>
+</g></g>
+<g id="line2d73">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="110.765492"/>
+</g></g>
+</g>
+<g id="ytick31">
+<g id="line2d74">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="102.254617"/>
+</g></g>
+<g id="line2d75">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="102.254617"/>
+</g></g>
+</g>
+<g id="ytick32">
+<g id="line2d76">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="96.216056"/>
+</g></g>
+<g id="line2d77">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="96.216056"/>
+</g></g>
+</g>
+<g id="ytick33">
+<g id="line2d78">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="76.982746"/>
+</g></g>
+<g id="line2d79">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="76.982746"/>
+</g></g>
+</g>
+<g id="ytick34">
+<g id="line2d80">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="62.433309"/>
+</g></g>
+<g id="line2d81">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="62.433309"/>
+</g></g>
+</g>
+<g id="ytick35">
+<g id="line2d82">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="53.922434"/>
+</g></g>
+<g id="line2d83">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="53.922434"/>
+</g></g>
+</g>
+<g id="ytick36">
+<g id="line2d84">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#mb39cfcf7402899e54c4d755745537394" x="72.000000" y="47.883872"/>
+</g></g>
+<g id="line2d85">
+<g ><use style="fill: none; stroke: #000000; stroke-width: 0.500000; stroke-linejoin: round; stroke-linecap: butt; opacity: 1.000000" xlink:href="#m6046ccd8b6d57b9fb587e3fdd930e9c5" x="518.400000" y="47.883872"/>
+</g></g>
+</g>
+</g>
+<g id="patch3">
+<path style="fill: none; stroke: #000000; stroke-width: 1.000000; stroke-linejoin: round; stroke-linecap: square; opacity: 1.000000" d="M72.000000 43.200000L518.400000 43.200000"/>
+</g>
+<g id="patch4">
+<path style="fill: none; stroke: #000000; stroke-width: 1.000000; stroke-linejoin: round; stroke-linecap: square; opacity: 1.000000" d="M518.400000 388.800000L518.400000 43.200000"/>
+</g>
+<g id="patch5">
+<path style="fill: none; stroke: #000000; stroke-width: 1.000000; stroke-linejoin: round; stroke-linecap: square; opacity: 1.000000" d="M72.000000 388.800000L518.400000 388.800000"/>
+</g>
+<g id="patch6">
+<path style="fill: none; stroke: #000000; stroke-width: 1.000000; stroke-linejoin: round; stroke-linecap: square; opacity: 1.000000" d="M72.000000 388.800000L72.000000 43.200000"/>
+</g>
+</g>
+</g>
+</svg>
Modified: trunk/matplotlib/lib/matplotlib/tests/test_axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/tests/test_axes.py 2010-05-20 14:59:33 UTC (rev 8327)
+++ trunk/matplotlib/lib/matplotlib/tests/test_axes.py 2010-05-20 16:19:53 UTC (rev 8328)
@@ -445,7 +445,21 @@
ax1.fill_between(x, y1, y2, where=y2<=y1, facecolor='red', interpolate=True)
fig.savefig('fill_between_interpolate')
-
+
+@image_comparison(baseline_images=['symlog'])
+def test_symlog():
+ x = np.array([0,1,2,4,6,9,12,24])
+ y = np.array([1000000, 500000, 100000, 100, 5, 0, 0, 0])
+
+ fig = plt.figure()
+ ax = fig.add_subplot(111)
+ ax.plot(x, y)
+ ax.set_yscale('symlog')
+ ax.set_xscale=('linear')
+ ax.set_ylim(-1,10000000)
+
+ fig.savefig('symlog')
+
if __name__=='__main__':
import nose
nose.runmodule(argv=['-s','--with-doctest'], exit=False)
Modified: trunk/matplotlib/lib/matplotlib/ticker.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/ticker.py 2010-05-20 14:59:33 UTC (rev 8327)
+++ trunk/matplotlib/lib/matplotlib/ticker.py 2010-05-20 16:19:53 UTC (rev 8328)
@@ -1178,16 +1178,21 @@
def decade_down(x, base=10):
'floor x to the nearest lower decade'
-
+ if x == 0.0:
+ return -base
lx = math.floor(math.log(x)/math.log(base))
return base**lx
def decade_up(x, base=10):
'ceil x to the nearest higher decade'
+ if x == 0.0:
+ return base
lx = math.ceil(math.log(x)/math.log(base))
return base**lx
def is_decade(x,base=10):
+ if x == 0.0:
+ return True
lx = math.log(x)/math.log(base)
return lx==int(lx)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2010-05-20 14:59:40
|
Revision: 8327
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8327&view=rev
Author: mdboom
Date: 2010-05-20 14:59:33 +0000 (Thu, 20 May 2010)
Log Message:
-----------
Minor bug in accepting "sans serif" as a font family alias.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/font_manager.py
Modified: trunk/matplotlib/lib/matplotlib/font_manager.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/font_manager.py 2010-05-20 14:01:32 UTC (rev 8326)
+++ trunk/matplotlib/lib/matplotlib/font_manager.py 2010-05-20 14:59:33 UTC (rev 8327)
@@ -106,6 +106,7 @@
font_family_aliases = set([
'serif',
'sans-serif',
+ 'sans serif',
'cursive',
'fantasy',
'monospace',
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2010-05-20 14:01:39
|
Revision: 8326
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8326&view=rev
Author: mdboom
Date: 2010-05-20 14:01:32 +0000 (Thu, 20 May 2010)
Log Message:
-----------
Forgot to commit test images.
Added Paths:
-----------
trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_text/font_styles.pdf
trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_text/font_styles.png
trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_text/font_styles.svg
Added: trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_text/font_styles.pdf
===================================================================
--- trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_text/font_styles.pdf (rev 0)
+++ trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_text/font_styles.pdf 2010-05-20 14:01:32 UTC (rev 8326)
@@ -0,0 +1,680 @@
+%PDF-1.4
+%\xAC\xDC \xAB\xBA
+1 0 obj
+<< /Type /Catalog /Pages 2 0 R >>
+endobj
+8 0 obj
+<< /XObject 7 0 R /Pattern 5 0 R
+/ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] /ExtGState 4 0 R
+/Shading 6 0 R /Font 3 0 R >>
+endobj
+10 0 obj
+<< /Contents 9 0 R /Type /Page /Resources 8 0 R /Parent 2 0 R
+/MediaBox [ 0 0 576 432 ] >>
+endobj
+9 0 obj
+<< /Filter /FlateDecode /Length 11 0 R >>
+stream
+x\x9Cm\x8F\xC1n\xC20\x86\xEF~
+\xC7%\x8B\x9D4 \xD7N1!.\xE4\xD0
+\x94\xB6\xAB\xB4\xD7ǣ\xA8\xBAC\xF4\xDB\xFE\xFD\xD9\xE1\xBF\x90\xB0\x96\xB7\x8D,\xBCM7\xB5\x86%ңJJ\xE9\xFB\x95h \x9E\xC5P\xFC\xC7PPvH\xD2=1!\xA8 \x994=\x85C\x803\xBB\xC99\xD8\xC2\xD3Щ\xF9\xFF\xEE\xCCxl\x96\xB2\x96j\xAC\xA1\x8C\xF8\xBE $\x8BQ\x8E \xA7\x9CE\xEF\xD5\xDC\xE2co\x9B\xEE\xD2\xEC.\xBA\xB6\x9Fa<\xE3g \xCE!"V\x8FT٥jʘ\xC6z\xA5Cά\xFA]:}OQ\xFB\x82\xAB\x8Cuwr}\xAA\x8F\xFD\x94)r\x86EX\x8F\xEB>\xBA\xB6ڷ?\xFB\xFCN\xB8\xC2\xCEq\xD8
+endstream
+endobj
+11 0 obj
+222
+endobj
+16 0 obj
+<< /Filter /FlateDecode /Length 232 >>
+stream
+x\x9C5Q9\x921\xCB\xFB\xFA\xC0Ts\x99\xF7\xF4\xD4F\xBB\xFFO\xD13*\x84\x84c,\xF8\xC2K~\xD26\xDErF*\xFEy~/\xEF6\xAF\x82\xCBA\xEC
+;\x86Ѓ\xFB\xB2f\xC2&\xFD͘z_\xBAd\xD06\xF6:\xF6\xB2^c\xCDH4R\x854c\xB1\xA6j\xD3h\xC7;\xA4lfĴ\xAA\xD4ƈ\xE6\xB3%\xB9\x9Ekt\x916\xB6j\xF53}\xCArзtN&/2\x93\x89\x91\xEC@w'\xF2fzR@f\x81W뭚\xB3h\xCA\xD4\xDE\xFFARڮ 84\x90\xD5\xE3\x879\x83\xE5 Ҁ\x92\xCDz\x9F\x92\xDDa<
+\xC7sP\x8E\xF7\xD6Oe\x92\xE7\xCC\xD9\xFDv6r\xFBh\x92d\x85\xA8\xC0\xF7\x83\xEE\xEB\xE7X8T
+endstream
+endobj
+17 0 obj
+<< /Filter /FlateDecode /Length 243 >>
+stream
+x\x9CEQ\xBBmD1\xEB\xDF\ \x80\xF5\x97\xE7\xB9 \xD5e\xFF6\x94\x8D$iJ6)9±\xE0b\x88\x95\x88\\xF8\x94g\xA8\xEE\xC4\xF7e\xA1x?b\xFE\xC7
+\xB2\x84\xB7\xC5\xD2DYx=*\x8Ej\xB6%Ra\xD4\xAF\xC7\xFC+B\xC2\xD7B9eVx4v\xC0\x9B\xAF2u2myPr\xB8\xB6S\xB6$\xD90\xCB\xDBV\xA4\xBB^E\x92yK\xFA\xDA\xD7p\xE5|L*\x9AM\x99\xC4hPB\x83f\xC7D\xEA\xC2<a\x95:\xFB\xD0-\xE9W\xF1\xB5\xD9\xC1I\xBCyg\x9F\xC8s\x92\xB3C\xAB\xC2\xEFgȀ\xA9r\x95\xAE\xCEݘŹk\xDE\xF6\xF3.{\xCEH\xACp\x99\xBA/r$ϫ\xB0:\xA4\xED\xF8LJVfX\x9E\xAC\x88\xFC\x94\xF1\xF9w|?_?sY!
+endstream
+endobj
+18 0 obj
+<< /Filter /FlateDecode /Length 237 >>
+stream
+x\x9C5Q˭\xC30\xBB{
+.P\xC0\xB2$\xE6I\xF1N\xAF\xFB_K*
+\x83\x84%\x91\x94\x93\xCB\xD0/sBǚok\xD1b>\xC5t\xF9ߞ\xF2\xCD
+Y{p?&1_#\xE1\xB0\x8E\xAB\xB9m\xBCc\xAF\xF2i\x85W\xB3s3~}b&\xEF\xE7\x86\xD9Bv\xD8.K\xED$\x9E\xAC\xC6\xD8\xD5\xDB$\xC3\xF1t\xCES.g/\xE1\xD5d)\xA6\x99\xA3"\xA5Oeb\xC6\xACTd*\xFD6\xA6\x95\xE4\xF7\xB9Y_\x8C\x97\xB0\xE4\xE1\x8Cr)x`Ƙ\xC6nhQ\xF1X\xAA\xFA\xBFv\xA7\x81d"\xC1\xC2ZI̝\x87\xCEgՌ\x96\xE3Eb\xF2Vfg\x99\xB9\xEBb
+\xA1źgT*
+.\xD5g\x95\xAB\xFD}N>[6
+endstream
+endobj
+19 0 obj
+<< /Filter /FlateDecode /Length 76 >>
+stream
+x\x9C35\xB4P0P\xB0 |
|
From: <jd...@us...> - 2010-05-19 17:24:06
|
Revision: 8325
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8325&view=rev
Author: jdh2358
Date: 2010-05-19 17:24:00 +0000 (Wed, 19 May 2010)
Log Message:
-----------
added get_children offsetTex patch; closes sf 3001208
Modified Paths:
--------------
branches/v0_99_maint/lib/matplotlib/axis.py
Modified: branches/v0_99_maint/lib/matplotlib/axis.py
===================================================================
--- branches/v0_99_maint/lib/matplotlib/axis.py 2010-05-19 17:23:29 UTC (rev 8324)
+++ branches/v0_99_maint/lib/matplotlib/axis.py 2010-05-19 17:24:00 UTC (rev 8325)
@@ -591,7 +591,7 @@
return self._scale.limit_range_for_scale(vmin, vmax, self.get_minpos())
def get_children(self):
- children = [self.label]
+ children = [self.label, self.offsetText]
majorticks = self.get_major_ticks()
minorticks = self.get_minor_ticks()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2010-05-19 17:23:35
|
Revision: 8324
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8324&view=rev
Author: jdh2358
Date: 2010-05-19 17:23:29 +0000 (Wed, 19 May 2010)
Log Message:
-----------
added get_children offsetTex patch; closes sf 3001208
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/axis.py
Modified: trunk/matplotlib/lib/matplotlib/axis.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axis.py 2010-05-19 00:32:37 UTC (rev 8323)
+++ trunk/matplotlib/lib/matplotlib/axis.py 2010-05-19 17:23:29 UTC (rev 8324)
@@ -594,7 +594,7 @@
return self._scale.limit_range_for_scale(vmin, vmax, self.get_minpos())
def get_children(self):
- children = [self.label]
+ children = [self.label, self.offsetText]
majorticks = self.get_major_ticks()
minorticks = self.get_minor_ticks()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lee...@us...> - 2010-05-19 00:32:44
|
Revision: 8323
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8323&view=rev
Author: leejjoon
Date: 2010-05-19 00:32:37 +0000 (Wed, 19 May 2010)
Log Message:
-----------
gridspec supports grid of different cell sizes
Modified Paths:
--------------
trunk/matplotlib/doc/users/gridspec.rst
trunk/matplotlib/lib/matplotlib/gridspec.py
Added Paths:
-----------
trunk/matplotlib/doc/users/plotting/examples/demo_gridspec05.py
Modified: trunk/matplotlib/doc/users/gridspec.rst
===================================================================
--- trunk/matplotlib/doc/users/gridspec.rst 2010-05-19 00:32:31 UTC (rev 8322)
+++ trunk/matplotlib/doc/users/gridspec.rst 2010-05-19 00:32:37 UTC (rev 8323)
@@ -129,3 +129,23 @@
.. plot:: users/plotting/examples/demo_gridspec04.py
+GridSpec with Varying Cell Sizes
+================================
+
+By default, GridSpec creates cells of equal sizes. You can adjust
+relative heights and widths of rows and columns. Note that absolute
+values are meaningless, onlt their relative ratios matter. ::
+
+ gs = gridspec.GridSpec(2, 2,
+ width_ratios=[1,2],
+ height_ratios=[4,1]
+ )
+
+ ax1 = plt.subplot(gs[0])
+ ax2 = plt.subplot(gs[1])
+ ax3 = plt.subplot(gs[2])
+ ax4 = plt.subplot(gs[3])
+
+
+.. plot:: users/plotting/examples/demo_gridspec05.py
+
Added: trunk/matplotlib/doc/users/plotting/examples/demo_gridspec05.py
===================================================================
--- trunk/matplotlib/doc/users/plotting/examples/demo_gridspec05.py (rev 0)
+++ trunk/matplotlib/doc/users/plotting/examples/demo_gridspec05.py 2010-05-19 00:32:37 UTC (rev 8323)
@@ -0,0 +1,26 @@
+import matplotlib.pyplot as plt
+import matplotlib.gridspec as gridspec
+
+def make_ticklabels_invisible(fig):
+ for i, ax in enumerate(fig.axes):
+ ax.text(0.5, 0.5, "ax%d" % (i+1), va="center", ha="center")
+ for tl in ax.get_xticklabels() + ax.get_yticklabels():
+ tl.set_visible(False)
+
+
+
+f = plt.figure()
+
+gs = gridspec.GridSpec(2, 2,
+ width_ratios=[1,2],
+ height_ratios=[4,1]
+ )
+
+ax1 = plt.subplot(gs[0])
+ax2 = plt.subplot(gs[1])
+ax3 = plt.subplot(gs[2])
+ax4 = plt.subplot(gs[3])
+
+make_ticklabels_invisible(f)
+plt.show()
+
Modified: trunk/matplotlib/lib/matplotlib/gridspec.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/gridspec.py 2010-05-19 00:32:31 UTC (rev 8322)
+++ trunk/matplotlib/lib/matplotlib/gridspec.py 2010-05-19 00:32:37 UTC (rev 8323)
@@ -21,95 +21,113 @@
import matplotlib.transforms as mtransforms
+import numpy as np
-class GridSpec(object):
+class GridSpecBase(object):
"""
- A class that specifies the geometry of the grid that a subplot
- will be placed.
+ A base class of GridSpec that specifies the geometry of the grid
+ that a subplot will be placed.
"""
+
def __init__(self, nrows, ncols,
- left=None, bottom=None, right=None, top=None,
- wspace=None, hspace=None):
+ height_ratios=None, width_ratios=None):
"""
- The number of rows and number of columns of the
- grid need to be set. Optionally, the subplot layout parameters
- (e.g., left, right, etc.) can be tuned.
+ The number of rows and number of columns of the grid need to
+ be set. Optionally, the ratio of heights and widths of ros and
+ columns can be specified.
"""
#self.figure = figure
self._nrows , self._ncols = nrows, ncols
- self.left=left
- self.bottom=bottom
- self.right=right
- self.top=top
- self.wspace=wspace
- self.hspace=hspace
+ self.set_height_ratios(height_ratios)
+ self.set_width_ratios(width_ratios)
+
def get_geometry(self):
'get the geometry of the grid, eg 2,3'
return self._nrows, self._ncols
- _AllowedKeys = ["left", "bottom", "right", "top", "wspace", "hspace"]
+ def get_subplot_params(self, fig=None):
+ pass
- def update(self, **kwargs):
+ def new_subplotspec(self, loc, rowspan=1, colspan=1):
"""
- Update the current values. If any kwarg is None, default to
- the current value, if set, otherwise to rc.
+ create and return a SuplotSpec instance.
"""
+ loc1, loc2 = loc
+ subplotspec = self[loc1:loc1+rowspan, loc2:loc2+colspan]
+ return subplotspec
- for k, v in kwargs.items():
- if k in self._AllowedKeys:
- setattr(self, k, v)
- else:
- raise AttributeError("%s is unknown keyword" % (k,))
+ def set_width_ratios(self, width_ratios):
+ self._col_width_ratios = width_ratios
- from matplotlib import _pylab_helpers
- from matplotlib.axes import SubplotBase
- for figmanager in _pylab_helpers.Gcf.figs.values():
- for ax in figmanager.canvas.figure.axes:
- # copied from Figure.subplots_adjust
- if not isinstance(ax, SubplotBase):
- # Check if sharing a subplots axis
- if ax._sharex is not None and isinstance(ax._sharex, SubplotBase):
- ax._sharex.update_params()
- ax.set_position(ax._sharex.figbox)
- elif ax._sharey is not None and isinstance(ax._sharey,SubplotBase):
- ax._sharey.update_params()
- ax.set_position(ax._sharey.figbox)
- else:
- ax.update_params()
- ax.set_position(ax.figbox)
+ def get_width_ratios(self):
+ return self._col_width_ratios
+ def set_height_ratios(self, height_ratios):
+ self._row_height_ratios = height_ratios
- def get_subplot_params(self, fig=None):
+ def get_height_ratios(self):
+ return self._row_height_ratios
+
+
+ def get_grid_positions(self, fig):
"""
- return a dictionary of subplot layout parameters. The default
- parameters are from rcParams unless a figure attribute is set.
+ return lists of bottom and top position of rows, left and
+ right positions of columns.
"""
- from matplotlib.figure import SubplotParams
- import copy
- if fig is None:
- kw = dict([(k, rcParams["figure.subplot."+k]) \
- for k in self._AllowedKeys])
- subplotpars = SubplotParams(**kw)
+ nrows, ncols = self.get_geometry()
+
+ subplot_params = self.get_subplot_params(fig)
+ left = subplot_params.left
+ right = subplot_params.right
+ bottom = subplot_params.bottom
+ top = subplot_params.top
+ wspace = subplot_params.wspace
+ hspace = subplot_params.hspace
+ totWidth = right-left
+ totHeight = top-bottom
+
+ # calculate accumulated heights of columns
+ cellH = totHeight/(nrows + hspace*(nrows-1))
+ sepH = hspace*cellH
+
+ if self._row_height_ratios is not None:
+ netHeight = cellH * nrows
+ tr = float(sum(self._row_height_ratios))
+ cellHeights = [netHeight*r/tr for r in self._row_height_ratios]
else:
- subplotpars = copy.copy(fig.subplotpars)
+ cellHeights = [cellH] * nrows
- update_kw = dict([(k, getattr(self, k)) for k in self._AllowedKeys])
- subplotpars.update(**update_kw)
+ sepHeights = [0] + ([sepH] * (nrows-1))
+ cellHs = np.add.accumulate(np.ravel(zip(sepHeights, cellHeights)))
- return subplotpars
+ # calculate accumulated widths of rows
+ cellW = totWidth/(ncols + wspace*(ncols-1))
+ sepW = wspace*cellW
- def new_subplotspec(self, loc, rowspan=1, colspan=1):
- """
- create and return a SuplotSpec instance.
- """
- loc1, loc2 = loc
- subplotspec = self[loc1:loc1+rowspan, loc2:loc2+colspan]
- return subplotspec
+ if self._col_width_ratios is not None:
+ netWidth = cellW * ncols
+ tr = float(sum(self._col_width_ratios))
+ cellWidths = [netWidth*r/tr for r in self._col_width_ratios]
+ else:
+ cellWidths = [cellW] * ncols
+ sepWidths = [0] + ([sepW] * (ncols-1))
+ cellWs = np.add.accumulate(np.ravel(zip(sepWidths, cellWidths)))
+
+
+ figTops = [top - cellHs[2*rowNum] for rowNum in range(nrows)]
+ figBottoms = [top - cellHs[2*rowNum+1] for rowNum in range(nrows)]
+ figLefts = [left + cellWs[2*colNum] for colNum in range(ncols)]
+ figRights = [left + cellWs[2*colNum+1] for colNum in range(ncols)]
+
+
+ return figBottoms, figTops, figLefts, figRights
+
+
def __getitem__(self, key):
"""
create and return a SuplotSpec instance.
@@ -156,28 +174,121 @@
return SubplotSpec(self, num1, num2)
-class GridSpecFromSubplotSpec(GridSpec):
+class GridSpec(GridSpecBase):
"""
+ A class that specifies the geometry of the grid that a subplot
+ will be placed. The location of grid is determined by similar way
+ as the SubplotParams.
+ """
+
+ def __init__(self, nrows, ncols,
+ left=None, bottom=None, right=None, top=None,
+ wspace=None, hspace=None,
+ width_ratios=None, height_ratios=None):
+ """
+ The number of rows and number of columns of the
+ grid need to be set. Optionally, the subplot layout parameters
+ (e.g., left, right, etc.) can be tuned.
+ """
+ #self.figure = figure
+ self.left=left
+ self.bottom=bottom
+ self.right=right
+ self.top=top
+ self.wspace=wspace
+ self.hspace=hspace
+
+ GridSpecBase.__init__(self, nrows, ncols,
+ width_ratios=width_ratios,
+ height_ratios=height_ratios)
+ #self.set_width_ratios(width_ratios)
+ #self.set_height_ratios(height_ratios)
+
+
+ _AllowedKeys = ["left", "bottom", "right", "top", "wspace", "hspace"]
+
+ def update(self, **kwargs):
+ """
+ Update the current values. If any kwarg is None, default to
+ the current value, if set, otherwise to rc.
+ """
+
+ for k, v in kwargs.items():
+ if k in self._AllowedKeys:
+ setattr(self, k, v)
+ else:
+ raise AttributeError("%s is unknown keyword" % (k,))
+
+
+ from matplotlib import _pylab_helpers
+ from matplotlib.axes import SubplotBase
+ for figmanager in _pylab_helpers.Gcf.figs.values():
+ for ax in figmanager.canvas.figure.axes:
+ # copied from Figure.subplots_adjust
+ if not isinstance(ax, SubplotBase):
+ # Check if sharing a subplots axis
+ if ax._sharex is not None and isinstance(ax._sharex, SubplotBase):
+ ax._sharex.update_params()
+ ax.set_position(ax._sharex.figbox)
+ elif ax._sharey is not None and isinstance(ax._sharey,SubplotBase):
+ ax._sharey.update_params()
+ ax.set_position(ax._sharey.figbox)
+ else:
+ ax.update_params()
+ ax.set_position(ax.figbox)
+
+
+
+ def get_subplot_params(self, fig=None):
+ """
+ return a dictionary of subplot layout parameters. The default
+ parameters are from rcParams unless a figure attribute is set.
+ """
+ from matplotlib.figure import SubplotParams
+ import copy
+ if fig is None:
+ kw = dict([(k, rcParams["figure.subplot."+k]) \
+ for k in self._AllowedKeys])
+ subplotpars = SubplotParams(**kw)
+ else:
+ subplotpars = copy.copy(fig.subplotpars)
+
+ update_kw = dict([(k, getattr(self, k)) for k in self._AllowedKeys])
+ subplotpars.update(**update_kw)
+
+ return subplotpars
+
+
+class GridSpecFromSubplotSpec(GridSpecBase):
+ """
GridSpec whose subplot layout parameters are inherited from the
location specified by a given SubplotSpec.
"""
def __init__(self, nrows, ncols,
subplot_spec,
- wspace=None, hspace=None):
+ wspace=None, hspace=None,
+ height_ratios=None, width_ratios=None):
"""
The number of rows and number of columns of the grid need to
- be set. An instance of SubplotSpec is also need to be set from
- which the layout parameters will be inheirted. The wspace and
- hspace of the layout can be optionally specified or the
+ be set. An instance of SubplotSpec is also needed to be set
+ from which the layout parameters will be inheirted. The wspace
+ and hspace of the layout can be optionally specified or the
default values (from the figure or rcParams) will be used.
"""
- self._nrows , self._ncols = nrows, ncols
self._wspace=wspace
self._hspace=hspace
self._subplot_spec = subplot_spec
+ GridSpecBase.__init__(self, nrows, ncols,
+ width_ratios=width_ratios,
+ height_ratios=height_ratios)
+
+
def get_subplot_params(self, fig=None):
+ """
+ return a dictionary of subplot layout parameters.
+ """
if fig is None:
hspace = rcParams["figure.subplot.hspace"]
@@ -249,37 +360,25 @@
"""
gridspec = self.get_gridspec()
- rows, cols = gridspec.get_geometry()
+ nrows, ncols = gridspec.get_geometry()
- subplot_params = gridspec.get_subplot_params(fig)
- left = subplot_params.left
- right = subplot_params.right
- bottom = subplot_params.bottom
- top = subplot_params.top
- wspace = subplot_params.wspace
- hspace = subplot_params.hspace
- totWidth = right-left
- totHeight = top-bottom
+ figBottoms, figTops, figLefts, figRights = \
+ gridspec.get_grid_positions(fig)
- figH = totHeight/(rows + hspace*(rows-1))
- sepH = hspace*figH
- figW = totWidth/(cols + wspace*(cols-1))
- sepW = wspace*figW
+ rowNum, colNum = divmod(self.num1, ncols)
+ figBottom = figBottoms[rowNum]
+ figTop = figTops[rowNum]
+ figLeft = figLefts[colNum]
+ figRight = figRights[colNum]
- rowNum, colNum = divmod(self.num1, cols)
- figBottom = top - (rowNum+1)*figH - rowNum*sepH
- figLeft = left + colNum*(figW + sepW)
- figTop = figBottom + figH
- figRight = figLeft + figW
-
if self.num2 is not None:
- rowNum2, colNum2 = divmod(self.num2, cols)
- figBottom2 = top - (rowNum2+1)*figH - rowNum2*sepH
- figLeft2 = left + colNum2*(figW + sepW)
- figTop2 = figBottom2 + figH
- figRight2 = figLeft2 + figW
+ rowNum2, colNum2 = divmod(self.num2, ncols)
+ figBottom2 = figBottoms[rowNum2]
+ figTop2 = figTops[rowNum2]
+ figLeft2 = figLefts[colNum2]
+ figRight2 = figRights[colNum2]
figBottom = min(figBottom, figBottom2)
figLeft = min(figLeft, figLeft2)
@@ -291,7 +390,7 @@
if return_all:
- return figbox, rowNum, colNum, rows, cols
+ return figbox, rowNum, colNum, nrows, ncols
else:
return figbox
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lee...@us...> - 2010-05-19 00:32:38
|
Revision: 8322
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8322&view=rev
Author: leejjoon
Date: 2010-05-19 00:32:31 +0000 (Wed, 19 May 2010)
Log Message:
-----------
fix a formatting issue of gridspec docs
Modified Paths:
--------------
trunk/matplotlib/doc/users/gridspec.rst
trunk/matplotlib/doc/users/index.rst
Modified: trunk/matplotlib/doc/users/gridspec.rst
===================================================================
--- trunk/matplotlib/doc/users/gridspec.rst 2010-05-19 00:32:26 UTC (rev 8321)
+++ trunk/matplotlib/doc/users/gridspec.rst 2010-05-19 00:32:31 UTC (rev 8322)
@@ -20,7 +20,7 @@
Basic Example of using subplot2grid
-=====================================
+====================================
To use subplot2grid, you provide geometry of the grid and the location
of the subplot in the grid. For a simple single-cell subplot, ::
@@ -128,3 +128,4 @@
.. plot:: users/plotting/examples/demo_gridspec04.py
+
Modified: trunk/matplotlib/doc/users/index.rst
===================================================================
--- trunk/matplotlib/doc/users/index.rst 2010-05-19 00:32:26 UTC (rev 8321)
+++ trunk/matplotlib/doc/users/index.rst 2010-05-19 00:32:31 UTC (rev 8322)
@@ -21,6 +21,7 @@
index_text.rst
image_tutorial.rst
artists.rst
+ gridspec.rst
legend_guide.rst
event_handling.rst
transforms_tutorial.rst
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lee...@us...> - 2010-05-19 00:32:33
|
Revision: 8321
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8321&view=rev
Author: leejjoon
Date: 2010-05-19 00:32:26 +0000 (Wed, 19 May 2010)
Log Message:
-----------
update docs. for gridspec
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
Added Paths:
-----------
trunk/matplotlib/doc/users/gridspec.rst
trunk/matplotlib/doc/users/plotting/examples/demo_gridspec01.py
trunk/matplotlib/doc/users/plotting/examples/demo_gridspec02.py
trunk/matplotlib/doc/users/plotting/examples/demo_gridspec03.py
trunk/matplotlib/doc/users/plotting/examples/demo_gridspec04.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2010-05-19 00:32:18 UTC (rev 8320)
+++ trunk/matplotlib/CHANGELOG 2010-05-19 00:32:26 UTC (rev 8321)
@@ -1,3 +1,5 @@
+2010-05-18 Merge mpl_toolkits.gridspec into the main tree. - JJL
+
2010-05-04 Improve backend_qt4 so it displays figures with the
correct size - DSD
Added: trunk/matplotlib/doc/users/gridspec.rst
===================================================================
--- trunk/matplotlib/doc/users/gridspec.rst (rev 0)
+++ trunk/matplotlib/doc/users/gridspec.rst 2010-05-19 00:32:26 UTC (rev 8321)
@@ -0,0 +1,130 @@
+.. _gridspec-guide:
+
+
+************************************************
+ Customizing Location of Subplot Using GridSpec
+************************************************
+
+ ``GridSpec``
+ specifies the geometry of the grid that a subplot will be
+ placed. The number of rows and number of columns of the grid
+ need to be set. Optionally, the subplot layout parameters
+ (e.g., left, right, etc.) can be tuned.
+
+ ``SubplotSpec``
+ specifies the location of the subplot in the given *GridSpec*.
+
+ ``subplot2grid``
+ a helper function that is similar to "pyplot.subplot" but uses
+ 0-based indexing and let subplot to occupy multiple cells.
+
+
+ Basic Example of using subplot2grid
+=====================================
+
+To use subplot2grid, you provide geometry of the grid and the location
+of the subplot in the grid. For a simple single-cell subplot, ::
+
+ ax = plt.subplot2grid((2,2),(0, 0))
+
+is identical to ::
+
+ ax = plt.subplot(2,2,1)
+
+Note that, unlike matplotlib's subplot, the index starts from 0 in gridspec.
+
+To create a subplot that spans multiple cells, ::
+
+ ax2 = plt.subplot2grid((3,3), (1, 0), colspan=2)
+ ax3 = plt.subplot2grid((3,3), (1, 2), rowspan=2)
+
+For example, the following commands ::
+
+ ax1 = plt.subplot2grid((3,3), (0,0), colspan=3)
+ ax2 = plt.subplot2grid((3,3), (1,0), colspan=2)
+ ax3 = plt.subplot2grid((3,3), (1, 2), rowspan=2)
+ ax4 = plt.subplot2grid((3,3), (2, 0))
+ ax5 = plt.subplot2grid((3,3), (2, 1))
+
+creates
+
+.. plot:: users/plotting/examples/demo_gridspec01.py
+
+
+GridSpec and SubplotSpec
+========================
+
+You can create GridSpec explicitly and use them to create a Subplot.
+
+For example, ::
+
+ ax = plt.subplot2grid((2,2),(0, 0))
+
+is equal to ::
+
+ import matplotlib.gridspec as gridspec
+ gs = gridspec.GridSpec(2, 2)
+ ax = plt.subplot(gs[0, 0])
+
+A gridspec instance provides array-like (2d or 1d) indexing that
+returns the SubplotSpec instance. For, SubplotSpec that spans multiple
+cells, use slice. ::
+
+ ax2 = plt.subplot(gs[1,:-1])
+ ax3 = plt.subplot(gs[1:, -1])
+
+The above example becomes ::
+
+ gs = gridspec.GridSpec(3, 3)
+ ax1 = plt.subplot(gs[0, :])
+ ax2 = plt.subplot(gs[1,:-1])
+ ax3 = plt.subplot(gs[1:, -1])
+ ax4 = plt.subplot(gs[-1,0])
+ ax5 = plt.subplot(gs[-1,-2])
+
+.. plot:: users/plotting/examples/demo_gridspec02.py
+
+Adjust GridSpec layout
+======================
+
+When a GridSpec is explicitly used, you can adjust the layout
+parameters of subplots that are created from the gridspec. ::
+
+ gs1 = gridspec.GridSpec(3, 3)
+ gs1.update(left=0.05, right=0.48, wspace=0.05)
+
+This is similar to *subplots_adjust*, but it only affects the subplots
+that are created from the given GridSpec.
+
+The code below ::
+
+ gs1 = gridspec.GridSpec(3, 3)
+ gs1.update(left=0.05, right=0.48, wspace=0.05)
+ ax1 = plt.subplot(gs1[:-1, :])
+ ax2 = plt.subplot(gs1[-1, :-1])
+ ax3 = plt.subplot(gs1[-1, -1])
+
+ gs2 = gridspec.GridSpec(3, 3)
+ gs2.update(left=0.55, right=0.98, hspace=0.05)
+ ax4 = plt.subplot(gs2[:, :-1])
+ ax5 = plt.subplot(gs2[:-1, -1])
+ ax6 = plt.subplot(gs2[-1, -1])
+
+creates
+
+.. plot:: users/plotting/examples/demo_gridspec03.py
+
+GridSpec using SubplotSpec
+==========================
+
+You can create GridSpec from the SubplotSpec, in which case its layout
+parameters are set to that of the locataion of the given SubplotSpec. ::
+
+ gs0 = gridspec.GridSpec(1, 2)
+
+ gs00 = gridspec.GridSpecFromSubplotSpec(3, 3, subplot_spec=gs0[0])
+ gs01 = gridspec.GridSpecFromSubplotSpec(3, 3, subplot_spec=gs0[1])
+
+
+.. plot:: users/plotting/examples/demo_gridspec04.py
+
Added: trunk/matplotlib/doc/users/plotting/examples/demo_gridspec01.py
===================================================================
--- trunk/matplotlib/doc/users/plotting/examples/demo_gridspec01.py (rev 0)
+++ trunk/matplotlib/doc/users/plotting/examples/demo_gridspec01.py 2010-05-19 00:32:26 UTC (rev 8321)
@@ -0,0 +1,20 @@
+import matplotlib.pyplot as plt
+
+def make_ticklabels_invisible(fig):
+ for i, ax in enumerate(fig.axes):
+ ax.text(0.5, 0.5, "ax%d" % (i+1), va="center", ha="center")
+ for tl in ax.get_xticklabels() + ax.get_yticklabels():
+ tl.set_visible(False)
+
+
+plt.figure(0)
+ax1 = plt.subplot2grid((3,3), (0,0), colspan=3)
+ax2 = plt.subplot2grid((3,3), (1,0), colspan=2)
+ax3 = plt.subplot2grid((3,3), (1, 2), rowspan=2)
+ax4 = plt.subplot2grid((3,3), (2, 0))
+ax5 = plt.subplot2grid((3,3), (2, 1))
+
+plt.suptitle("subplot2grid")
+make_ticklabels_invisible(plt.gcf())
+plt.show()
+
Added: trunk/matplotlib/doc/users/plotting/examples/demo_gridspec02.py
===================================================================
--- trunk/matplotlib/doc/users/plotting/examples/demo_gridspec02.py (rev 0)
+++ trunk/matplotlib/doc/users/plotting/examples/demo_gridspec02.py 2010-05-19 00:32:26 UTC (rev 8321)
@@ -0,0 +1,26 @@
+import matplotlib.pyplot as plt
+from matplotlib.gridspec import GridSpec
+
+
+def make_ticklabels_invisible(fig):
+ for i, ax in enumerate(fig.axes):
+ ax.text(0.5, 0.5, "ax%d" % (i+1), va="center", ha="center")
+ for tl in ax.get_xticklabels() + ax.get_yticklabels():
+ tl.set_visible(False)
+
+
+plt.figure()
+
+gs = GridSpec(3, 3)
+ax1 = plt.subplot(gs[0, :])
+# identical to ax1 = plt.subplot(gs.new_subplotspec((0,0), colspan=3))
+ax2 = plt.subplot(gs[1,:-1])
+ax3 = plt.subplot(gs[1:, -1])
+ax4 = plt.subplot(gs[-1,0])
+ax5 = plt.subplot(gs[-1,-2])
+
+plt.suptitle("GridSpec")
+make_ticklabels_invisible(plt.gcf())
+
+plt.show()
+
Added: trunk/matplotlib/doc/users/plotting/examples/demo_gridspec03.py
===================================================================
--- trunk/matplotlib/doc/users/plotting/examples/demo_gridspec03.py (rev 0)
+++ trunk/matplotlib/doc/users/plotting/examples/demo_gridspec03.py 2010-05-19 00:32:26 UTC (rev 8321)
@@ -0,0 +1,34 @@
+import matplotlib.pyplot as plt
+from matplotlib.gridspec import GridSpec
+
+
+def make_ticklabels_invisible(fig):
+ for i, ax in enumerate(fig.axes):
+ ax.text(0.5, 0.5, "ax%d" % (i+1), va="center", ha="center")
+ for tl in ax.get_xticklabels() + ax.get_yticklabels():
+ tl.set_visible(False)
+
+
+
+# demo 3 : gridspec with subplotpars set.
+
+f = plt.figure()
+
+plt.suptitle("GirdSpec w/ different subplotpars")
+
+gs1 = GridSpec(3, 3)
+gs1.update(left=0.05, right=0.48, wspace=0.05)
+ax1 = plt.subplot(gs1[:-1, :])
+ax2 = plt.subplot(gs1[-1, :-1])
+ax3 = plt.subplot(gs1[-1, -1])
+
+gs2 = GridSpec(3, 3)
+gs2.update(left=0.55, right=0.98, hspace=0.05)
+ax4 = plt.subplot(gs2[:, :-1])
+ax5 = plt.subplot(gs2[:-1, -1])
+ax6 = plt.subplot(gs2[-1, -1])
+
+make_ticklabels_invisible(plt.gcf())
+
+plt.show()
+
Added: trunk/matplotlib/doc/users/plotting/examples/demo_gridspec04.py
===================================================================
--- trunk/matplotlib/doc/users/plotting/examples/demo_gridspec04.py (rev 0)
+++ trunk/matplotlib/doc/users/plotting/examples/demo_gridspec04.py 2010-05-19 00:32:26 UTC (rev 8321)
@@ -0,0 +1,41 @@
+import matplotlib.pyplot as plt
+import matplotlib.gridspec as gridspec
+
+def make_ticklabels_invisible(fig):
+ for i, ax in enumerate(fig.axes):
+ ax.text(0.5, 0.5, "ax%d" % (i+1), va="center", ha="center")
+ for tl in ax.get_xticklabels() + ax.get_yticklabels():
+ tl.set_visible(False)
+
+
+
+# gridspec inside gridspec
+
+f = plt.figure()
+
+gs0 = gridspec.GridSpec(1, 2)
+
+gs00 = gridspec.GridSpecFromSubplotSpec(3, 3, subplot_spec=gs0[0])
+
+ax1 = plt.Subplot(f, gs00[:-1, :])
+f.add_subplot(ax1)
+ax2 = plt.Subplot(f, gs00[-1, :-1])
+f.add_subplot(ax2)
+ax3 = plt.Subplot(f, gs00[-1, -1])
+f.add_subplot(ax3)
+
+
+gs01 = gridspec.GridSpecFromSubplotSpec(3, 3, subplot_spec=gs0[1])
+
+ax4 = plt.Subplot(f, gs01[:, :-1])
+f.add_subplot(ax4)
+ax5 = plt.Subplot(f, gs01[:-1, -1])
+f.add_subplot(ax5)
+ax6 = plt.Subplot(f, gs01[-1, -1])
+f.add_subplot(ax6)
+
+plt.suptitle("GirdSpec Inside GridSpec")
+make_ticklabels_invisible(plt.gcf())
+
+plt.show()
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lee...@us...> - 2010-05-19 00:32:25
|
Revision: 8320
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8320&view=rev
Author: leejjoon
Date: 2010-05-19 00:32:18 +0000 (Wed, 19 May 2010)
Log Message:
-----------
merge mpl_toolkits.gridspec into the main tree
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/pyplot.py
Added Paths:
-----------
trunk/matplotlib/lib/matplotlib/gridspec.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2010-05-18 17:14:45 UTC (rev 8319)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2010-05-19 00:32:18 UTC (rev 8320)
@@ -8039,6 +8039,8 @@
triplot.__doc__ = mtri.triplot.__doc__
+from gridspec import GridSpec, SubplotSpec
+
class SubplotBase:
"""
Base class for subplots, which are :class:`Axes` instances with
@@ -8062,92 +8064,63 @@
self.figure = fig
- if len(args)==1:
- s = str(args[0])
- if len(s) != 3:
- raise ValueError('Argument to subplot must be a 3 digits long')
- rows, cols, num = map(int, s)
+ if len(args) == 1:
+ if isinstance(args[0], SubplotSpec):
+ self._subplotspec = args[0]
+
+ else:
+ s = str(args[0])
+ if len(s) != 3:
+ raise ValueError('Argument to subplot must be a 3 digits long')
+ rows, cols, num = map(int, s)
+ self._subplotspec = GridSpec(rows, cols)[num-1]
+ # num - 1 for converting from matlab to python indexing
elif len(args)==3:
rows, cols, num = args
+ if isinstance(num, tuple) and len(num) == 2:
+ self._subplotspec = GridSpec(rows, cols)[num[0]-1:num[1]]
+ else:
+ self._subplotspec = GridSpec(rows, cols)[num-1]
+ # num - 1 for converting from matlab to python indexing
else:
raise ValueError( 'Illegal argument to subplot')
- total = rows*cols
- num -= 1 # convert from matlab to python indexing
- # ie num in range(0,total)
- if num >= total:
- raise ValueError( 'Subplot number exceeds total subplots')
- self._rows = rows
- self._cols = cols
- self._num = num
-
self.update_params()
# _axes_class is set in the subplot_class_factory
self._axes_class.__init__(self, fig, self.figbox, **kwargs)
+
+
def get_geometry(self):
'get the subplot geometry, eg 2,2,3'
- return self._rows, self._cols, self._num+1
+ rows, cols, num1, num2 = self.get_subplotspec().get_geometry()
+ return rows, cols, num1+1 # for compatibility
# COVERAGE NOTE: Never used internally or from examples
def change_geometry(self, numrows, numcols, num):
'change subplot geometry, eg. from 1,1,1 to 2,2,3'
- self._rows = numrows
- self._cols = numcols
- self._num = num-1
+ self._subplotspec = GridSpec(numrows, numcols)[num-1]
self.update_params()
self.set_position(self.figbox)
+ def get_subplotspec(self):
+ 'get the SubplotSpec instance associated with the subplot'
+ return self._subplotspec
+
+ def set_subplotspec(self, subplotspec):
+ 'set the SubplotSpec instance associated with the subplot'
+ self._subplotspec = subplotspec
+
def update_params(self):
'update the subplot position from fig.subplotpars'
- rows = self._rows
- cols = self._cols
- num = self._num
+ self.figbox, self.rowNum, self.colNum, self.numRows, self.numCols = \
+ self.get_subplotspec().get_position(self.figure,
+ return_all=True)
- pars = self.figure.subplotpars
- left = pars.left
- right = pars.right
- bottom = pars.bottom
- top = pars.top
- wspace = pars.wspace
- hspace = pars.hspace
- totWidth = right-left
- totHeight = top-bottom
- figH = totHeight/(rows + hspace*(rows-1))
- sepH = hspace*figH
-
- figW = totWidth/(cols + wspace*(cols-1))
- sepW = wspace*figW
-
- rowNum, colNum = divmod(num, cols)
-
- figBottom = top - (rowNum+1)*figH - rowNum*sepH
- figLeft = left + colNum*(figW + sepW)
-
- self.figbox = mtransforms.Bbox.from_bounds(figLeft, figBottom,
- figW, figH)
- self.rowNum = rowNum
- self.colNum = colNum
- self.numRows = rows
- self.numCols = cols
-
- if 0:
- print 'rcn', rows, cols, num
- print 'lbrt', left, bottom, right, top
- print 'self.figBottom', self.figBottom
- print 'self.figLeft', self.figLeft
- print 'self.figW', self.figW
- print 'self.figH', self.figH
- print 'self.rowNum', self.rowNum
- print 'self.colNum', self.colNum
- print 'self.numRows', self.numRows
- print 'self.numCols', self.numCols
-
-
def is_first_col(self):
return self.colNum==0
Added: trunk/matplotlib/lib/matplotlib/gridspec.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/gridspec.py (rev 0)
+++ trunk/matplotlib/lib/matplotlib/gridspec.py 2010-05-19 00:32:18 UTC (rev 8320)
@@ -0,0 +1,298 @@
+"""
+:mod:`~matplotlib.gridspec` is a module which specifies the location
+of the subplot in the figure.
+
+ ``GridSpec``
+ specifies the geometry of the grid that a subplot will be
+ placed. The number of rows and number of columns of the grid
+ need to be set. Optionally, the subplot layout parameters
+ (e.g., left, right, etc.) can be tuned.
+
+ ``SubplotSpec``
+ specifies the location of the subplot in the given *GridSpec*.
+
+
+"""
+
+from __future__ import division
+
+import matplotlib
+rcParams = matplotlib.rcParams
+
+import matplotlib.transforms as mtransforms
+
+
+class GridSpec(object):
+ """
+ A class that specifies the geometry of the grid that a subplot
+ will be placed.
+ """
+ def __init__(self, nrows, ncols,
+ left=None, bottom=None, right=None, top=None,
+ wspace=None, hspace=None):
+ """
+ The number of rows and number of columns of the
+ grid need to be set. Optionally, the subplot layout parameters
+ (e.g., left, right, etc.) can be tuned.
+ """
+ #self.figure = figure
+ self._nrows , self._ncols = nrows, ncols
+ self.left=left
+ self.bottom=bottom
+ self.right=right
+ self.top=top
+ self.wspace=wspace
+ self.hspace=hspace
+
+ def get_geometry(self):
+ 'get the geometry of the grid, eg 2,3'
+ return self._nrows, self._ncols
+
+ _AllowedKeys = ["left", "bottom", "right", "top", "wspace", "hspace"]
+
+ def update(self, **kwargs):
+ """
+ Update the current values. If any kwarg is None, default to
+ the current value, if set, otherwise to rc.
+ """
+
+ for k, v in kwargs.items():
+ if k in self._AllowedKeys:
+ setattr(self, k, v)
+ else:
+ raise AttributeError("%s is unknown keyword" % (k,))
+
+
+ from matplotlib import _pylab_helpers
+ from matplotlib.axes import SubplotBase
+ for figmanager in _pylab_helpers.Gcf.figs.values():
+ for ax in figmanager.canvas.figure.axes:
+ # copied from Figure.subplots_adjust
+ if not isinstance(ax, SubplotBase):
+ # Check if sharing a subplots axis
+ if ax._sharex is not None and isinstance(ax._sharex, SubplotBase):
+ ax._sharex.update_params()
+ ax.set_position(ax._sharex.figbox)
+ elif ax._sharey is not None and isinstance(ax._sharey,SubplotBase):
+ ax._sharey.update_params()
+ ax.set_position(ax._sharey.figbox)
+ else:
+ ax.update_params()
+ ax.set_position(ax.figbox)
+
+
+ def get_subplot_params(self, fig=None):
+ """
+ return a dictionary of subplot layout parameters. The default
+ parameters are from rcParams unless a figure attribute is set.
+ """
+ from matplotlib.figure import SubplotParams
+ import copy
+ if fig is None:
+ kw = dict([(k, rcParams["figure.subplot."+k]) \
+ for k in self._AllowedKeys])
+ subplotpars = SubplotParams(**kw)
+ else:
+ subplotpars = copy.copy(fig.subplotpars)
+
+ update_kw = dict([(k, getattr(self, k)) for k in self._AllowedKeys])
+ subplotpars.update(**update_kw)
+
+ return subplotpars
+
+
+ def new_subplotspec(self, loc, rowspan=1, colspan=1):
+ """
+ create and return a SuplotSpec instance.
+ """
+ loc1, loc2 = loc
+ subplotspec = self[loc1:loc1+rowspan, loc2:loc2+colspan]
+ return subplotspec
+
+
+ def __getitem__(self, key):
+ """
+ create and return a SuplotSpec instance.
+ """
+ nrows, ncols = self.get_geometry()
+ total = nrows*ncols
+
+ if isinstance(key, tuple):
+ try:
+ k1, k2 = key
+ except ValueError:
+ raise ValueError("unrecognized subplot spec")
+
+ if isinstance(k1, slice):
+ row1, row2, _ = k1.indices(nrows)
+ else:
+ if k1 < 0:
+ k1 += nrows
+ row1, row2 = k1, k1+1
+
+
+ if isinstance(k2, slice):
+ col1, col2, _ = k2.indices(ncols)
+ else:
+ if k2 < 0:
+ k2 += ncols
+ col1, col2 = k2, k2+1
+
+
+ num1 = row1*nrows + col1
+ num2 = (row2-1)*nrows + (col2-1)
+
+ # single key
+ else:
+ if isinstance(key, slice):
+ num1, num2, _ = key.indices(total)
+ num2 -= 1
+ else:
+ if key < 0:
+ key += total
+ num1, num2 = key, None
+
+
+ return SubplotSpec(self, num1, num2)
+
+
+class GridSpecFromSubplotSpec(GridSpec):
+ """
+ GridSpec whose subplot layout parameters are inherited from the
+ location specified by a given SubplotSpec.
+ """
+ def __init__(self, nrows, ncols,
+ subplot_spec,
+ wspace=None, hspace=None):
+ """
+ The number of rows and number of columns of the grid need to
+ be set. An instance of SubplotSpec is also need to be set from
+ which the layout parameters will be inheirted. The wspace and
+ hspace of the layout can be optionally specified or the
+ default values (from the figure or rcParams) will be used.
+ """
+ self._nrows , self._ncols = nrows, ncols
+ self._wspace=wspace
+ self._hspace=hspace
+
+ self._subplot_spec = subplot_spec
+
+ def get_subplot_params(self, fig=None):
+
+ if fig is None:
+ hspace = rcParams["figure.subplot.hspace"]
+ wspace = rcParams["figure.subplot.wspace"]
+ else:
+ hspace = fig.subplotpars.hspace
+ wspace = fig.subplotpars.wspace
+
+ if self._hspace is not None:
+ hspace = self._hspace
+
+ if self._wspace is not None:
+ wspace = self._wspace
+
+ figbox = self._subplot_spec.get_position(fig, return_all=False)
+
+ left, bottom, right, top = figbox.extents
+
+ from matplotlib.figure import SubplotParams
+ sp = SubplotParams(left=left,
+ right=right,
+ bottom=bottom,
+ top=top,
+ wspace=wspace,
+ hspace=hspace)
+
+ return sp
+
+
+
+
+class SubplotSpec(object):
+ """
+ specifies the location of the subplot in the given *GridSpec*.
+ """
+
+ def __init__(self, gridspec, num1, num2=None):
+ """
+ The subplot will occupy the num1-th cell of the given
+ gridspec. If num2 is provided, the subplot will span between
+ num1-th cell and num2-th cell.
+
+ The index stars from 0.
+ """
+
+ rows, cols = gridspec.get_geometry()
+ total = rows*cols
+
+ self._gridspec = gridspec
+ self.num1 = num1
+ self.num2 = num2
+
+ def get_gridspec(self):
+ return self._gridspec
+
+
+ def get_geometry(self):
+ """
+ get the subplot geometry, eg 2,2,3. Unlike SuplorParams,
+ index is 0-based
+ """
+ rows, cols = self.get_gridspec().get_geometry()
+ return rows, cols, self.num1, self.num2
+
+
+ def get_position(self, fig, return_all=False):
+ """
+ update the subplot position from fig.subplotpars
+ """
+
+ gridspec = self.get_gridspec()
+ rows, cols = gridspec.get_geometry()
+
+ subplot_params = gridspec.get_subplot_params(fig)
+ left = subplot_params.left
+ right = subplot_params.right
+ bottom = subplot_params.bottom
+ top = subplot_params.top
+ wspace = subplot_params.wspace
+ hspace = subplot_params.hspace
+ totWidth = right-left
+ totHeight = top-bottom
+
+ figH = totHeight/(rows + hspace*(rows-1))
+ sepH = hspace*figH
+
+ figW = totWidth/(cols + wspace*(cols-1))
+ sepW = wspace*figW
+
+ rowNum, colNum = divmod(self.num1, cols)
+ figBottom = top - (rowNum+1)*figH - rowNum*sepH
+ figLeft = left + colNum*(figW + sepW)
+ figTop = figBottom + figH
+ figRight = figLeft + figW
+
+ if self.num2 is not None:
+
+ rowNum2, colNum2 = divmod(self.num2, cols)
+ figBottom2 = top - (rowNum2+1)*figH - rowNum2*sepH
+ figLeft2 = left + colNum2*(figW + sepW)
+ figTop2 = figBottom2 + figH
+ figRight2 = figLeft2 + figW
+
+ figBottom = min(figBottom, figBottom2)
+ figLeft = min(figLeft, figLeft2)
+ figTop = max(figTop, figTop2)
+ figRight = max(figRight, figRight2)
+
+ figbox = mtransforms.Bbox.from_extents(figLeft, figBottom,
+ figRight, figTop)
+
+
+ if return_all:
+ return figbox, rowNum, colNum, rows, cols
+ else:
+ return figbox
+
+
Modified: trunk/matplotlib/lib/matplotlib/pyplot.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pyplot.py 2010-05-18 17:14:45 UTC (rev 8319)
+++ trunk/matplotlib/lib/matplotlib/pyplot.py 2010-05-19 00:32:18 UTC (rev 8320)
@@ -12,7 +12,7 @@
from matplotlib.rcsetup import interactive_bk as _interactive_bk
from matplotlib.artist import getp, get, Artist
from matplotlib.artist import setp as _setp
-from matplotlib.axes import Axes
+from matplotlib.axes import Axes, Subplot
from matplotlib.projections import PolarAxes
from matplotlib import mlab # for csv2rec, detrend_none, window_hanning
from matplotlib.scale import get_scale_docs, get_scale_names
@@ -764,6 +764,44 @@
return fig, axarr.reshape(nrows, ncols)
+from gridspec import GridSpec
+def subplot2grid(shape, loc, rowspan=1, colspan=1, **kwargs):
+ """
+
+ It creates a subplot in a grid of *shape*, at location of *loc*,
+ spanning *rowspan*, *colspan* cells in each direction.
+ The index for loc is 0-based. ::
+
+ subplot2grid(shape, loc, rowspan=1, colspan=1)
+
+ is identical to ::
+
+ gridspec=GridSpec(shape[0], shape[2])
+ subplotspec=gridspec.new_subplotspec(loc, rowspan, colspan)
+ subplot(subplotspec)
+
+
+ """
+
+ fig = gcf()
+ s1, s2 = shape
+ subplotspec = GridSpec(s1, s2).new_subplotspec(loc,
+ rowspan=rowspan,
+ colspan=colspan)
+ a = Subplot(fig, subplotspec, **kwargs)
+ fig.add_subplot(a)
+ bbox = a.bbox
+ byebye = []
+ for other in fig.axes:
+ if other==a: continue
+ if bbox.fully_overlaps(other.bbox):
+ byebye.append(other)
+ for ax in byebye: delaxes(ax)
+
+ draw_if_interactive()
+ return a
+
+
def twinx(ax=None):
"""
Make a second axes overlay *ax* (or the current axes if *ax* is
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lee...@us...> - 2010-05-18 17:14:53
|
Revision: 8319
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8319&view=rev
Author: leejjoon
Date: 2010-05-18 17:14:45 +0000 (Tue, 18 May 2010)
Log Message:
-----------
fix a bug in AnnotationBase._get_ref_xy
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/text.py
Modified: trunk/matplotlib/lib/matplotlib/text.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/text.py 2010-05-18 17:14:40 UTC (rev 8318)
+++ trunk/matplotlib/lib/matplotlib/text.py 2010-05-18 17:14:45 UTC (rev 8319)
@@ -1527,7 +1527,8 @@
if isinstance(self.xycoords, tuple):
s1, s2 = self.xycoords
- if s1.split()[0] == "offset" or s2.split()[0] == "offset":
+ if (is_string_like(s1) and s1.split()[0] == "offset") \
+ or (is_string_like(s2) and s2.split()[0] == "offset"):
raise ValueError("xycoords should not be an offset coordinate")
x, y = self.xy
x1, y1 = self._get_xy(renderer, x, y, s1)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lee...@us...> - 2010-05-18 17:14:47
|
Revision: 8318
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8318&view=rev
Author: leejjoon
Date: 2010-05-18 17:14:40 +0000 (Tue, 18 May 2010)
Log Message:
-----------
fix savefig bug
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2010-05-17 19:03:58 UTC (rev 8317)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2010-05-18 17:14:40 UTC (rev 8318)
@@ -8002,7 +8002,7 @@
bb.extend([bby1, bby2])
- bb.extend([c.get_window_extent(renderer) for c in artists])
+ bb.extend([c.get_window_extent(renderer) for c in artists if c.get_visible()])
_bbox = mtransforms.Bbox.union([b for b in bb if b.width!=0 or b.height!=0])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2010-05-17 19:04:04
|
Revision: 8317
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8317&view=rev
Author: efiring
Date: 2010-05-17 19:03:58 +0000 (Mon, 17 May 2010)
Log Message:
-----------
Axes.hist: fix bug in handling of weights kwarg; thanks to Jeff Klukas.
Also use weights kwarg in examples/histogram_demo_extended.
Modified Paths:
--------------
trunk/matplotlib/examples/pylab_examples/histogram_demo_extended.py
trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/examples/pylab_examples/histogram_demo_extended.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/histogram_demo_extended.py 2010-05-13 09:13:49 UTC (rev 8316)
+++ trunk/matplotlib/examples/pylab_examples/histogram_demo_extended.py 2010-05-17 19:03:58 UTC (rev 8317)
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+import numpy as np
import pylab as P
#
@@ -90,8 +91,20 @@
x1 = mu + sigma*P.randn(7000)
x2 = mu + sigma*P.randn(3000)
+# and exercise the weights option by arbitrarily giving the first half
+# of each series only half the weight of the others:
+
+w0 = np.ones_like(x0)
+w0[:len(x0)/2] = 0.5
+w1 = np.ones_like(x1)
+w1[:len(x1)/2] = 0.5
+w2 = np.ones_like(x2)
+w0[:len(x2)/2] = 0.5
+
+
+
P.figure()
-n, bins, patches = P.hist( [x0,x1,x2], 10, histtype='bar')
+n, bins, patches = P.hist( [x0,x1,x2], 10, weights=[w0, w1, w2], histtype='bar')
P.show()
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2010-05-13 09:13:49 UTC (rev 8316)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2010-05-17 19:03:58 UTC (rev 8317)
@@ -7364,7 +7364,7 @@
raise ValueError("color kwarg must have one color per dataset")
if weights is not None:
- if isinstance(w, np.ndarray):
+ if isinstance(weights, np.ndarray):
w = np.array(weights)
if w.ndim == 2:
w = w.T
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ian...@us...> - 2010-05-13 09:13:56
|
Revision: 8316
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8316&view=rev
Author: ianthomas23
Date: 2010-05-13 09:13:49 +0000 (Thu, 13 May 2010)
Log Message:
-----------
Added triangular grid plotting and contouring functions.
Modified Paths:
--------------
trunk/matplotlib/boilerplate.py
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/pyplot.py
trunk/matplotlib/setup.py
trunk/matplotlib/setupext.py
Added Paths:
-----------
trunk/matplotlib/examples/misc/contour_manual.py
trunk/matplotlib/examples/pylab_examples/tricontour_demo.py
trunk/matplotlib/examples/pylab_examples/tricontour_vs_griddata.py
trunk/matplotlib/examples/pylab_examples/tripcolor_demo.py
trunk/matplotlib/examples/pylab_examples/triplot_demo.py
trunk/matplotlib/lib/matplotlib/tri/
trunk/matplotlib/lib/matplotlib/tri/__init__.py
trunk/matplotlib/lib/matplotlib/tri/_tri.cpp
trunk/matplotlib/lib/matplotlib/tri/_tri.h
trunk/matplotlib/lib/matplotlib/tri/triangulation.py
trunk/matplotlib/lib/matplotlib/tri/tricontour.py
trunk/matplotlib/lib/matplotlib/tri/tripcolor.py
trunk/matplotlib/lib/matplotlib/tri/triplot.py
Modified: trunk/matplotlib/boilerplate.py
===================================================================
--- trunk/matplotlib/boilerplate.py 2010-05-12 17:58:17 UTC (rev 8315)
+++ trunk/matplotlib/boilerplate.py 2010-05-13 09:13:49 UTC (rev 8316)
@@ -89,6 +89,10 @@
#'spy',
'stem',
'step',
+ 'tricontour',
+ 'tricontourf',
+ 'tripcolor',
+ 'triplot',
'vlines',
'xcorr',
'barbs',
@@ -117,6 +121,9 @@
#'spy' : 'sci(%(ret)s)', ### may return image or Line2D
'quiver' : 'sci(%(ret)s)',
'specgram' : 'sci(%(ret)s[-1])',
+ 'tricontour' : 'if %(ret)s._A is not None: sci(%(ret)s)',
+ 'tricontourf': 'if %(ret)s._A is not None: sci(%(ret)s)',
+ 'tripcolor' : 'sci(%(ret)s)',
}
Added: trunk/matplotlib/examples/misc/contour_manual.py
===================================================================
--- trunk/matplotlib/examples/misc/contour_manual.py (rev 0)
+++ trunk/matplotlib/examples/misc/contour_manual.py 2010-05-13 09:13:49 UTC (rev 8316)
@@ -0,0 +1,50 @@
+"""
+Example of displaying your own contour lines and polygons using ContourSet.
+"""
+import matplotlib.pyplot as plt
+from matplotlib.contour import ContourSet
+import matplotlib.cm as cm
+
+# Contour lines for each level are a list/tuple of polygons.
+lines0 = [ [[0,0],[0,4]] ]
+lines1 = [ [[2,0],[1,2],[1,3]] ]
+lines2 = [ [[3,0],[3,2]], [[3,3],[3,4]] ] # Note two lines.
+
+# Filled contours between two levels are also a list/tuple of polygons.
+# Points can be ordered clockwise or anticlockwise.
+filled01 = [ [[0,0],[0,4],[1,3],[1,2],[2,0]] ]
+filled12 = [ [[2,0],[3,0],[3,2],[1,3],[1,2]], # Note two polygons.
+ [[1,4],[3,4],[3,3]] ]
+
+
+plt.figure()
+
+# Filled contours using filled=True.
+cs = ContourSet(plt.gca(), [0,1,2], [filled01, filled12], filled=True, cmap=cm.bone)
+cbar = plt.colorbar(cs)
+
+# Contour lines (non-filled).
+lines = ContourSet(plt.gca(), [0,1,2], [lines0, lines1, lines2], cmap=cm.cool,
+ linewidths=3)
+cbar.add_lines(lines)
+
+plt.axis([-0.5, 3.5, -0.5, 4.5])
+plt.title('User-specified contours')
+
+
+
+# Multiple filled contour lines can be specified in a single list of polygon
+# vertices along with a list of vertex kinds (code types) as described in the
+# Path class. This is particularly useful for polygons with holes.
+# Here a code type of 1 is a MOVETO, and 2 is a LINETO.
+
+plt.figure()
+filled01 = [ [[0,0],[3,0],[3,3],[0,3],[1,1],[1,2],[2,2],[2,1]] ]
+kinds01 = [ [1,2,2,2,1,2,2,2] ]
+cs = ContourSet(plt.gca(), [0,1], [filled01], [kinds01], filled=True)
+cbar = plt.colorbar(cs)
+
+plt.axis([-0.5, 3.5, -0.5, 3.5])
+plt.title('User specified filled contours with holes')
+
+plt.show()
\ No newline at end of file
Property changes on: trunk/matplotlib/examples/misc/contour_manual.py
___________________________________________________________________
Added: svn:keywords
+ Id
Added: trunk/matplotlib/examples/pylab_examples/tricontour_demo.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/tricontour_demo.py (rev 0)
+++ trunk/matplotlib/examples/pylab_examples/tricontour_demo.py 2010-05-13 09:13:49 UTC (rev 8316)
@@ -0,0 +1,98 @@
+"""
+Contour plots of unstructured triangular grids.
+"""
+import matplotlib.pyplot as plt
+import matplotlib.tri as tri
+import numpy as np
+import math
+
+# Creating a Triangulation without specifying the triangles results in the
+# Delaunay triangulation of the points.
+
+# First create the x and y coordinates of the points.
+n_angles = 48
+n_radii = 8
+min_radius = 0.25
+radii = np.linspace(min_radius, 0.95, n_radii)
+
+angles = np.linspace(0, 2*math.pi, n_angles, endpoint=False)
+angles = np.repeat(angles[...,np.newaxis], n_radii, axis=1)
+angles[:,1::2] += math.pi/n_angles
+
+x = (radii*np.cos(angles)).flatten()
+y = (radii*np.sin(angles)).flatten()
+z = (np.cos(radii)*np.cos(angles*3.0)).flatten()
+
+# Create the Triangulation; no triangles so Delaunay triangulation created.
+triang = tri.Triangulation(x, y)
+
+# Mask off unwanted triangles.
+xmid = x[triang.triangles].mean(axis=1)
+ymid = y[triang.triangles].mean(axis=1)
+mask = np.where(xmid*xmid + ymid*ymid < min_radius*min_radius, 1, 0)
+triang.set_mask(mask)
+
+# pcolor plot.
+plt.figure()
+plt.gca().set_aspect('equal')
+plt.tricontourf(triang, z)
+plt.colorbar()
+plt.tricontour(triang, z, colors='k')
+plt.title('Contour plot of Delaunay triangulation')
+
+# You can specify your own triangulation rather than perform a Delaunay
+# triangulation of the points, where each triangle is given by the indices of
+# the three points that make up the triangle, ordered in either a clockwise or
+# anticlockwise manner.
+
+xy = np.asarray([
+ [-0.101,0.872],[-0.080,0.883],[-0.069,0.888],[-0.054,0.890],[-0.045,0.897],
+ [-0.057,0.895],[-0.073,0.900],[-0.087,0.898],[-0.090,0.904],[-0.069,0.907],
+ [-0.069,0.921],[-0.080,0.919],[-0.073,0.928],[-0.052,0.930],[-0.048,0.942],
+ [-0.062,0.949],[-0.054,0.958],[-0.069,0.954],[-0.087,0.952],[-0.087,0.959],
+ [-0.080,0.966],[-0.085,0.973],[-0.087,0.965],[-0.097,0.965],[-0.097,0.975],
+ [-0.092,0.984],[-0.101,0.980],[-0.108,0.980],[-0.104,0.987],[-0.102,0.993],
+ [-0.115,1.001],[-0.099,0.996],[-0.101,1.007],[-0.090,1.010],[-0.087,1.021],
+ [-0.069,1.021],[-0.052,1.022],[-0.052,1.017],[-0.069,1.010],[-0.064,1.005],
+ [-0.048,1.005],[-0.031,1.005],[-0.031,0.996],[-0.040,0.987],[-0.045,0.980],
+ [-0.052,0.975],[-0.040,0.973],[-0.026,0.968],[-0.020,0.954],[-0.006,0.947],
+ [ 0.003,0.935],[ 0.006,0.926],[ 0.005,0.921],[ 0.022,0.923],[ 0.033,0.912],
+ [ 0.029,0.905],[ 0.017,0.900],[ 0.012,0.895],[ 0.027,0.893],[ 0.019,0.886],
+ [ 0.001,0.883],[-0.012,0.884],[-0.029,0.883],[-0.038,0.879],[-0.057,0.881],
+ [-0.062,0.876],[-0.078,0.876],[-0.087,0.872],[-0.030,0.907],[-0.007,0.905],
+ [-0.057,0.916],[-0.025,0.933],[-0.077,0.990],[-0.059,0.993] ])
+x = xy[:,0]*180/3.14159
+y = xy[:,1]*180/3.14159
+x0 = -5
+y0 = 52
+z = np.exp(-0.01*( (x-x0)*(x-x0) + (y-y0)*(y-y0) ))
+
+triangles = np.asarray([
+ [67,66, 1],[65, 2,66],[ 1,66, 2],[64, 2,65],[63, 3,64],[60,59,57],
+ [ 2,64, 3],[ 3,63, 4],[ 0,67, 1],[62, 4,63],[57,59,56],[59,58,56],
+ [61,60,69],[57,69,60],[ 4,62,68],[ 6, 5, 9],[61,68,62],[69,68,61],
+ [ 9, 5,70],[ 6, 8, 7],[ 4,70, 5],[ 8, 6, 9],[56,69,57],[69,56,52],
+ [70,10, 9],[54,53,55],[56,55,53],[68,70, 4],[52,56,53],[11,10,12],
+ [69,71,68],[68,13,70],[10,70,13],[51,50,52],[13,68,71],[52,71,69],
+ [12,10,13],[71,52,50],[71,14,13],[50,49,71],[49,48,71],[14,16,15],
+ [14,71,48],[17,19,18],[17,20,19],[48,16,14],[48,47,16],[47,46,16],
+ [16,46,45],[23,22,24],[21,24,22],[17,16,45],[20,17,45],[21,25,24],
+ [27,26,28],[20,72,21],[25,21,72],[45,72,20],[25,28,26],[44,73,45],
+ [72,45,73],[28,25,29],[29,25,31],[43,73,44],[73,43,40],[72,73,39],
+ [72,31,25],[42,40,43],[31,30,29],[39,73,40],[42,41,40],[72,33,31],
+ [32,31,33],[39,38,72],[33,72,38],[33,38,34],[37,35,38],[34,38,35],
+ [35,37,36] ])
+
+# Rather than create a Triangulation object, can simply pass x, y and triangles
+# arrays to tripcolor directly. It would be better to use a Triangulation object
+# if the same triangulation was to be used more than once to save duplicated
+# calculations.
+plt.figure()
+plt.gca().set_aspect('equal')
+plt.tricontourf(x, y, triangles, z)
+plt.colorbar()
+plt.title('Contour plot of user-specified triangulation')
+plt.xlabel('Longitude (degrees)')
+plt.ylabel('Latitude (degrees)')
+
+plt.show()
Property changes on: trunk/matplotlib/examples/pylab_examples/tricontour_demo.py
___________________________________________________________________
Added: svn:keywords
+ Id
Added: trunk/matplotlib/examples/pylab_examples/tricontour_vs_griddata.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/tricontour_vs_griddata.py (rev 0)
+++ trunk/matplotlib/examples/pylab_examples/tricontour_vs_griddata.py 2010-05-13 09:13:49 UTC (rev 8316)
@@ -0,0 +1,47 @@
+"""
+Comparison of griddata and tricontour for an unstructured triangular grid.
+"""
+import matplotlib.pyplot as plt
+import matplotlib.tri as tri
+import numpy as np
+from numpy.random import uniform, seed
+from matplotlib.mlab import griddata
+import time
+
+seed(0)
+npts = 200
+ngridx = 100
+ngridy = 200
+x = uniform(-2,2,npts)
+y = uniform(-2,2,npts)
+z = x*np.exp(-x**2-y**2)
+
+# griddata and contour.
+start = time.clock()
+plt.subplot(211)
+xi = np.linspace(-2.1,2.1,ngridx)
+yi = np.linspace(-2.1,2.1,ngridy)
+zi = griddata(x,y,z,xi,yi,interp='linear')
+plt.contour(xi,yi,zi,15,linewidths=0.5,colors='k')
+plt.contourf(xi,yi,zi,15,cmap=plt.cm.jet)
+plt.colorbar() # draw colorbar
+plt.plot(x, y, 'ko', ms=3)
+plt.xlim(-2,2)
+plt.ylim(-2,2)
+plt.title('griddata and contour (%d points, %d grid points)' % (npts, ngridx*ngridy))
+print 'griddata and contour seconds:', time.clock() - start
+
+# tricontour.
+start = time.clock()
+plt.subplot(212)
+triang = tri.Triangulation(x, y)
+plt.tricontour(x, y, z, 15, linewidths=0.5, colors='k')
+plt.tricontourf(x, y, z, 15, cmap=plt.cm.jet)
+plt.colorbar()
+plt.plot(x, y, 'ko', ms=3)
+plt.xlim(-2,2)
+plt.ylim(-2,2)
+plt.title('tricontour (%d points)' % npts)
+print 'tricontour seconds:', time.clock() - start
+
+plt.show()
Property changes on: trunk/matplotlib/examples/pylab_examples/tricontour_vs_griddata.py
___________________________________________________________________
Added: svn:keywords
+ Id
Added: trunk/matplotlib/examples/pylab_examples/tripcolor_demo.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/tripcolor_demo.py (rev 0)
+++ trunk/matplotlib/examples/pylab_examples/tripcolor_demo.py 2010-05-13 09:13:49 UTC (rev 8316)
@@ -0,0 +1,98 @@
+"""
+Pseudocolor plots of unstructured triangular grids.
+"""
+import matplotlib.pyplot as plt
+import matplotlib.tri as tri
+import numpy as np
+import math
+
+# Creating a Triangulation without specifying the triangles results in the
+# Delaunay triangulation of the points.
+
+# First create the x and y coordinates of the points.
+n_angles = 36
+n_radii = 8
+min_radius = 0.25
+radii = np.linspace(min_radius, 0.95, n_radii)
+
+angles = np.linspace(0, 2*math.pi, n_angles, endpoint=False)
+angles = np.repeat(angles[...,np.newaxis], n_radii, axis=1)
+angles[:,1::2] += math.pi/n_angles
+
+x = (radii*np.cos(angles)).flatten()
+y = (radii*np.sin(angles)).flatten()
+z = (np.cos(radii)*np.cos(angles*3.0)).flatten()
+
+# Create the Triangulation; no triangles so Delaunay triangulation created.
+triang = tri.Triangulation(x, y)
+
+# Mask off unwanted triangles.
+xmid = x[triang.triangles].mean(axis=1)
+ymid = y[triang.triangles].mean(axis=1)
+mask = np.where(xmid*xmid + ymid*ymid < min_radius*min_radius, 1, 0)
+triang.set_mask(mask)
+
+# pcolor plot.
+plt.figure()
+plt.gca().set_aspect('equal')
+plt.tripcolor(triang, z, shading='faceted')
+plt.colorbar()
+plt.title('tripcolor of Delaunay triangulation')
+
+
+# You can specify your own triangulation rather than perform a Delaunay
+# triangulation of the points, where each triangle is given by the indices of
+# the three points that make up the triangle, ordered in either a clockwise or
+# anticlockwise manner.
+
+xy = np.asarray([
+ [-0.101,0.872],[-0.080,0.883],[-0.069,0.888],[-0.054,0.890],[-0.045,0.897],
+ [-0.057,0.895],[-0.073,0.900],[-0.087,0.898],[-0.090,0.904],[-0.069,0.907],
+ [-0.069,0.921],[-0.080,0.919],[-0.073,0.928],[-0.052,0.930],[-0.048,0.942],
+ [-0.062,0.949],[-0.054,0.958],[-0.069,0.954],[-0.087,0.952],[-0.087,0.959],
+ [-0.080,0.966],[-0.085,0.973],[-0.087,0.965],[-0.097,0.965],[-0.097,0.975],
+ [-0.092,0.984],[-0.101,0.980],[-0.108,0.980],[-0.104,0.987],[-0.102,0.993],
+ [-0.115,1.001],[-0.099,0.996],[-0.101,1.007],[-0.090,1.010],[-0.087,1.021],
+ [-0.069,1.021],[-0.052,1.022],[-0.052,1.017],[-0.069,1.010],[-0.064,1.005],
+ [-0.048,1.005],[-0.031,1.005],[-0.031,0.996],[-0.040,0.987],[-0.045,0.980],
+ [-0.052,0.975],[-0.040,0.973],[-0.026,0.968],[-0.020,0.954],[-0.006,0.947],
+ [ 0.003,0.935],[ 0.006,0.926],[ 0.005,0.921],[ 0.022,0.923],[ 0.033,0.912],
+ [ 0.029,0.905],[ 0.017,0.900],[ 0.012,0.895],[ 0.027,0.893],[ 0.019,0.886],
+ [ 0.001,0.883],[-0.012,0.884],[-0.029,0.883],[-0.038,0.879],[-0.057,0.881],
+ [-0.062,0.876],[-0.078,0.876],[-0.087,0.872],[-0.030,0.907],[-0.007,0.905],
+ [-0.057,0.916],[-0.025,0.933],[-0.077,0.990],[-0.059,0.993] ])
+x = xy[:,0]*180/3.14159
+y = xy[:,1]*180/3.14159
+x0 = -5
+y0 = 52
+z = np.exp(-0.01*( (x-x0)*(x-x0) + (y-y0)*(y-y0) ))
+
+triangles = np.asarray([
+ [67,66, 1],[65, 2,66],[ 1,66, 2],[64, 2,65],[63, 3,64],[60,59,57],
+ [ 2,64, 3],[ 3,63, 4],[ 0,67, 1],[62, 4,63],[57,59,56],[59,58,56],
+ [61,60,69],[57,69,60],[ 4,62,68],[ 6, 5, 9],[61,68,62],[69,68,61],
+ [ 9, 5,70],[ 6, 8, 7],[ 4,70, 5],[ 8, 6, 9],[56,69,57],[69,56,52],
+ [70,10, 9],[54,53,55],[56,55,53],[68,70, 4],[52,56,53],[11,10,12],
+ [69,71,68],[68,13,70],[10,70,13],[51,50,52],[13,68,71],[52,71,69],
+ [12,10,13],[71,52,50],[71,14,13],[50,49,71],[49,48,71],[14,16,15],
+ [14,71,48],[17,19,18],[17,20,19],[48,16,14],[48,47,16],[47,46,16],
+ [16,46,45],[23,22,24],[21,24,22],[17,16,45],[20,17,45],[21,25,24],
+ [27,26,28],[20,72,21],[25,21,72],[45,72,20],[25,28,26],[44,73,45],
+ [72,45,73],[28,25,29],[29,25,31],[43,73,44],[73,43,40],[72,73,39],
+ [72,31,25],[42,40,43],[31,30,29],[39,73,40],[42,41,40],[72,33,31],
+ [32,31,33],[39,38,72],[33,72,38],[33,38,34],[37,35,38],[34,38,35],
+ [35,37,36] ])
+
+# Rather than create a Triangulation object, can simply pass x, y and triangles
+# arrays to tripcolor directly. It would be better to use a Triangulation object
+# if the same triangulation was to be used more than once to save duplicated
+# calculations.
+plt.figure()
+plt.gca().set_aspect('equal')
+plt.tripcolor(x, y, triangles, z, shading='faceted')
+plt.colorbar()
+plt.title('tripcolor of user-specified triangulation')
+plt.xlabel('Longitude (degrees)')
+plt.ylabel('Latitude (degrees)')
+
+plt.show()
Property changes on: trunk/matplotlib/examples/pylab_examples/tripcolor_demo.py
___________________________________________________________________
Added: svn:keywords
+ Id
Added: trunk/matplotlib/examples/pylab_examples/triplot_demo.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/triplot_demo.py (rev 0)
+++ trunk/matplotlib/examples/pylab_examples/triplot_demo.py 2010-05-13 09:13:49 UTC (rev 8316)
@@ -0,0 +1,92 @@
+"""
+Creating and plotting unstructured triangular grids.
+"""
+import matplotlib.pyplot as plt
+import matplotlib.tri as tri
+import numpy as np
+import math
+
+# Creating a Triangulation without specifying the triangles results in the
+# Delaunay triangulation of the points.
+
+# First create the x and y coordinates of the points.
+n_angles = 36
+n_radii = 8
+min_radius = 0.25
+radii = np.linspace(min_radius, 0.95, n_radii)
+
+angles = np.linspace(0, 2*math.pi, n_angles, endpoint=False)
+angles = np.repeat(angles[...,np.newaxis], n_radii, axis=1)
+angles[:,1::2] += math.pi/n_angles
+
+x = (radii*np.cos(angles)).flatten()
+y = (radii*np.sin(angles)).flatten()
+
+# Create the Triangulation; no triangles so Delaunay triangulation created.
+triang = tri.Triangulation(x, y)
+
+# Mask off unwanted triangles.
+xmid = x[triang.triangles].mean(axis=1)
+ymid = y[triang.triangles].mean(axis=1)
+mask = np.where(xmid*xmid + ymid*ymid < min_radius*min_radius, 1, 0)
+triang.set_mask(mask)
+
+# Plot the triangulation.
+plt.figure()
+plt.gca().set_aspect('equal')
+plt.triplot(triang, 'bo-')
+plt.title('triplot of Delaunay triangulation')
+
+
+# You can specify your own triangulation rather than perform a Delaunay
+# triangulation of the points, where each triangle is given by the indices of
+# the three points that make up the triangle, ordered in either a clockwise or
+# anticlockwise manner.
+
+xy = np.asarray([
+ [-0.101,0.872],[-0.080,0.883],[-0.069,0.888],[-0.054,0.890],[-0.045,0.897],
+ [-0.057,0.895],[-0.073,0.900],[-0.087,0.898],[-0.090,0.904],[-0.069,0.907],
+ [-0.069,0.921],[-0.080,0.919],[-0.073,0.928],[-0.052,0.930],[-0.048,0.942],
+ [-0.062,0.949],[-0.054,0.958],[-0.069,0.954],[-0.087,0.952],[-0.087,0.959],
+ [-0.080,0.966],[-0.085,0.973],[-0.087,0.965],[-0.097,0.965],[-0.097,0.975],
+ [-0.092,0.984],[-0.101,0.980],[-0.108,0.980],[-0.104,0.987],[-0.102,0.993],
+ [-0.115,1.001],[-0.099,0.996],[-0.101,1.007],[-0.090,1.010],[-0.087,1.021],
+ [-0.069,1.021],[-0.052,1.022],[-0.052,1.017],[-0.069,1.010],[-0.064,1.005],
+ [-0.048,1.005],[-0.031,1.005],[-0.031,0.996],[-0.040,0.987],[-0.045,0.980],
+ [-0.052,0.975],[-0.040,0.973],[-0.026,0.968],[-0.020,0.954],[-0.006,0.947],
+ [ 0.003,0.935],[ 0.006,0.926],[ 0.005,0.921],[ 0.022,0.923],[ 0.033,0.912],
+ [ 0.029,0.905],[ 0.017,0.900],[ 0.012,0.895],[ 0.027,0.893],[ 0.019,0.886],
+ [ 0.001,0.883],[-0.012,0.884],[-0.029,0.883],[-0.038,0.879],[-0.057,0.881],
+ [-0.062,0.876],[-0.078,0.876],[-0.087,0.872],[-0.030,0.907],[-0.007,0.905],
+ [-0.057,0.916],[-0.025,0.933],[-0.077,0.990],[-0.059,0.993] ])
+x = xy[:,0]*180/3.14159
+y = xy[:,1]*180/3.14159
+
+triangles = np.asarray([
+ [67,66, 1],[65, 2,66],[ 1,66, 2],[64, 2,65],[63, 3,64],[60,59,57],
+ [ 2,64, 3],[ 3,63, 4],[ 0,67, 1],[62, 4,63],[57,59,56],[59,58,56],
+ [61,60,69],[57,69,60],[ 4,62,68],[ 6, 5, 9],[61,68,62],[69,68,61],
+ [ 9, 5,70],[ 6, 8, 7],[ 4,70, 5],[ 8, 6, 9],[56,69,57],[69,56,52],
+ [70,10, 9],[54,53,55],[56,55,53],[68,70, 4],[52,56,53],[11,10,12],
+ [69,71,68],[68,13,70],[10,70,13],[51,50,52],[13,68,71],[52,71,69],
+ [12,10,13],[71,52,50],[71,14,13],[50,49,71],[49,48,71],[14,16,15],
+ [14,71,48],[17,19,18],[17,20,19],[48,16,14],[48,47,16],[47,46,16],
+ [16,46,45],[23,22,24],[21,24,22],[17,16,45],[20,17,45],[21,25,24],
+ [27,26,28],[20,72,21],[25,21,72],[45,72,20],[25,28,26],[44,73,45],
+ [72,45,73],[28,25,29],[29,25,31],[43,73,44],[73,43,40],[72,73,39],
+ [72,31,25],[42,40,43],[31,30,29],[39,73,40],[42,41,40],[72,33,31],
+ [32,31,33],[39,38,72],[33,72,38],[33,38,34],[37,35,38],[34,38,35],
+ [35,37,36] ])
+
+# Rather than create a Triangulation object, can simply pass x, y and triangles
+# arrays to triplot directly. It would be better to use a Triangulation object
+# if the same triangulation was to be used more than once to save duplicated
+# calculations.
+plt.figure()
+plt.gca().set_aspect('equal')
+plt.triplot(x, y, triangles, 'go-')
+plt.title('triplot of user-specified triangulation')
+plt.xlabel('Longitude (degrees)')
+plt.ylabel('Latitude (degrees)')
+
+plt.show()
Property changes on: trunk/matplotlib/examples/pylab_examples/triplot_demo.py
___________________________________________________________________
Added: svn:keywords
+ Id
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2010-05-12 17:58:17 UTC (rev 8315)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2010-05-13 09:13:49 UTC (rev 8316)
@@ -32,6 +32,7 @@
import matplotlib.text as mtext
import matplotlib.ticker as mticker
import matplotlib.transforms as mtransforms
+import matplotlib.tri as mtri
iterable = cbook.iterable
@@ -8021,7 +8022,23 @@
self.xaxis.set_minor_locator(mticker.NullLocator())
self.yaxis.set_minor_locator(mticker.NullLocator())
+ def tricontour(self, *args, **kwargs):
+ return mtri.tricontour(self, *args, **kwargs)
+ tricontour.__doc__ = mtri.TriContourSet.tricontour_doc
+ def tricontourf(self, *args, **kwargs):
+ return mtri.tricontourf(self, *args, **kwargs)
+ tricontourf.__doc__ = mtri.TriContourSet.tricontour_doc
+
+ def tripcolor(self, *args, **kwargs):
+ return mtri.tripcolor(self, *args, **kwargs)
+ tripcolor.__doc__ = mtri.tripcolor.__doc__
+
+ def triplot(self, *args, **kwargs):
+ mtri.triplot(self, *args, **kwargs)
+ triplot.__doc__ = mtri.triplot.__doc__
+
+
class SubplotBase:
"""
Base class for subplots, which are :class:`Axes` instances with
Modified: trunk/matplotlib/lib/matplotlib/pyplot.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pyplot.py 2010-05-12 17:58:17 UTC (rev 8315)
+++ trunk/matplotlib/lib/matplotlib/pyplot.py 2010-05-13 09:13:49 UTC (rev 8316)
@@ -2427,6 +2427,78 @@
# This function was autogenerated by boilerplate.py. Do not edit as
# changes will be lost
+@autogen_docstring(Axes.tricontour)
+def tricontour(*args, **kwargs):
+ ax = gca()
+ # allow callers to override the hold state by passing hold=True|False
+ washold = ax.ishold()
+ hold = kwargs.pop('hold', None)
+ if hold is not None:
+ ax.hold(hold)
+ try:
+ ret = ax.tricontour(*args, **kwargs)
+ draw_if_interactive()
+ finally:
+ ax.hold(washold)
+ if ret._A is not None: sci(ret)
+ return ret
+
+# This function was autogenerated by boilerplate.py. Do not edit as
+# changes will be lost
+@autogen_docstring(Axes.tricontourf)
+def tricontourf(*args, **kwargs):
+ ax = gca()
+ # allow callers to override the hold state by passing hold=True|False
+ washold = ax.ishold()
+ hold = kwargs.pop('hold', None)
+ if hold is not None:
+ ax.hold(hold)
+ try:
+ ret = ax.tricontourf(*args, **kwargs)
+ draw_if_interactive()
+ finally:
+ ax.hold(washold)
+ if ret._A is not None: sci(ret)
+ return ret
+
+# This function was autogenerated by boilerplate.py. Do not edit as
+# changes will be lost
+@autogen_docstring(Axes.tripcolor)
+def tripcolor(*args, **kwargs):
+ ax = gca()
+ # allow callers to override the hold state by passing hold=True|False
+ washold = ax.ishold()
+ hold = kwargs.pop('hold', None)
+ if hold is not None:
+ ax.hold(hold)
+ try:
+ ret = ax.tripcolor(*args, **kwargs)
+ draw_if_interactive()
+ finally:
+ ax.hold(washold)
+ sci(ret)
+ return ret
+
+# This function was autogenerated by boilerplate.py. Do not edit as
+# changes will be lost
+@autogen_docstring(Axes.triplot)
+def triplot(*args, **kwargs):
+ ax = gca()
+ # allow callers to override the hold state by passing hold=True|False
+ washold = ax.ishold()
+ hold = kwargs.pop('hold', None)
+ if hold is not None:
+ ax.hold(hold)
+ try:
+ ret = ax.triplot(*args, **kwargs)
+ draw_if_interactive()
+ finally:
+ ax.hold(washold)
+
+ return ret
+
+# This function was autogenerated by boilerplate.py. Do not edit as
+# changes will be lost
@autogen_docstring(Axes.vlines)
def vlines(x, ymin, ymax, colors='k', linestyles='solid', label='', hold=None, **kwargs):
ax = gca()
Added: trunk/matplotlib/lib/matplotlib/tri/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/tri/__init__.py (rev 0)
+++ trunk/matplotlib/lib/matplotlib/tri/__init__.py 2010-05-13 09:13:49 UTC (rev 8316)
@@ -0,0 +1,8 @@
+"""
+Unstructured triangular grid functions.
+"""
+
+from triangulation import *
+from tricontour import *
+from tripcolor import *
+from triplot import *
Property changes on: trunk/matplotlib/lib/matplotlib/tri/__init__.py
___________________________________________________________________
Added: svn:keywords
+ Id
Added: trunk/matplotlib/lib/matplotlib/tri/_tri.cpp
===================================================================
--- trunk/matplotlib/lib/matplotlib/tri/_tri.cpp (rev 0)
+++ trunk/matplotlib/lib/matplotlib/tri/_tri.cpp 2010-05-13 09:13:49 UTC (rev 8316)
@@ -0,0 +1,1112 @@
+#include "_tri.h"
+#include "src/mplutils.h"
+
+#include <algorithm>
+#include <iostream>
+#include <set>
+
+#define MOVETO 1
+#define LINETO 2
+
+
+
+TriEdge::TriEdge()
+ : tri(-1), edge(-1)
+{}
+
+TriEdge::TriEdge(int tri_, int edge_)
+ : tri(tri_), edge(edge_)
+{}
+
+bool TriEdge::operator<(const TriEdge& other) const
+{
+ if (tri != other.tri)
+ return tri < other.tri;
+ else
+ return edge < other.edge;
+}
+
+bool TriEdge::operator==(const TriEdge& other) const
+{
+ return tri == other.tri && edge == other.edge;
+}
+
+bool TriEdge::operator!=(const TriEdge& other) const
+{
+ return !operator==(other);
+}
+
+std::ostream& operator<<(std::ostream& os, const TriEdge& tri_edge)
+{
+ return os << tri_edge.tri << ' ' << tri_edge.edge;
+}
+
+
+
+XY::XY()
+{}
+
+XY::XY(const double& x_, const double& y_)
+ : x(x_), y(y_)
+{}
+
+double XY::angle() const
+{
+ return atan2(y, x);
+}
+
+double XY::cross_z(const XY& other) const
+{
+ return x*other.y - y*other.x;
+}
+
+bool XY::operator==(const XY& other) const
+{
+ return x == other.x && y == other.y;
+}
+
+bool XY::operator!=(const XY& other) const
+{
+ return x != other.x || y != other.y;
+}
+
+bool XY::operator<(const XY& other) const
+{
+ if (y == other.y)
+ return x < other.x;
+ else
+ return y < other.y;
+}
+
+XY XY::operator*(const double& multiplier) const
+{
+ return XY(x*multiplier, y*multiplier);
+}
+
+XY XY::operator+(const XY& other) const
+{
+ return XY(x + other.x, y + other.y);
+}
+
+XY XY::operator-(const XY& other) const
+{
+ return XY(x - other.x, y - other.y);
+}
+
+std::ostream& operator<<(std::ostream& os, const XY& xy)
+{
+ return os << '(' << xy.x << ' ' << xy.y << ')';
+}
+
+
+
+BoundingBox::BoundingBox()
+ : empty(true)
+{}
+
+void BoundingBox::add(const XY& point)
+{
+ if (empty) {
+ empty = false;
+ lower = upper = point;
+ } else {
+ if (point.x < lower.x) lower.x = point.x;
+ else if (point.x > upper.x) upper.x = point.x;
+
+ if (point.y < lower.y) lower.y = point.y;
+ else if (point.y > upper.y) upper.y = point.y;
+ }
+}
+
+bool BoundingBox::contains_x(const double& x) const
+{
+ return !empty && x >= lower.x && x <= upper.x;
+}
+
+std::ostream& operator<<(std::ostream& os, const BoundingBox& box)
+{
+ if (box.empty)
+ return os << "<empty>";
+ else
+ return os << box.lower << " -> " << box.upper;
+}
+
+
+
+ContourLine::ContourLine()
+ : std::vector<XY>()
+{}
+
+void ContourLine::insert_unique(iterator pos, const XY& point)
+{
+ if (empty() || pos == end() || point != *pos)
+ std::vector<XY>::insert(pos, point);
+}
+
+void ContourLine::push_back(const XY& point)
+{
+ if (empty() || point != back())
+ std::vector<XY>::push_back(point);
+}
+
+void ContourLine::write() const
+{
+ std::cout << "ContourLine of " << size() << " points:";
+ for (const_iterator it = begin(); it != end(); ++it)
+ std::cout << ' ' << *it;
+ std::cout << std::endl;
+}
+
+
+
+void write_contour(const Contour& contour)
+{
+ std::cout << "Contour of " << contour.size() << " lines." << std::endl;
+ for (Contour::const_iterator it = contour.begin(); it != contour.end(); ++it)
+ it->write();
+}
+
+
+
+
+Triangulation::Triangulation(PyArrayObject* x,
+ PyArrayObject* y,
+ PyArrayObject* triangles,
+ PyArrayObject* mask,
+ PyArrayObject* edges,
+ PyArrayObject* neighbors)
+ : _npoints(PyArray_DIM(x,0)),
+ _ntri(PyArray_DIM(triangles,0)),
+ _x(x),
+ _y(y),
+ _triangles(triangles),
+ _mask(mask),
+ _edges(edges),
+ _neighbors(neighbors)
+{
+ _VERBOSE("Triangulation::Triangulation");
+ correct_triangles();
+}
+
+Triangulation::~Triangulation()
+{
+ _VERBOSE("Triangulation::~Triangulation");
+ Py_XDECREF(_x);
+ Py_XDECREF(_y);
+ Py_XDECREF(_triangles);
+ Py_XDECREF(_mask);
+ Py_XDECREF(_edges);
+ Py_XDECREF(_neighbors);
+}
+
+void Triangulation::calculate_boundaries()
+{
+ _VERBOSE("Triangulation::calculate_boundaries");
+
+ get_neighbors(); // Ensure _neighbors has been created.
+
+ // Create set of all boundary TriEdges, which are those which do not
+ // have a neighbor triangle.
+ typedef std::set<TriEdge> BoundaryEdges;
+ BoundaryEdges boundary_edges;
+ for (int tri = 0; tri < _ntri; ++tri) {
+ if (!is_masked(tri)) {
+ for (int edge = 0; edge < 3; ++edge) {
+ if (get_neighbor(tri, edge) == -1) {
+ boundary_edges.insert(TriEdge(tri, edge));
+ }
+ }
+ }
+ }
+
+ // Take any boundary edge and follow the boundary until return to start
+ // point, removing edges from boundary_edges as they are used. At the same
+ // time, initialise the _tri_edge_to_boundary_map.
+ while (!boundary_edges.empty()) {
+ // Start of new boundary.
+ BoundaryEdges::iterator it = boundary_edges.begin();
+ int tri = it->tri;
+ int edge = it->edge;
+ _boundaries.push_back(Boundary());
+ Boundary& boundary = _boundaries.back();
+
+ while (true) {
+ boundary.push_back(TriEdge(tri, edge));
+ boundary_edges.erase(it);
+ _tri_edge_to_boundary_map[TriEdge(tri, edge)] =
+ BoundaryEdge(_boundaries.size()-1, boundary.size()-1);
+
+ // Move to next edge of current triangle.
+ edge = (edge+1) % 3;
+
+ // Find start point index of boundary edge.
+ int point = get_triangle_point(tri, edge);
+
+ // Find next TriEdge by traversing neighbors until find one
+ // without a neighbor.
+ while (get_neighbor(tri, edge) != -1) {
+ tri = get_neighbor(tri, edge);
+ edge = get_edge_in_triangle(tri, point);
+ }
+
+ if (TriEdge(tri,edge) == boundary.front())
+ break; // Reached beginning of this boundary, so finished it.
+ else
+ it = boundary_edges.find(TriEdge(tri, edge));
+ }
+ }
+}
+
+void Triangulation::calculate_edges()
+{
+ _VERBOSE("Triangulation::calculate_edges");
+ Py_XDECREF(_edges);
+
+ // Create set of all edges, storing them with start point index less than
+ // end point index.
+ typedef std::set<Edge> EdgeSet;
+ EdgeSet edge_set;
+ for (int tri = 0; tri < _ntri; ++tri) {
+ if (!is_masked(tri)) {
+ for (int edge = 0; edge < 3; edge++) {
+ int start = get_triangle_point(tri, edge);
+ int end = get_triangle_point(tri, (edge+1)%3);
+ edge_set.insert(start > end ? Edge(start,end) : Edge(end,start));
+ }
+ }
+ }
+
+ // Convert to python _edges array.
+ npy_intp dims[2] = {edge_set.size(), 2};
+ _edges = (PyArrayObject*)PyArray_SimpleNew(2, dims, PyArray_INT);
+ int* edges_ptr = (int*)PyArray_DATA(_edges);
+ for (EdgeSet::const_iterator it = edge_set.begin(); it != edge_set.end(); ++it) {
+ *edges_ptr++ = it->start;
+ *edges_ptr++ = it->end;
+ }
+}
+
+void Triangulation::calculate_neighbors()
+{
+ _VERBOSE("Triangulation::calculate_neighbors");
+ Py_XDECREF(_neighbors);
+
+ // Create _neighbors array with shape (ntri,3) and initialise all to -1.
+ npy_intp dims[2] = {_ntri,3};
+ _neighbors = (PyArrayObject*)PyArray_SimpleNew(2, dims, PyArray_INT);
+ int* neighbors_ptr = (int*)PyArray_DATA(_neighbors);
+ std::fill(neighbors_ptr, neighbors_ptr + 3*_ntri, -1);
+
+ // For each triangle edge (start to end point), find corresponding neighbor
+ // edge from end to start point. Do this by traversing all edges and
+ // storing them in a map from edge to TriEdge. If corresponding neighbor
+ // edge is already in the map, don't need to store new edge as neighbor
+ // already found.
+ typedef std::map<Edge, TriEdge> EdgeToTriEdgeMap;
+ EdgeToTriEdgeMap edge_to_tri_edge_map;
+ for (int tri = 0; tri < _ntri; ++tri) {
+ if (!is_masked(tri)) {
+ for (int edge = 0; edge < 3; ++edge) {
+ int start = get_triangle_point(tri, edge);
+ int end = get_triangle_point(tri, (edge+1)%3);
+ EdgeToTriEdgeMap::iterator it =
+ edge_to_tri_edge_map.find(Edge(end,start));
+ if (it == edge_to_tri_edge_map.end()) {
+ // No neighbor edge exists in the edge_to_tri_edge_map, so
+ // add this edge to it.
+ edge_to_tri_edge_map[Edge(start,end)] = TriEdge(tri,edge);
+ } else {
+ // Neighbor edge found, set the two elements of _neighbors
+ // and remove edge from edge_to_tri_edge_map.
+ neighbors_ptr[3*tri + edge] = it->second.tri;
+ neighbors_ptr[3*it->second.tri + it->second.edge] = tri;
+ edge_to_tri_edge_map.erase(it);
+ }
+ }
+ }
+ }
+
+ // Note that remaining edges in the edge_to_tri_edge_map correspond to
+ // boundary edges, but the boundaries are calculated separately elsewhere.
+}
+
+void Triangulation::correct_triangles()
+{
+ int* triangles_ptr = (int*)PyArray_DATA(_triangles);
+ int* neighbors_ptr = _neighbors != 0 ? (int*)PyArray_DATA(_neighbors) : 0;
+ for (int tri = 0; tri < _ntri; ++tri) {
+ XY point0 = get_point_coords(*triangles_ptr++);
+ XY point1 = get_point_coords(*triangles_ptr++);
+ XY point2 = get_point_coords(*triangles_ptr++);
+ if ( (point1 - point0).cross_z(point2 - point0) < 0.0) {
+ // Triangle points are clockwise, so change them to anticlockwise.
+ std::swap(*(triangles_ptr-2), *(triangles_ptr-1));
+ if (neighbors_ptr)
+ std::swap(*(neighbors_ptr+3*tri+1), *(neighbors_ptr+3*tri+2));
+ }
+ }
+}
+
+const Triangulation::Boundaries& Triangulation::get_boundaries() const
+{
+ _VERBOSE("Triangulation::get_boundaries");
+ if (_boundaries.empty())
+ const_cast<Triangulation*>(this)->calculate_boundaries();
+ return _boundaries;
+}
+
+void Triangulation::get_boundary_edge(const TriEdge& triEdge,
+ int& boundary,
+ int& edge) const
+{
+ get_boundaries(); // Ensure _tri_edge_to_boundary_map has been created.
+ TriEdgeToBoundaryMap::const_iterator it =
+ _tri_edge_to_boundary_map.find(triEdge);
+ assert(it != _tri_edge_to_boundary_map.end() &&
+ "TriEdge is not on a boundary");
+ boundary = it->second.boundary;
+ edge = it->second.edge;
+}
+
+int Triangulation::get_edge_in_triangle(int tri, int point) const
+{
+ assert(tri >= 0 && tri < _ntri && "Triangle index out of bounds");
+ assert(point >= 0 && point < _npoints && "Point index out of bounds.");
+ const int* triangles_ptr = get_triangles_ptr() + 3*tri;
+ for (int edge = 0; edge < 3; ++edge) {
+ if (*triangles_ptr++ == point) return edge;
+ }
+ return -1; // point is not in triangle.
+}
+
+Py::Object Triangulation::get_edges()
+{
+ _VERBOSE("Triangulation::get_edges");
+ if (_edges == 0)
+ calculate_edges();
+ return Py::asObject(Py::new_reference_to((PyObject*)_edges));
+}
+
+int Triangulation::get_neighbor(int tri, int edge) const
+{
+ assert(tri >= 0 && tri < _ntri && "Triangle index out of bounds");
+ assert(edge >= 0 && edge < 3 && "Edge index out of bounds");
+ return get_neighbors_ptr()[3*tri + edge];
+}
+
+TriEdge Triangulation::get_neighbor_edge(int tri, int edge) const
+{
+ int neighbor_tri = get_neighbor(tri, edge);
+ if (neighbor_tri == -1)
+ return TriEdge(-1,-1);
+ else
+ return TriEdge(neighbor_tri,
+ get_edge_in_triangle(neighbor_tri,
+ get_triangle_point(tri,
+ (edge+1)%3)));
+}
+
+Py::Object Triangulation::get_neighbors()
+{
+ _VERBOSE("Triangulation::get_neighbors");
+ if (_neighbors == 0) calculate_neighbors();
+ return Py::asObject(Py::new_reference_to((PyObject*)_neighbors));
+}
+
+const int* Triangulation::get_neighbors_ptr() const
+{
+ if (_neighbors == 0)
+ const_cast<Triangulation*>(this)->calculate_neighbors();
+ return (const int*)PyArray_DATA(_neighbors);
+}
+
+int Triangulation::get_npoints() const
+{
+ return _npoints;
+}
+
+int Triangulation::get_ntri() const
+{
+ return _ntri;
+}
+
+XY Triangulation::get_point_coords(int point) const
+{
+ assert(point >= 0 && point < _npoints && "Point index out of bounds.");
+ return XY( ((const double*)PyArray_DATA(_x))[point],
+ ((const double*)PyArray_DATA(_y))[point] );
+}
+
+int Triangulation::get_triangle_point(int tri, int edge) const
+{
+ assert(tri >= 0 && tri < _ntri && "Triangle index out of bounds");
+ assert(edge >= 0 && edge < 3 && "Edge index out of bounds");
+ return get_triangles_ptr()[3*tri + edge];
+}
+
+int Triangulation::get_triangle_point(const TriEdge& tri_edge) const
+{
+ return get_triangle_point(tri_edge.tri, tri_edge.edge);
+}
+
+const int* Triangulation::get_triangles_ptr() const
+{
+ return (const int*)PyArray_DATA(_triangles);
+}
+
+void Triangulation::init_type()
+{
+ _VERBOSE("Triangulation::init_type");
+
+ behaviors().name("Triangulation");
+ behaviors().doc("Triangulation");
+
+ add_noargs_method("get_edges", &Triangulation::get_edges,
+ "get_edges()");
+ add_noargs_method("get_neighbors", &Triangulation::get_neighbors,
+ "get_neighbors()");
+ add_varargs_method("set_mask", &Triangulation::set_mask,
+ "set_mask(mask)");
+}
+
+bool Triangulation::is_masked(int tri) const
+{
+ assert(tri >= 0 && tri < _ntri && "Triangle index out of bounds.");
+ return _mask && *((bool*)PyArray_DATA(_mask) + tri);
+}
+
+Py::Object Triangulation::set_mask(const Py::Tuple &args)
+{
+ _VERBOSE("Triangulation::set_mask");
+ args.verify_length(1);
+
+ Py_XDECREF(_mask);
+ _mask = 0;
+ if (args[0] != Py::None())
+ {
+ _mask = (PyArrayObject*)PyArray_ContiguousFromObject(
+ args[0].ptr(), PyArray_BOOL, 1, 1);
+ if (_mask == 0 || PyArray_DIM(_mask,0) != PyArray_DIM(_triangles,0)) {
+ Py_XDECREF(_mask);
+ throw Py::ValueError(
+ "mask must be a 1D array with the same length as the triangles array");
+ }
+ }
+
+ // Clear derived fields so they are recalculated when needed.
+ Py_XDECREF(_edges);
+ _edges = 0;
+ Py_XDECREF(_neighbors);
+ _neighbors = 0;
+ _boundaries.clear();
+
+ return Py::None();
+}
+
+void Triangulation::write_boundaries() const
+{
+ const Boundaries& bs = get_boundaries();
+ std::cout << "Number of boundaries: " << bs.size() << std::endl;
+ for (Boundaries::const_iterator it = bs.begin(); it != bs.end(); ++it) {
+ const Boundary& b = *it;
+ std::cout << " Boundary of " << b.size() << " points: ";
+ for (Boundary::const_iterator itb = b.begin(); itb != b.end(); ++itb) {
+ std::cout << *itb << ", ";
+ }
+ std::cout << std::endl;
+ }
+}
+
+
+
+
+TriContourGenerator::TriContourGenerator(Py::Object triangulation,
+ PyArrayObject* z)
+ : _triangulation(triangulation),
+ _z(z),
+ _interior_visited(2*get_triangulation().get_ntri()),
+ _boundaries_visited(0),
+ _boundaries_used(0)
+{
+ _VERBOSE("TriContourGenerator::TriContourGenerator");
+}
+
+TriContourGenerator::~TriContourGenerator()
+{
+ _VERBOSE("TriContourGenerator::~TriContourGenerator");
+ Py_XDECREF(_z);
+}
+
+void TriContourGenerator::clear_visited_flags(bool include_boundaries)
+{
+ // Clear _interiorVisited.
+ std::fill(_interior_visited.begin(), _interior_visited.end(), false);
+
+ if (include_boundaries) {
+ if (_boundaries_visited.empty()) {
+ const Boundaries& boundaries = get_boundaries();
+
+ // Initialise _boundaries_visited.
+ _boundaries_visited.reserve(boundaries.size());
+ for (Boundaries::const_iterator it = boundaries.begin();
+ it != boundaries.end(); ++it)
+ _boundaries_visited.push_back(BoundaryVisited(it->size()));
+
+ // Initialise _boundaries_used.
+ _boundaries_used = BoundariesUsed(boundaries.size());
+ }
+
+ // Clear _boundaries_visited.
+ for (BoundariesVisited::iterator it = _boundaries_visited.begin();
+ it != _boundaries_visited.end(); ++it)
+ fill(it->begin(), it->end(), false);
+
+ // Clear _boundaries_used.
+ fill(_boundaries_used.begin(), _boundaries_used.end(), false);
+ }
+}
+
+Py::Object TriContourGenerator::contour_to_segs(const Contour& contour)
+{
+ Py::List segs(contour.size());
+ for (Contour::size_type i = 0; i < contour.size(); ++i) {
+ const ContourLine& line = contour[i];
+ npy_intp dims[2] = {line.size(),2};
+ PyArrayObject* py_line = (PyArrayObject*)PyArray_SimpleNew(
+ 2, dims, PyArray_DOUBLE);
+ double* p = (double*)PyArray_DATA(py_line);
+ for (ContourLine::const_iterator it = line.begin(); it != line.end(); ++it) {
+ *p++ = it->x;
+ *p++ = it->y;
+ }
+ segs[i] = Py::asObject((PyObject*)py_line);
+ }
+ return segs;
+}
+
+Py::Object TriContourGenerator::contour_to_segs_and_kinds(const Contour& contour)
+{
+ Contour::const_iterator line;
+ ContourLine::const_iterator point;
+
+ // Find total number of points in all contour lines.
+ int n_points = 0;
+ for (line = contour.begin(); line != contour.end(); ++line)
+ n_points += line->size();
+
+ // Create segs array for point coordinates.
+ npy_intp segs_dims[2] = {n_points, 2};
+ PyArrayObject* segs = (PyArrayObject*)PyArray_SimpleNew(
+ 2, segs_dims, PyArray_DOUBLE);
+ double* segs_ptr = (double*)PyArray_DATA(segs);
+
+ // Create kinds array for code types.
+ npy_intp kinds_dims[1] = {n_points};
+ PyArrayObject* kinds = (PyArrayObject*)PyArray_SimpleNew(
+ 1, kinds_dims, PyArray_UBYTE);
+ unsigned char* kinds_ptr = (unsigned char*)PyArray_DATA(kinds);
+
+ for (line = contour.begin(); line != contour.end(); ++line) {
+ for (point = line->begin(); point != line->end(); point++) {
+ *segs_ptr++ = point->x;
+ *segs_ptr++ = point->y;
+ *kinds_ptr++ = (point == line->begin() ? MOVETO : LINETO);
+ }
+ }
+
+ Py::Tuple result(2);
+ result[0] = Py::asObject((PyObject*)segs);
+ result[1] = Py::asObject((PyObject*)kinds);
+ return result;
+}
+
+Py::Object TriContourGenerator::create_contour(const Py::Tuple &args)
+{
+ _VERBOSE("TriContourGenerator::create_contour");
+ args.verify_length(1);
+
+ double level = (Py::Float)args[0];
+
+ clear_visited_flags(false);
+ Contour contour;
+
+ find_boundary_lines(contour, level);
+ find_interior_lines(contour, level, false, false);
+
+ return contour_to_segs(contour);
+}
+
+Py::Object TriContourGenerator::create_filled_contour(const Py::Tuple &args)
+{
+ _VERBOSE("TriContourGenerator::create_filled_contour");
+ args.verify_length(2);
+
+ double lower_level = (Py::Float)args[0];
+ double upper_level = (Py::Float)args[1];
+
+ clear_visited_flags(true);
+ Contour contour;
+
+ find_boundary_lines_filled(contour, lower_level, upper_level);
+ find_interior_lines(contour, lower_level, false, true);
+ find_interior_lines(contour, upper_level, true, true);
+
+ return contour_to_segs_and_kinds(contour);
+}
+
+XY TriContourGenerator::edge_interp(int tri, int edge, const double& level)
+{
+ return interp(get_triangulation().get_triangle_point(tri, edge),
+ get_triangulation().get_triangle_point(tri, (edge+1)%3),
+ level);
+}
+
+void TriContourGenerator::find_boundary_lines(Contour& contour,
+ const double& level)
+{
+ // Traverse boundaries to find starting points for all contour lines that
+ // intersect the boundaries. For each starting point found, follow the
+ // line to its end before continuing.
+ const Triangulation& triang = get_triangulation();
+ const Boundaries& boundaries = get_boundaries();
+ for (Boundaries::const_iterator it = boundaries.begin();
+ it != boundaries.end(); ++it) {
+ const Boundary& boundary = *it;
+ bool startAbove, endAbove = false;
+ for (Boundary::const_iterator itb = boundary.begin();
+ itb != boundary.end(); ++itb) {
+ if (itb == boundary.begin())
+ startAbove = get_z(triang.get_triangle_point(*itb)) >= level;
+ else
+ startAbove = endAbove;
+ endAbove = get_z(triang.get_triangle_point(itb->tri,
+ (itb->edge+1)%3)) >= level;
+ if (startAbove && !endAbove) {
+ // This boundary edge is the start point for a contour line,
+ // so follow the line.
+ contour.push_back(ContourLine());
+ ContourLine& contour_line = contour.back();
+ TriEdge tri_edge = *itb;
+ follow_interior(contour_line, tri_edge, true, level, false);
+ }
+ }
+ }
+}
+
+void TriContourGenerator::find_boundary_lines_filled(Contour& contour,
+ const double& lower_level,
+ const double& upper_level)
+{
+ // Traverse boundaries to find starting points for all contour lines that
+ // intersect the boundaries. For each starting point found, follow the
+ // line to its end before continuing.
+ const Triangulation& triang = get_triangulation();
+ const Boundaries& boundaries = get_boundaries();
+ for (Boundaries::size_type i = 0; i < boundaries.size(); ++i) {
+ const Boundary& boundary = boundaries[i];
+ for (Boundary::size_type j = 0; j < boundary.size(); ++j) {
+ if (!_boundaries_visited[i][j]) {
+ // z values of start and end of this boundary edge.
+ double z_start = get_z(triang.get_triangle_point(boundary[j]));
+ double z_end = get_z(triang.get_triangle_point(
+ boundary[j].tri, (boundary[j].edge+1)%3));
+
+ // Does this boundary edge's z increase through upper level
+ // and/or decrease through lower level?
+ bool incr_upper = (z_start < upper_level && z_end >= upper_level);
+ bool decr_lower = (z_start >= lower_level && z_end < lower_level);
+
+ if (decr_lower || incr_upper) {
+ // Start point for contour line, so follow it.
+ contour.push_back(ContourLine());
+ ContourLine& contour_line = contour.back();
+ TriEdge start_tri_edge = boundary[j];
+ TriEdge tri_edge = start_tri_edge;
+
+ // Traverse interior and boundaries until return to start.
+ bool on_upper = incr_upper;
+ do {
+ follow_interior(contour_line, tri_edge, true,
+ on_upper ? upper_level : lower_level, on_upper);
+ on_upper = follow_boundary(contour_line, tri_edge,
+ lower_level, upper_level, on_upper);
+ } while (tri_edge != start_tri_edge);
+
+ // Filled contour lines must not have same first and last
+ // points.
+ if (contour_line.size() > 1 &&
+ contour_line.front() == contour_line.back())
+ contour_line.pop_back();
+ }
+ }
+ }
+ }
+
+ // Add full boundaries that lie between the lower and upper levels. These
+ // are boundaries that have not been touched by an internal contour line
+ // which are stored in _boundaries_used.
+ for (Boundaries::size_type i = 0; i < boundaries.size(); ++i) {
+ if (!_boundaries_used[i]) {
+ const Boundary& boundary = boundaries[i];
+ double z = get_z(triang.get_triangle_point(boundary[0]));
+ if (z >= lower_level && z < upper_level) {
+ contour.push_back(ContourLine());
+ ContourLine& contour_line = contour.back();
+ for (Boundary::size_type j = 0; j < boundary.size(); ++j)
+ contour_line.push_back(triang.get_point_coords(
+ triang.get_triangle_point(boundary[j])));
+ }
+ }
+ }
+}
+
+void TriContourGenerator::find_interior_lines(Contour& contour,
+ const double& level,
+ bool on_upper,
+ bool filled)
+{
+ const Triangulation& triang = get_triangulation();
+ int ntri = triang.get_ntri();
+ for (int tri = 0; tri < ntri; ++tri) {
+ int visited_index = (on_upper ? tri+ntri : tri);
+
+ if (_interior_visited[visited_index] || triang.is_masked(tri))
+ continue; // Triangle has already been visited or is masked.
+
+ _interior_visited[visited_index] = true;
+
+ // Determine edge via which to leave this triangle.
+ int edge = get_exit_edge(tri, level, on_upper);
+ assert(edge >= -1 && edge < 3 && "Invalid exit edge");
+ if (edge == -1)
+ continue; // Contour does not pass through this triangle.
+
+ // Found start of new contour line loop.
+ contour.push_back(ContourLine());
+ ContourLine& contour_line = contour.back();
+ TriEdge tri_edge = triang.get_neighbor_edge(tri, edge);
+ follow_interior(contour_line, tri_edge, false, level, on_upper);
+
+ if (!filled)
+ // Non-filled contour lines must be closed.
+ contour_line.push_back(contour_line.front());
+ else if (contour_line.size() > 1 &&
+ contour_line.front() == contour_line.back())
+ // Filled contour lines must not have same first and last points.
+ contour_line.pop_back();
+ }
+}
+
+bool TriContourGenerator::follow_boundary(ContourLine& contour_line,
+ TriEdge& tri_edge,
+ const double& lower_level,
+ const double& upper_level,
+ bool on_upper)
+{
+ const Triangulation& triang = get_triangulation();
+ const Boundaries& boundaries = get_boundaries();
+
+ // Have TriEdge to start at, need equivalent boundary edge.
+ int boundary, edge;
+ triang.get_boundary_edge(tri_edge, boundary, edge);
+ _boundaries_used[boundary] = true;
+
+ bool stop = false;
+ bool first_edge = true;
+ double z_start, z_end = 0;
+ while (!stop)
+ {
+ assert(!_boundaries_visited[boundary][edge] && "Boundary already visited");
+ _boundaries_visited[boundary][edge] = true;
+
+ // z values of start and end points of boundary edge.
+ if (first_edge)
+ z_start = get_z(triang.get_triangle_point(tri_edge));
+ else
+ z_start = z_end;
+ z_end = get_z(triang.get_triangle_point(tri_edge.tri,
+ (tri_edge.edge+1)%3));
+
+ if (z_end > z_start) { // z increasing.
+ if (!(!on_upper && first_edge) &&
+ z_end >= lower_level && z_start < lower_level) {
+ stop = true;
+ on_upper = false;
+ } else if (z_end >= upper_level && z_start < upper_level) {
+ stop = true;
+ on_upper = true;
+ }
+ } else { // z decreasing.
+ if (!(on_upper && first_edge) &&
+ z_start >= upper_level && z_end < upper_level) {
+ stop = true;
+ on_upper = true;
+ } else if (z_start >= lower_level && z_end < lower_level) {
+ stop = true;
+ on_upper = false;
+ }
+ }
+
+ first_edge = false;
+
+ if (!stop) {
+ // Move to next boundary edge, adding point to contour line.
+ edge = (edge+1) % (int)boundaries[boundary].size();
+ tri_edge = boundaries[boundary][edge];
+ contour_line.push_back(triang.get_point_coords(
+ triang.get_triangle_point(tri_edge)));
+ }
+ }
+
+ return on_upper;
+}
+
+void TriContourGenerator::follow_interior(ContourLine& contour_line,
+ TriEdge& tri_edge,
+ bool end_on_boundary,
+ const double& level,
+ bool on_upper)
+{
+ int& tri = tri_edge.tri;
+ int& edge = tri_edge.edge;
+
+ // Initial point.
+ contour_line.push_back(edge_interp(tri, edge, level));
+
+ while (true) {
+ int visited_index = tri;
+ if (on_upper)
+ visited_index += get_triangulation().get_ntri();
+
+ // Check for end not on boundary.
+ if (!end_on_boundary && _interior_visited[visited_index])
+ break; // Reached start point, so return.
+
+ // Determine edge by which to leave this triangle.
+ edge = get_exit_edge(tri, level, on_upper);
+ assert(edge >= 0 && edge < 3 && "Invalid exit edge");
+
+ _interior_visited[visited_index] = true;
+
+ // Append new point to point set.
+ assert(edge >= 0 && edge < 3 && "Invalid triangle edge");
+ contour_line.push_back(edge_interp(tri, edge, level));
+
+ // Move to next triangle.
+ TriEdge next_tri_edge = get_triangulation().get_neighbor_edge(tri,edge);
+
+ // Check if ending on a boundary.
+ if (end_on_boundary && next_tri_edge.tri == -1)
+ break;
+
+ tri_edge = next_tri_edge;
+ assert(tri_edge.tri != -1 && "Invalid triangle for internal loop");
+ }
+}
+
+const TriContourGenerator::Boundaries& TriContourGenerator::get_boundaries() const
+{
+ return get_triangulation().get_boundaries();
+}
+
+int TriContourGenerator::get_exit_edge(int tri,
+ const double& level,
+ bool on_upper) const
+{
+ assert(tri >= 0 && tri < get_triangulation().get_ntri() &&
+ "Triangle index out of bounds.");
+
+ unsigned int config =
+ (get_z(get_triangulation().get_triangle_point(tri, 0)) >= level) |
+ (get_z(get_triangulation().get_triangle_point(tri, 1)) >= level) << 1 |
+ (get_z(get_triangulation().get_triangle_point(tri, 2)) >= level) << 2;
+
+ if (on_upper) config = 7-config;
+
+ switch (config) {
+ case 0: return -1;
+ case 1: return 2;
+ case 2: return 0;
+ case 3: return 2;
+ case 4: return 1;
+ case 5: return 1;
+ case 6: return 0;
+ case 7: return -1;
+ default: assert(0 && "Invalid config value"); return -1;
+ }
+}
+
+const Triangulation& TriContourGenerator::get_triangulation() const
+{
+ return *(Triangulation*)_triangulation.ptr();
+}
+
+const double& TriContourGenerator::get_z(int point) const
+{
+ assert(point >= 0 && point < get_triangulation().get_npoints() &&
+ "Point index out of bounds.");
+ return ((const double*)PyArray_DATA(_z))[point];
+}
+
+void TriContourGenerator::init_type()
+{
+ _VERBOSE("TriContourGenerator::init_type");
+
+ behaviors().name("TriContourGenerator");
+ behaviors().doc("TriContourGenerator");
+
+ add_varargs_method("create_contour",
+ &TriContourGenerator::create_contour,
+ "create_contour(level)");
+ add_varargs_method("create_filled_contour",
+ &TriContourGenerator::create_filled_contour,
+ "create_filled_contour(lower_level, upper_level)");
+}
+
+XY TriContourGenerator::interp(int point1,
+ int point2,
+ const double& level) const
+{
+ assert(point1 >= 0 && point1 < get_triangulation().get_npoints() &&
+ "Point index 1 out of bounds.");
+ assert(point2 >= 0 && point2 < get_triangulation().get_npoints() &&
+ "Point index 2 out of bounds.");
+ assert(point1 != point2 && "Identical points");
+ double fraction = (get_z(point2) - level) / (get_z(point2) - get_z(point1));
+ return get_triangulation().get_point_coords(point1)*fraction +
+ get_triangulation().get_point_coords(point2)*(1.0 - fraction);
+}
+
+
+
+
+
+#if defined(_MSC_VER)
+DL_EXPORT(void)
+#elif defined(__cplusplus)
+extern "C" void
+#else
+void
+#endif
+init_tri()
+{
+ static TriModule* triModule = new TriModule;
+ import_array();
+}
+
+TriModule::TriModule()
+ : Py::ExtensionModule<TriModule>("tri")
+{
+ Triangulation::init_type();
+ TriContourGenerator::init_type();
+
+ add_varargs_method("Triangulation", &TriModule::new_triangulation,
+ "Create and return new C++ Triangulation object");
+ add_varargs_method("TriContourGenerator", &TriModule::new_tricontourgenerator,
+ "Create and return new C++ TriContourGenerator object");
+
+ initialize("Module for unstructured triangular grids");
+}
+
+Py::Object TriModule::new_triangulation(const Py::Tuple &args)
+{
+ _VERBOSE("TriModule::new_triangulation");
+ args.verify_length(6);
+
+ // x and y.
+ PyArrayObject* x = (PyArrayObject*)PyArray_ContiguousFromObject(
+ args[0].ptr(), PyArray_DOUBLE, 1, 1);
+ PyArrayObject* y = (PyArrayObject*)PyArray_ContiguousFromObject(
+ args[1].ptr(), PyArray_DOUBLE, 1, 1);
+ if (x == 0 || y == 0 || PyArray_DIM(x,0) != PyArray_DIM(y,0)) {
+ Py_XDECREF(x);
+ Py_XDECREF(y);
+ throw Py::ValueError("x and y must be 1D arrays of the same length");
+ }
+
+ // triangles.
+ PyArrayObject* triangles = (PyArrayObject*)PyArray_ContiguousFromObject(
+ args[2].ptr(), PyArray_INT, 2, 2);
+ if (triangles == 0 || PyArray_DIM(triangles,1) != 3) {
+ Py_XDECREF(x);
+ Py_XDECREF(y);
+ Py_XDECREF(triangles);
+ throw Py::ValueError("triangles must be a 2D array of shape (?,3)");
+ }
+
+ // Optiona...
[truncated message content] |