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: <js...@us...> - 2009-03-07 21:52:38
|
Revision: 6962
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6962&view=rev
Author: jswhit
Date: 2009-03-07 21:52:21 +0000 (Sat, 07 Mar 2009)
Log Message:
-----------
add new example showing how to plot H's and L's on a pressure map (uses scipy)
Modified Paths:
--------------
trunk/toolkits/basemap/MANIFEST.in
trunk/toolkits/basemap/examples/README
trunk/toolkits/basemap/examples/run_all.py
Added Paths:
-----------
trunk/toolkits/basemap/examples/plothighsandlows.py
Modified: trunk/toolkits/basemap/MANIFEST.in
===================================================================
--- trunk/toolkits/basemap/MANIFEST.in 2009-03-07 19:32:39 UTC (rev 6961)
+++ trunk/toolkits/basemap/MANIFEST.in 2009-03-07 21:52:21 UTC (rev 6962)
@@ -11,6 +11,7 @@
include setup.cfg
include setupegg.py
include src/*
+include examples/plothighsandlows.py
include examples/save_background.py
include examples/embedding_map_in_wx.py
include examples/cubed_sphere.py
Modified: trunk/toolkits/basemap/examples/README
===================================================================
--- trunk/toolkits/basemap/examples/README 2009-03-07 19:32:39 UTC (rev 6961)
+++ trunk/toolkits/basemap/examples/README 2009-03-07 21:52:21 UTC (rev 6962)
@@ -125,3 +125,6 @@
figure (without having to redraw coastlines).
maskoceans.py shows how to mask 'wet' areas on a plot.
+
+plothighsandlows.py shows to plot H's and L's at the local extrema of a pressure map
+(requires scipy).
Added: trunk/toolkits/basemap/examples/plothighsandlows.py
===================================================================
--- trunk/toolkits/basemap/examples/plothighsandlows.py (rev 0)
+++ trunk/toolkits/basemap/examples/plothighsandlows.py 2009-03-07 21:52:21 UTC (rev 6962)
@@ -0,0 +1,89 @@
+"""
+plot H's and L's on a sea-level pressure map
+"""
+import numpy as np
+import matplotlib.pyplot as plt
+import sys
+from mpl_toolkits.basemap import Basemap, NetCDFFile, addcyclic
+from scipy.ndimage.filters import minimum_filter, maximum_filter
+
+def extrema(mat,mode='wrap',window=10):
+ mn = minimum_filter(mat, size=window, mode=mode)
+ mx = maximum_filter(mat, size=window, mode=mode)
+ # (mat == mx) true if pixel is equal to the local max
+ # The next computation suppresses responses where
+ # the function is flat.
+ local_maxima = ((mat == mx) & (mat != mn))
+ local_minima = ((mat == mn) & (mat != mx))
+ # Get the indices of the maxima, minima
+ return np.nonzero(local_minima), np.nonzero(local_maxima)
+
+if len(sys.argv) < 2:
+ print 'enter date to plot (YYYYMMDDHH) on command line'
+ raise SystemExit
+
+# get date from command line.
+YYYYMMDDHH = sys.argv[1]
+
+# open OpenDAP dataset.
+data=NetCDFFile("http://nomad1.ncep.noaa.gov:9090/dods/gdas/rotating/gdas"+YYYYMMDDHH)
+
+# read lats,lons.
+lats = data.variables['lat'][:]
+lons1 = data.variables['lon'][:]
+nlats = len(lats)
+nlons = len(lons1)
+# read prmsl, convert to hPa (mb).
+prmsl = 0.01*data.variables['prmslmsl'][0]
+# the window parameter controls the number of highs and lows detected.
+# (higher value, fewer highs and lows)
+local_min, local_max = extrema(prmsl, mode='wrap', window=25)
+# create Basemap instance.
+m = Basemap(llcrnrlon=0,llcrnrlat=-65,urcrnrlon=360,urcrnrlat=65,projection='merc')
+# add wrap-around point in longitude.
+prmsl, lons = addcyclic(prmsl, lons1)
+# contour levels
+clevs = np.arange(900,1100.,5.)
+# find x,y of map projection grid.
+lons, lats = np.meshgrid(lons, lats)
+x, y = m(lons, lats)
+# create figure.
+fig=plt.figure(figsize=(12,6))
+cs = m.contour(x,y,prmsl,clevs,colors='k',linewidths=1.)
+m.drawcoastlines(linewidth=1.25)
+m.fillcontinents(color='0.8')
+m.drawparallels(np.arange(-80,81,20))
+m.drawmeridians(np.arange(0,360,60))
+xlows = x[local_min]; xhighs = x[local_max]
+ylows = y[local_min]; yhighs = y[local_max]
+lowvals = prmsl[local_min]; highvals = prmsl[local_max]
+# plot lows as blue L's, with min pressure value underneath.
+xyplotted = []
+# don't plot if there is already a L or H within dmin meters.
+dmin = 500000
+for x,y,p in zip(xlows, ylows, lowvals):
+ if x < m.xmax and x > m.xmin and y < m.ymax and y > m.ymin:
+ dist = [np.sqrt((x-x0)**2+(y-y0)**2) for x0,y0 in xyplotted]
+ if not dist or min(dist) > dmin:
+ plt.text(x,y,'L',fontsize=14,fontweight='bold',
+ horizontalalignment='center',
+ verticalalignment='center',color='blue')
+ plt.text(x,y-400000,repr(int(p)),fontsize=9,
+ horizontalalignment='center',
+ verticalalignment='top',color='blue')
+ xyplotted.append((x,y))
+# plot highs as red H's, with max pressure value underneath.
+xyplotted = []
+for x,y,p in zip(xhighs, yhighs, highvals):
+ if x < m.xmax and x > m.xmin and y < m.ymax and y > m.ymin:
+ dist = [np.sqrt((x-x0)**2+(y-y0)**2) for x0,y0 in xyplotted]
+ if not dist or min(dist) > dmin:
+ plt.text(x,y,'H',fontsize=14,fontweight='bold',
+ horizontalalignment='center',
+ verticalalignment='center',color='red')
+ plt.text(x,y-400000,repr(int(p)),fontsize=9,
+ horizontalalignment='center',
+ verticalalignment='top',color='red')
+ xyplotted.append((x,y))
+plt.title('Mean Sea-Level Pressure (with Highs and Lows) %s' % YYYYMMDDHH)
+plt.show()
Modified: trunk/toolkits/basemap/examples/run_all.py
===================================================================
--- trunk/toolkits/basemap/examples/run_all.py 2009-03-07 19:32:39 UTC (rev 6961)
+++ trunk/toolkits/basemap/examples/run_all.py 2009-03-07 21:52:21 UTC (rev 6962)
@@ -6,7 +6,8 @@
test_files.remove('pnganim.py')
test_files.remove('geos_demo_2.py')
test_files.remove('plotsst.py')
-test_files.remove('embedding_map_in_wx.py')
+test_files.remove('embedding_map_in_wx.py') # requires wx
+test_files.remove('plothighsandlows.py') # requires scipy
print test_files
py_path = os.environ.get('PYTHONPATH')
if py_path is None:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2009-03-07 19:32:52
|
Revision: 6961
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6961&view=rev
Author: efiring
Date: 2009-03-07 19:32:39 +0000 (Sat, 07 Mar 2009)
Log Message:
-----------
Merged revisions 6960 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r6960 | efiring | 2009-03-07 09:19:40 -1000 (Sat, 07 Mar 2009) | 4 lines
Remove references to handle graphics;
it is registered trademark of Mathworks, and the pyplot resemblance
is only superficial.
........
Modified Paths:
--------------
trunk/matplotlib/doc/_templates/index.html
trunk/matplotlib/doc/pyplots/tex_demo.png
trunk/matplotlib/doc/users/pyplot_tutorial.rst
trunk/matplotlib/examples/pylab_examples/axes_props.py
trunk/matplotlib/lib/matplotlib/pylab.py
trunk/matplotlib/lib/matplotlib/pyplot.py
Property Changed:
----------------
trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
trunk/matplotlib/doc/sphinxext/gen_gallery.py
trunk/matplotlib/doc/sphinxext/gen_rst.py
trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6952
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6960
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960
Modified: trunk/matplotlib/doc/_templates/index.html
===================================================================
--- trunk/matplotlib/doc/_templates/index.html 2009-03-07 19:19:40 UTC (rev 6960)
+++ trunk/matplotlib/doc/_templates/index.html 2009-03-07 19:32:39 UTC (rev 6961)
@@ -35,7 +35,7 @@
<p>For the power user, you have full control of line styles, font
properties, axes properties, etc, via an object oriented interface
- or via a handle graphics interface familiar to Matlab® users.
+ or via a set of functions familiar to Matlab® users.
The pylab mode provides all of the <a href="api/pyplot_api.html">pyplot</a> plotting
functions listed below, as well as non-plotting functions from
<a href="http://scipy.org/Numpy_Example_List_With_Doc">numpy</a> and
@@ -473,7 +473,7 @@
</th>
<td align="left">
- get a handle graphics property
+ get a graphics property
</td>
</tr>
@@ -792,7 +792,7 @@
</th>
<td align="left">
- set a handle graphics property
+ set a graphics property
</td>
</tr>
Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952
+ /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960
Modified: trunk/matplotlib/doc/pyplots/tex_demo.png
===================================================================
(Binary files differ)
Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952
+ /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960
Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952
+ /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960
Modified: trunk/matplotlib/doc/users/pyplot_tutorial.rst
===================================================================
--- trunk/matplotlib/doc/users/pyplot_tutorial.rst 2009-03-07 19:19:40 UTC (rev 6960)
+++ trunk/matplotlib/doc/users/pyplot_tutorial.rst 2009-03-07 19:32:39 UTC (rev 6961)
@@ -78,10 +78,10 @@
line.set_antialiased(False) # turn off antialising
* Use the :func:`~matplotlib.pyplot.setp` command. The example below
- uses matlab handle graphics style command to set multiple properties
+ uses a Matlab-style command to set multiple properties
on a list of lines. ``setp`` works transparently with a list of objects
or a single object. You can either use python keyword arguments or
- matlab-style string/value pairs::
+ Matlab-style string/value pairs::
lines = plt.plot(x1, y1, x2, y2)
# use keyword args
Modified: trunk/matplotlib/examples/pylab_examples/axes_props.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/axes_props.py 2009-03-07 19:19:40 UTC (rev 6960)
+++ trunk/matplotlib/examples/pylab_examples/axes_props.py 2009-03-07 19:32:39 UTC (rev 6961)
@@ -10,7 +10,7 @@
plot(t, s)
grid(True)
-# matlab handle graphics style
+# matlab style
xticklines = getp(gca(), 'xticklines')
yticklines = getp(gca(), 'yticklines')
xgridlines = getp(gca(), 'xgridlines')
Modified: trunk/matplotlib/lib/matplotlib/pylab.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pylab.py 2009-03-07 19:19:40 UTC (rev 6960)
+++ trunk/matplotlib/lib/matplotlib/pylab.py 2009-03-07 19:32:39 UTC (rev 6961)
@@ -42,7 +42,7 @@
gca - return the current axes
gcf - return the current figure
gci - get the current image, or None
- getp - get a handle graphics property
+ getp - get a graphics property
grid - set whether gridding is on
hist - make a histogram
hold - set the axes hold state
@@ -70,7 +70,7 @@
rgrids - customize the radial grids and labels for polar
savefig - save the current figure
scatter - make a scatter plot
- setp - set a handle graphics property
+ setp - set a graphics property
semilogx - log x axis
semilogy - log y axis
show - show the figures
Modified: trunk/matplotlib/lib/matplotlib/pyplot.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pyplot.py 2009-03-07 19:19:40 UTC (rev 6960)
+++ trunk/matplotlib/lib/matplotlib/pyplot.py 2009-03-07 19:32:39 UTC (rev 6961)
@@ -194,7 +194,7 @@
*number* attribute holding this number.
If *num* is an integer, and ``figure(num)`` already exists, make it
- active and return the handle to it. If ``figure(num)`` does not exist
+ active and return a reference to it. If ``figure(num)`` does not exist
it will be created. Numbering starts at 1, matlab style::
figure(1)
@@ -265,7 +265,7 @@
return figManager.canvas.figure
def gcf():
- "Return a handle to the current figure."
+ "Return a reference to the current figure."
figManager = _pylab_helpers.Gcf.get_active()
if figManager is not None:
@@ -1177,7 +1177,7 @@
gca return the current axes
gcf return the current figure
gci get the current image, or None
- getp get a handle graphics property
+ getp get a graphics property
hist make a histogram
hold set the hold state on current axes
legend add a legend to the axes
@@ -1194,7 +1194,7 @@
rc control the default params
savefig save the current figure
scatter make a scatter plot
- setp set a handle graphics property
+ setp set a graphics property
semilogx log x axis
semilogy log y axis
show show the figures
@@ -1241,7 +1241,7 @@
def colors():
"""
- This is a do nothing function to provide you with help on how
+ This is a do-nothing function to provide you with help on how
matplotlib handles colors.
Commands which take color arguments can use several formats to
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952
+ /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952
+ /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952
+ /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2009-03-07 19:19:46
|
Revision: 6960
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6960&view=rev
Author: efiring
Date: 2009-03-07 19:19:40 +0000 (Sat, 07 Mar 2009)
Log Message:
-----------
Remove references to handle graphics;
it is registered trademark of Mathworks, and the pyplot resemblance
is only superficial.
Modified Paths:
--------------
branches/v0_98_5_maint/doc/_templates/index.html
branches/v0_98_5_maint/doc/pyplots/tex_demo.png
branches/v0_98_5_maint/doc/users/pyplot_tutorial.rst
branches/v0_98_5_maint/examples/pylab_examples/axes_props.py
branches/v0_98_5_maint/lib/matplotlib/pylab.py
branches/v0_98_5_maint/lib/matplotlib/pyplot.py
Modified: branches/v0_98_5_maint/doc/_templates/index.html
===================================================================
--- branches/v0_98_5_maint/doc/_templates/index.html 2009-03-06 19:14:30 UTC (rev 6959)
+++ branches/v0_98_5_maint/doc/_templates/index.html 2009-03-07 19:19:40 UTC (rev 6960)
@@ -35,7 +35,7 @@
<p>For the power user, you have full control of line styles, font
properties, axes properties, etc, via an object oriented interface
- or via a handle graphics interface familiar to Matlab® users.
+ or via a set of functions familiar to Matlab® users.
The pylab mode provides all of the <a href="api/pyplot_api.html">pyplot</a> plotting
functions listed below, as well as non-plotting functions from
<a href="http://scipy.org/Numpy_Example_List_With_Doc">numpy</a> and
@@ -473,7 +473,7 @@
</th>
<td align="left">
- get a handle graphics property
+ get a graphics property
</td>
</tr>
@@ -781,7 +781,7 @@
</th>
<td align="left">
- set a handle graphics property
+ set a graphics property
</td>
</tr>
Modified: branches/v0_98_5_maint/doc/pyplots/tex_demo.png
===================================================================
(Binary files differ)
Modified: branches/v0_98_5_maint/doc/users/pyplot_tutorial.rst
===================================================================
--- branches/v0_98_5_maint/doc/users/pyplot_tutorial.rst 2009-03-06 19:14:30 UTC (rev 6959)
+++ branches/v0_98_5_maint/doc/users/pyplot_tutorial.rst 2009-03-07 19:19:40 UTC (rev 6960)
@@ -78,10 +78,10 @@
line.set_antialiased(False) # turn off antialising
* Use the :func:`~matplotlib.pyplot.setp` command. The example below
- uses matlab handle graphics style command to set multiple properties
+ uses a Matlab-style command to set multiple properties
on a list of lines. ``setp`` works transparently with a list of objects
or a single object. You can either use python keyword arguments or
- matlab-style string/value pairs::
+ Matlab-style string/value pairs::
lines = plt.plot(x1, y1, x2, y2)
# use keyword args
Modified: branches/v0_98_5_maint/examples/pylab_examples/axes_props.py
===================================================================
--- branches/v0_98_5_maint/examples/pylab_examples/axes_props.py 2009-03-06 19:14:30 UTC (rev 6959)
+++ branches/v0_98_5_maint/examples/pylab_examples/axes_props.py 2009-03-07 19:19:40 UTC (rev 6960)
@@ -10,7 +10,7 @@
plot(t, s)
grid(True)
-# matlab handle graphics style
+# matlab style
xticklines = getp(gca(), 'xticklines')
yticklines = getp(gca(), 'yticklines')
xgridlines = getp(gca(), 'xgridlines')
Modified: branches/v0_98_5_maint/lib/matplotlib/pylab.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/pylab.py 2009-03-06 19:14:30 UTC (rev 6959)
+++ branches/v0_98_5_maint/lib/matplotlib/pylab.py 2009-03-07 19:19:40 UTC (rev 6960)
@@ -42,7 +42,7 @@
gca - return the current axes
gcf - return the current figure
gci - get the current image, or None
- getp - get a handle graphics property
+ getp - get a graphics property
grid - set whether gridding is on
hist - make a histogram
hold - set the axes hold state
@@ -69,7 +69,7 @@
rgrids - customize the radial grids and labels for polar
savefig - save the current figure
scatter - make a scatter plot
- setp - set a handle graphics property
+ setp - set a graphics property
semilogx - log x axis
semilogy - log y axis
show - show the figures
Modified: branches/v0_98_5_maint/lib/matplotlib/pyplot.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/pyplot.py 2009-03-06 19:14:30 UTC (rev 6959)
+++ branches/v0_98_5_maint/lib/matplotlib/pyplot.py 2009-03-07 19:19:40 UTC (rev 6960)
@@ -193,7 +193,7 @@
*number* attribute holding this number.
If *num* is an integer, and ``figure(num)`` already exists, make it
- active and return the handle to it. If ``figure(num)`` does not exist
+ active and return a reference to it. If ``figure(num)`` does not exist
it will be created. Numbering starts at 1, matlab style::
figure(1)
@@ -264,7 +264,7 @@
return figManager.canvas.figure
def gcf():
- "Return a handle to the current figure."
+ "Return a reference to the current figure."
figManager = _pylab_helpers.Gcf.get_active()
if figManager is not None:
@@ -1166,7 +1166,7 @@
gca return the current axes
gcf return the current figure
gci get the current image, or None
- getp get a handle graphics property
+ getp get a graphics property
hist make a histogram
hold set the hold state on current axes
legend add a legend to the axes
@@ -1182,7 +1182,7 @@
rc control the default params
savefig save the current figure
scatter make a scatter plot
- setp set a handle graphics property
+ setp set a graphics property
semilogx log x axis
semilogy log y axis
show show the figures
@@ -1229,7 +1229,7 @@
def colors():
"""
- This is a do nothing function to provide you with help on how
+ This is a do-nothing function to provide you with help on how
matplotlib handles colors.
Commands which take color arguments can use several formats to
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2009-03-06 19:14:50
|
Revision: 6959
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6959&view=rev
Author: jswhit
Date: 2009-03-06 19:14:30 +0000 (Fri, 06 Mar 2009)
Log Message:
-----------
fix typo
Modified Paths:
--------------
trunk/toolkits/basemap/Changelog
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog 2009-03-06 19:13:45 UTC (rev 6958)
+++ trunk/toolkits/basemap/Changelog 2009-03-06 19:14:30 UTC (rev 6959)
@@ -1,5 +1,5 @@
version 0.99.4 (not yet released)
- * add fix_aspect kwarg to Basemap.__init__, when true
+ * add fix_aspect kwarg to Basemap.__init__, when False
axes.set_aspect is set to 'auto' instead of default 'equal'.
Can be used to make plot fill whole plot region, even if the
plot region doesn't match the aspect ratio of the map region.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2009-03-06 19:13:56
|
Revision: 6958
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6958&view=rev
Author: jswhit
Date: 2009-03-06 19:13:45 +0000 (Fri, 06 Mar 2009)
Log Message:
-----------
add fix_aspect kwarg - when False, plot will not be forced
to match aspect ratio of map region.
Modified Paths:
--------------
trunk/toolkits/basemap/Changelog
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog 2009-03-05 13:22:26 UTC (rev 6957)
+++ trunk/toolkits/basemap/Changelog 2009-03-06 19:13:45 UTC (rev 6958)
@@ -1,4 +1,8 @@
version 0.99.4 (not yet released)
+ * add fix_aspect kwarg to Basemap.__init__, when true
+ axes.set_aspect is set to 'auto' instead of default 'equal'.
+ Can be used to make plot fill whole plot region, even if the
+ plot region doesn't match the aspect ratio of the map region.
* added date2index function, updated netcdftime to 0.7.1.
* added maskoceans function.
* update pupynere to version 1.0.8 (supports writing large files).
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2009-03-05 13:22:26 UTC (rev 6957)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2009-03-06 19:13:45 UTC (rev 6958)
@@ -242,6 +242,8 @@
formatter, or if you want to let matplotlib label
the axes in meters using map projection
coordinates.
+ fix_aspect fix aspect ratio of plot to match aspect ratio
+ of map projection region (default True).
anchor determines how map is placed in axes rectangle
(passed to axes.set_aspect). Default is ``C``,
which means map is centered.
@@ -434,10 +436,14 @@
suppress_ticks=True,
satellite_height=35786000,
boundinglat=None,
+ fix_aspect=True,
anchor='C',
ax=None):
# docstring is added after __init__ method definition
+ # fix aspect to ratio to match aspect ratio of map projection
+ # region
+ self.fix_aspect = fix_aspect
# where to put plot in figure (default is 'C' or center)
self.anchor = anchor
# map projection.
@@ -2566,7 +2572,10 @@
# make sure aspect ratio of map preserved.
# plot is re-centered in bounding rectangle.
# (anchor instance var determines where plot is placed)
- ax.set_aspect('equal',adjustable='box',anchor=self.anchor)
+ if self.fix_aspect:
+ ax.set_aspect('equal',adjustable='box',anchor=self.anchor)
+ else:
+ ax.set_aspect('auto',adjustable='box',anchor=self.anchor)
ax.apply_aspect()
# make sure axis ticks are turned off.
if self.noticks:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-03-05 13:22:36
|
Revision: 6957
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6957&view=rev
Author: mdboom
Date: 2009-03-05 13:22:26 +0000 (Thu, 05 Mar 2009)
Log Message:
-----------
Fix logo-generation script to have rounded polar bar plots.
Modified Paths:
--------------
trunk/matplotlib/examples/api/logo2.py
Modified: trunk/matplotlib/examples/api/logo2.py
===================================================================
--- trunk/matplotlib/examples/api/logo2.py 2009-03-05 04:45:00 UTC (rev 6956)
+++ trunk/matplotlib/examples/api/logo2.py 2009-03-05 13:22:26 UTC (rev 6957)
@@ -47,7 +47,7 @@
ha='right', va='center', alpha=1.0, transform=ax.transAxes)
def add_polar_bar():
- ax = fig.add_axes([0.025, 0.075, 0.2, 0.85], polar=True)
+ ax = fig.add_axes([0.025, 0.075, 0.2, 0.85], polar=True, resolution=50)
ax.axesPatch.set_alpha(axalpha)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lee...@us...> - 2009-03-05 04:45:08
|
Revision: 6956
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6956&view=rev
Author: leejjoon
Date: 2009-03-05 04:45:00 +0000 (Thu, 05 Mar 2009)
Log Message:
-----------
hashing of FontProperties accounts current rcParams
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/font_manager.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2009-03-04 20:53:29 UTC (rev 6955)
+++ trunk/matplotlib/CHANGELOG 2009-03-05 04:45:00 UTC (rev 6956)
@@ -1,3 +1,5 @@
+2009-02-28 hashing of FontProperties accounts current rcParams - JJL
+
2009-02-28 Prevent double-rendering of shared axis in twinx, twiny - EF
2009-02-26 Add optional bbox_to_anchor argument for legend class - JJL
Modified: trunk/matplotlib/lib/matplotlib/font_manager.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/font_manager.py 2009-03-04 20:53:29 UTC (rev 6955)
+++ trunk/matplotlib/lib/matplotlib/font_manager.py 2009-03-05 04:45:00 UTC (rev 6956)
@@ -705,10 +705,9 @@
return parse_fontconfig_pattern(pattern)
def __hash__(self):
- l = self.__dict__.items()
- l.sort()
+ l = [(k, getattr(self, "get" + k)()) for k in sorted(self.__dict__)]
return hash(repr(l))
-
+
def __str__(self):
return self.get_fontconfig_pattern()
@@ -1181,7 +1180,7 @@
"""
debug = False
if prop is None:
- return self.defaultFont
+ prop = FontProperties()
if is_string_like(prop):
prop = FontProperties(prop)
fname = prop.get_file()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-03-04 20:53:34
|
Revision: 6955
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6955&view=rev
Author: mdboom
Date: 2009-03-04 20:53:29 +0000 (Wed, 04 Mar 2009)
Log Message:
-----------
Fix wiggly baseline problem (again -- should have truncated rather than rounded)
Modified Paths:
--------------
trunk/matplotlib/src/ft2font.cpp
Modified: trunk/matplotlib/src/ft2font.cpp
===================================================================
--- trunk/matplotlib/src/ft2font.cpp 2009-03-04 18:16:50 UTC (rev 6954)
+++ trunk/matplotlib/src/ft2font.cpp 2009-03-04 20:53:29 UTC (rev 6955)
@@ -1257,8 +1257,8 @@
double xd = Py::Float(args[1]);
double yd = Py::Float(args[2]);
- long x = (long)mpl_round(xd);
- long y = (long)mpl_round(yd);
+ long x = (long)xd;
+ long y = (long)yd;
FT_Vector sub_offset;
sub_offset.x = int((xd - (double)x) * 64.0);
sub_offset.y = int((yd - (double)y) * 64.0);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-03-04 18:17:00
|
Revision: 6954
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6954&view=rev
Author: mdboom
Date: 2009-03-04 18:16:50 +0000 (Wed, 04 Mar 2009)
Log Message:
-----------
Fix a few bugs when mathtext.default is 'regular'
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/mathtext.py
Modified: trunk/matplotlib/lib/matplotlib/mathtext.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/mathtext.py 2009-03-04 13:27:00 UTC (rev 6953)
+++ trunk/matplotlib/lib/matplotlib/mathtext.py 2009-03-04 18:16:50 UTC (rev 6954)
@@ -843,7 +843,7 @@
return self.cm_fallback._get_glyph(
fontname, 'it', sym, fontsize)
else:
- if fontname == 'it' and isinstance(self, StixFonts):
+ if fontname in ('it', 'regular') and isinstance(self, StixFonts):
return self._get_glyph('rm', font_class, sym, fontsize)
warn("Font '%s' does not have a glyph for '%s'" %
(fontname, sym.encode('ascii', 'backslashreplace')),
@@ -916,7 +916,7 @@
if mapping is not None:
if isinstance(mapping, dict):
- mapping = mapping[font_class]
+ mapping = mapping.get(font_class, 'rm')
# Binary search for the source glyph
lo = 0
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-03-04 13:27:11
|
Revision: 6953
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6953&view=rev
Author: mdboom
Date: 2009-03-04 13:27:00 +0000 (Wed, 04 Mar 2009)
Log Message:
-----------
Merged revisions 6952 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r6952 | mdboom | 2009-03-04 08:25:41 -0500 (Wed, 04 Mar 2009) | 2 lines
Fix for Python 2.4 compatibility.
........
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
Property Changed:
----------------
trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
trunk/matplotlib/doc/sphinxext/gen_gallery.py
trunk/matplotlib/doc/sphinxext/gen_rst.py
trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6950
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6952
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952
Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950
+ /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952
Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950
+ /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952
Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950
+ /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950
+ /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950
+ /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952
Modified: trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py 2009-03-04 13:25:41 UTC (rev 6952)
+++ trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py 2009-03-04 13:27:00 UTC (rev 6953)
@@ -136,8 +136,6 @@
try:
fd = open(fname)
module = imp.load_module("__main__", fd, fname, ('py', 'r', imp.PY_SOURCE))
- except:
- raise
finally:
del sys.path[0]
os.chdir(pwd)
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950
+ /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-03-04 13:25:46
|
Revision: 6952
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6952&view=rev
Author: mdboom
Date: 2009-03-04 13:25:41 +0000 (Wed, 04 Mar 2009)
Log Message:
-----------
Fix for Python 2.4 compatibility.
Modified Paths:
--------------
branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py
Modified: branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py 2009-03-03 22:08:38 UTC (rev 6951)
+++ branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py 2009-03-04 13:25:41 UTC (rev 6952)
@@ -136,8 +136,6 @@
try:
fd = open(fname)
module = imp.load_module("__main__", fd, fname, ('py', 'r', imp.PY_SOURCE))
- except:
- raise
finally:
del sys.path[0]
os.chdir(pwd)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-03-03 22:08:48
|
Revision: 6951
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6951&view=rev
Author: mdboom
Date: 2009-03-03 22:08:38 +0000 (Tue, 03 Mar 2009)
Log Message:
-----------
Merged revisions 6950 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r6950 | mdboom | 2009-03-03 17:06:53 -0500 (Tue, 03 Mar 2009) | 2 lines
Add workaround for change in handling of absolute paths in image directive in recent Sphinx hg versions.
........
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
Property Changed:
----------------
trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
trunk/matplotlib/doc/sphinxext/gen_gallery.py
trunk/matplotlib/doc/sphinxext/gen_rst.py
trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6948
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6950
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950
Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948
+ /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950
Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948
+ /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950
Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948
+ /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948
+ /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948
+ /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950
Modified: trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py 2009-03-03 22:06:53 UTC (rev 6950)
+++ trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py 2009-03-03 22:08:38 UTC (rev 6951)
@@ -30,7 +30,11 @@
from docutils.parsers.rst.directives.images import Image
align = Image.align
from docutils import nodes
+import sphinx
+sphinx_version = sphinx.__version__.split(".")
+sphinx_version = tuple([int(x) for x in sphinx_version[:2]])
+
import matplotlib
import matplotlib.cbook as cbook
matplotlib.use('Agg')
@@ -92,11 +96,11 @@
[%(links)s]
- .. image:: %(tmpdir)s/%(outname)s.png
+ .. image:: %(prefix)s%(tmpdir)s/%(outname)s.png
%(options)s
.. latexonly::
- .. image:: %(tmpdir)s/%(outname)s.pdf
+ .. image:: %(prefix)s%(tmpdir)s/%(outname)s.pdf
%(options)s
"""
@@ -262,7 +266,17 @@
# tmpdir is where we build all the output files. This way the
# plots won't have to be redone when generating latex after html.
- tmpdir = os.path.abspath(os.path.join('build', outdir))
+
+ # Prior to Sphinx 0.6, absolute image paths were treated as
+ # relative to the root of the filesystem. 0.6 and after, they are
+ # treated as relative to the root of the documentation tree. We need
+ # to support both methods here.
+ tmpdir = os.path.join('build', outdir)
+ if sphinx_version < (0, 6):
+ tmpdir = os.path.abspath(tmpdir)
+ prefix = ''
+ else:
+ prefix = '/'
if not os.path.exists(tmpdir):
cbook.mkdirs(tmpdir)
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948
+ /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-03-03 22:07:02
|
Revision: 6950
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6950&view=rev
Author: mdboom
Date: 2009-03-03 22:06:53 +0000 (Tue, 03 Mar 2009)
Log Message:
-----------
Add workaround for change in handling of absolute paths in image directive in recent Sphinx hg versions.
Modified Paths:
--------------
branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py
Modified: branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py 2009-03-03 15:06:54 UTC (rev 6949)
+++ branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py 2009-03-03 22:06:53 UTC (rev 6950)
@@ -30,7 +30,11 @@
from docutils.parsers.rst.directives.images import Image
align = Image.align
from docutils import nodes
+import sphinx
+sphinx_version = sphinx.__version__.split(".")
+sphinx_version = tuple([int(x) for x in sphinx_version[:2]])
+
import matplotlib
import matplotlib.cbook as cbook
matplotlib.use('Agg')
@@ -92,11 +96,11 @@
[%(links)s]
- .. image:: %(tmpdir)s/%(outname)s.png
+ .. image:: %(prefix)s%(tmpdir)s/%(outname)s.png
%(options)s
.. latexonly::
- .. image:: %(tmpdir)s/%(outname)s.pdf
+ .. image:: %(prefix)s%(tmpdir)s/%(outname)s.pdf
%(options)s
"""
@@ -262,7 +266,17 @@
# tmpdir is where we build all the output files. This way the
# plots won't have to be redone when generating latex after html.
- tmpdir = os.path.abspath(os.path.join('build', outdir))
+
+ # Prior to Sphinx 0.6, absolute image paths were treated as
+ # relative to the root of the filesystem. 0.6 and after, they are
+ # treated as relative to the root of the documentation tree. We need
+ # to support both methods here.
+ tmpdir = os.path.join('build', outdir)
+ if sphinx_version < (0, 6):
+ tmpdir = os.path.abspath(tmpdir)
+ prefix = ''
+ else:
+ prefix = '/'
if not os.path.exists(tmpdir):
cbook.mkdirs(tmpdir)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-03-03 15:07:05
|
Revision: 6949
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6949&view=rev
Author: mdboom
Date: 2009-03-03 15:06:54 +0000 (Tue, 03 Mar 2009)
Log Message:
-----------
Merged revisions 6948 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r6948 | mdboom | 2009-03-03 08:25:23 -0500 (Tue, 03 Mar 2009) | 2 lines
Fix plotting() docstring.
........
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/pyplot.py
Property Changed:
----------------
trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
trunk/matplotlib/doc/sphinxext/gen_gallery.py
trunk/matplotlib/doc/sphinxext/gen_rst.py
trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6946
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6948
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948
Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946
+ /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948
Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946
+ /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948
Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946
+ /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948
Modified: trunk/matplotlib/lib/matplotlib/pyplot.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pyplot.py 2009-03-03 13:25:23 UTC (rev 6948)
+++ trunk/matplotlib/lib/matplotlib/pyplot.py 2009-03-03 15:06:54 UTC (rev 6949)
@@ -1149,6 +1149,7 @@
def plotting():
"""
Plotting commands
+
=============== =========================================================
Command Description
=============== =========================================================
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946
+ /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946
+ /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946
+ /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-03-03 13:25:33
|
Revision: 6948
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6948&view=rev
Author: mdboom
Date: 2009-03-03 13:25:23 +0000 (Tue, 03 Mar 2009)
Log Message:
-----------
Fix plotting() docstring.
Modified Paths:
--------------
branches/v0_98_5_maint/lib/matplotlib/pyplot.py
Modified: branches/v0_98_5_maint/lib/matplotlib/pyplot.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/pyplot.py 2009-03-02 23:04:27 UTC (rev 6947)
+++ branches/v0_98_5_maint/lib/matplotlib/pyplot.py 2009-03-03 13:25:23 UTC (rev 6948)
@@ -1138,6 +1138,7 @@
def plotting():
"""
Plotting commands
+
=============== =========================================================
Command Description
=============== =========================================================
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-03-02 23:04:32
|
Revision: 6947
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6947&view=rev
Author: mdboom
Date: 2009-03-02 23:04:27 +0000 (Mon, 02 Mar 2009)
Log Message:
-----------
Merged revisions 6946 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r6946 | mdboom | 2009-03-02 17:50:44 -0500 (Mon, 02 Mar 2009) | 2 lines
Fix bug in doc build.
........
Modified Paths:
--------------
trunk/matplotlib/doc/conf.py
Property Changed:
----------------
trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
trunk/matplotlib/doc/sphinxext/gen_gallery.py
trunk/matplotlib/doc/sphinxext/gen_rst.py
trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6941
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6946
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946
Modified: trunk/matplotlib/doc/conf.py
===================================================================
--- trunk/matplotlib/doc/conf.py 2009-03-02 22:50:44 UTC (rev 6946)
+++ trunk/matplotlib/doc/conf.py 2009-03-02 23:04:27 UTC (rev 6947)
@@ -28,7 +28,7 @@
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['matplotlib.sphinxext.mathmpl', 'math_symbol_table',
- 'sphinx.ext.autodoc', # 'matplotlib.sphinxext.only_directives',
+ 'sphinx.ext.autodoc', 'matplotlib.sphinxext.only_directives',
'matplotlib.sphinxext.plot_directive', 'inheritance_diagram',
'gen_gallery', 'gen_rst']
Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941
+ /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946
Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941
+ /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946
Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941
+ /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
+ /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
+ /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941
+ /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-03-02 22:50:46
|
Revision: 6946
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6946&view=rev
Author: mdboom
Date: 2009-03-02 22:50:44 +0000 (Mon, 02 Mar 2009)
Log Message:
-----------
Fix bug in doc build.
Modified Paths:
--------------
branches/v0_98_5_maint/doc/conf.py
Modified: branches/v0_98_5_maint/doc/conf.py
===================================================================
--- branches/v0_98_5_maint/doc/conf.py 2009-02-28 20:13:38 UTC (rev 6945)
+++ branches/v0_98_5_maint/doc/conf.py 2009-03-02 22:50:44 UTC (rev 6946)
@@ -28,7 +28,7 @@
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['matplotlib.sphinxext.mathmpl', 'math_symbol_table',
- 'sphinx.ext.autodoc', # 'matplotlib.sphinxext.only_directives',
+ 'sphinx.ext.autodoc', 'matplotlib.sphinxext.only_directives',
'matplotlib.sphinxext.plot_directive', 'inheritance_diagram',
'gen_gallery', 'gen_rst']
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2009-02-28 20:13:48
|
Revision: 6945
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6945&view=rev
Author: efiring
Date: 2009-02-28 20:13:38 +0000 (Sat, 28 Feb 2009)
Log Message:
-----------
Better solution for twinx, twiny, thanks to Jae-Joon Lee
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2009-02-28 18:51:37 UTC (rev 6944)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2009-02-28 20:13:38 UTC (rev 6945)
@@ -532,11 +532,6 @@
self._frameon = frameon
self._axisbelow = rcParams['axes.axisbelow']
- # Attributes for controlling whether axis objects are drawn.
- # They are helpers for twinx and twiny.
- self._xaxison = True
- self._yaxison = True
-
self._hold = rcParams['axes.hold']
self._connected = {} # a dict from events to (id, func)
self.cla()
@@ -1652,10 +1647,7 @@
else:
self.xaxis.set_zorder(2.5)
self.yaxis.set_zorder(2.5)
- if self._xaxison:
- artists.append(self.xaxis)
- if self._yaxison:
- artists.append(self.yaxis)
+ artists.extend([self.xaxis, self.yaxis])
if not inframe: artists.append(self.title)
artists.extend(self.tables)
if self.legend_ is not None:
@@ -6610,7 +6602,7 @@
ax2.yaxis.tick_right()
ax2.yaxis.set_label_position('right')
self.yaxis.tick_left()
- ax2._xaxison = False
+ ax2.xaxis.set_visible(False)
return ax2
def twiny(self):
@@ -6630,7 +6622,7 @@
ax2.xaxis.tick_top()
ax2.xaxis.set_label_position('top')
self.xaxis.tick_bottom()
- ax2._yaxison = False
+ ax2.yaxis.set_visible(False)
return ax2
def get_shared_x_axes(self):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2009-02-28 18:51:46
|
Revision: 6944
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6944&view=rev
Author: efiring
Date: 2009-02-28 18:51:37 +0000 (Sat, 28 Feb 2009)
Log Message:
-----------
Prevent double-rendering of shared axis in twinx, twiny
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2009-02-28 07:46:14 UTC (rev 6943)
+++ trunk/matplotlib/CHANGELOG 2009-02-28 18:51:37 UTC (rev 6944)
@@ -1,3 +1,5 @@
+2009-02-28 Prevent double-rendering of shared axis in twinx, twiny - EF
+
2009-02-26 Add optional bbox_to_anchor argument for legend class - JJL
2009-02-26 Support image clipping in pdf backend. - JKS
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2009-02-28 07:46:14 UTC (rev 6943)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2009-02-28 18:51:37 UTC (rev 6944)
@@ -532,6 +532,11 @@
self._frameon = frameon
self._axisbelow = rcParams['axes.axisbelow']
+ # Attributes for controlling whether axis objects are drawn.
+ # They are helpers for twinx and twiny.
+ self._xaxison = True
+ self._yaxison = True
+
self._hold = rcParams['axes.hold']
self._connected = {} # a dict from events to (id, func)
self.cla()
@@ -1647,7 +1652,10 @@
else:
self.xaxis.set_zorder(2.5)
self.yaxis.set_zorder(2.5)
- artists.extend([self.xaxis, self.yaxis])
+ if self._xaxison:
+ artists.append(self.xaxis)
+ if self._yaxison:
+ artists.append(self.yaxis)
if not inframe: artists.append(self.title)
artists.extend(self.tables)
if self.legend_ is not None:
@@ -6602,6 +6610,7 @@
ax2.yaxis.tick_right()
ax2.yaxis.set_label_position('right')
self.yaxis.tick_left()
+ ax2._xaxison = False
return ax2
def twiny(self):
@@ -6621,6 +6630,7 @@
ax2.xaxis.tick_top()
ax2.xaxis.set_label_position('top')
self.xaxis.tick_bottom()
+ ax2._yaxison = False
return ax2
def get_shared_x_axes(self):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2009-02-28 07:46:19
|
Revision: 6943
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6943&view=rev
Author: efiring
Date: 2009-02-28 07:46:14 +0000 (Sat, 28 Feb 2009)
Log Message:
-----------
Add documentation, style updates to _pylab_helpers.py
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/_pylab_helpers.py
Modified: trunk/matplotlib/lib/matplotlib/_pylab_helpers.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/_pylab_helpers.py 2009-02-27 13:32:10 UTC (rev 6942)
+++ trunk/matplotlib/lib/matplotlib/_pylab_helpers.py 2009-02-28 07:46:14 UTC (rev 6943)
@@ -1,3 +1,7 @@
+"""
+Manage figures for pyplot interface.
+"""
+
import sys, gc
def error_msg(msg):
@@ -4,56 +8,100 @@
print >>sys.stderr, msgs
class Gcf(object):
+ """
+ Manage a set of integer-numbered figures.
+
+ This class is never instantiated; it consists of two class
+ attributes (a list and a dictionary), and a set of static
+ methods that operate on those attributes, accessing them
+ directly as class attributes.
+
+ Attributes:
+
+ *figs*:
+ dictionary of the form {*num*: *manager*, ...}
+
+ *_activeQue*:
+ list of *managers*, with active one at the end
+
+ """
_activeQue = []
figs = {}
+ @staticmethod
def get_fig_manager(num):
+ """
+ If figure manager *num* exists, make it the active
+ figure and return the manager; otherwise return *None*.
+ """
figManager = Gcf.figs.get(num, None)
- if figManager is not None: Gcf.set_active(figManager)
+ if figManager is not None:
+ Gcf.set_active(figManager)
return figManager
- get_fig_manager = staticmethod(get_fig_manager)
+ @staticmethod
def destroy(num):
+ """
+ Try to remove all traces of figure *num*.
+ In the interactive backends, this is bound to the
+ window "destroy" and "delete" events.
+ """
if not Gcf.has_fignum(num): return
figManager = Gcf.figs[num]
+ # There must be a good reason for the following careful
+ # rebuilding of the activeQue; what is it?
oldQue = Gcf._activeQue[:]
Gcf._activeQue = []
for f in oldQue:
- if f != figManager: Gcf._activeQue.append(f)
+ if f != figManager:
+ Gcf._activeQue.append(f)
del Gcf.figs[num]
#print len(Gcf.figs.keys()), len(Gcf._activeQue)
figManager.destroy()
gc.collect()
- destroy = staticmethod(destroy)
-
+ @staticmethod
def has_fignum(num):
+ """
+ Return *True* if figure *num* exists.
+ """
return num in Gcf.figs
- has_fignum = staticmethod(has_fignum)
+ @staticmethod
def get_all_fig_managers():
+ """
+ Return a list of figure managers.
+ """
return Gcf.figs.values()
- get_all_fig_managers = staticmethod(get_all_fig_managers)
+ @staticmethod
def get_num_fig_managers():
+ """
+ Return the number of figures being managed.
+ """
return len(Gcf.figs.values())
- get_num_fig_managers = staticmethod(get_num_fig_managers)
-
+ @staticmethod
def get_active():
+ """
+ Return the manager of the active figure, or *None*.
+ """
if len(Gcf._activeQue)==0:
return None
else: return Gcf._activeQue[-1]
- get_active = staticmethod(get_active)
+ @staticmethod
def set_active(manager):
+ """
+ Make the figure corresponding to *manager* the active one.
+ """
oldQue = Gcf._activeQue[:]
Gcf._activeQue = []
for m in oldQue:
if m != manager: Gcf._activeQue.append(m)
Gcf._activeQue.append(manager)
Gcf.figs[manager.num] = manager
- set_active = staticmethod(set_active)
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-02-27 13:34:55
|
Revision: 6942
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6942&view=rev
Author: mdboom
Date: 2009-02-27 13:32:10 +0000 (Fri, 27 Feb 2009)
Log Message:
-----------
Merged revisions 6941 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r6941 | mdboom | 2009-02-27 08:30:13 -0500 (Fri, 27 Feb 2009) | 2 lines
Fix glyph alignment with STIX mathtext
........
Modified Paths:
--------------
trunk/matplotlib/src/ft2font.cpp
Property Changed:
----------------
trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
trunk/matplotlib/doc/sphinxext/gen_gallery.py
trunk/matplotlib/doc/sphinxext/gen_rst.py
trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6938
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6941
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941
Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934
+ /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941
Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934
+ /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941
Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934
+ /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941
Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934
+ /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941
Modified: trunk/matplotlib/src/ft2font.cpp
===================================================================
--- trunk/matplotlib/src/ft2font.cpp 2009-02-27 13:30:13 UTC (rev 6941)
+++ trunk/matplotlib/src/ft2font.cpp 2009-02-27 13:32:10 UTC (rev 6942)
@@ -1255,8 +1255,14 @@
throw Py::TypeError("Usage: draw_glyph_to_bitmap(bitmap, x,y,glyph)");
FT2Image* im = static_cast<FT2Image*>(args[0].ptr());
- long x = Py::Int(args[1]);
- long y = Py::Int(args[2]);
+ double xd = Py::Float(args[1]);
+ double yd = Py::Float(args[2]);
+ long x = (long)mpl_round(xd);
+ long y = (long)mpl_round(yd);
+ FT_Vector sub_offset;
+ sub_offset.x = int((xd - (double)x) * 64.0);
+ sub_offset.y = int((yd - (double)y) * 64.0);
+
if (!Glyph::check(args[3].ptr()))
throw Py::TypeError("Usage: draw_glyph_to_bitmap(bitmap, x,y,glyph)");
Glyph* glyph = static_cast<Glyph*>(args[3].ptr());
@@ -1266,7 +1272,7 @@
error = FT_Glyph_To_Bitmap(&glyphs[glyph->glyphInd],
ft_render_mode_normal,
- 0, //no additional translation
+ &sub_offset, //no additional translation
1 //destroy image;
);
if (error)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-02-27 13:34:29
|
Revision: 6941
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6941&view=rev
Author: mdboom
Date: 2009-02-27 13:30:13 +0000 (Fri, 27 Feb 2009)
Log Message:
-----------
Fix glyph alignment with STIX mathtext
Modified Paths:
--------------
branches/v0_98_5_maint/src/ft2font.cpp
Modified: branches/v0_98_5_maint/src/ft2font.cpp
===================================================================
--- branches/v0_98_5_maint/src/ft2font.cpp 2009-02-26 20:20:47 UTC (rev 6940)
+++ branches/v0_98_5_maint/src/ft2font.cpp 2009-02-27 13:30:13 UTC (rev 6941)
@@ -1256,8 +1256,14 @@
throw Py::TypeError("Usage: draw_glyph_to_bitmap(bitmap, x,y,glyph)");
FT2Image* im = static_cast<FT2Image*>(args[0].ptr());
- long x = Py::Int(args[1]);
- long y = Py::Int(args[2]);
+ double xd = Py::Float(args[1]);
+ double yd = Py::Float(args[2]);
+ long x = (long)mpl_round(xd);
+ long y = (long)mpl_round(yd);
+ FT_Vector sub_offset;
+ sub_offset.x = int((xd - (double)x) * 64.0);
+ sub_offset.y = int((yd - (double)y) * 64.0);
+
if (!Glyph::check(args[3].ptr()))
throw Py::TypeError("Usage: draw_glyph_to_bitmap(bitmap, x,y,glyph)");
Glyph* glyph = static_cast<Glyph*>(args[3].ptr());
@@ -1267,7 +1273,7 @@
error = FT_Glyph_To_Bitmap(&glyphs[glyph->glyphInd],
ft_render_mode_normal,
- 0, //no additional translation
+ &sub_offset, //no additional translation
1 //destroy image;
);
if (error)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2009-02-26 20:20:53
|
Revision: 6940
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6940&view=rev
Author: jouni
Date: 2009-02-26 20:20:47 +0000 (Thu, 26 Feb 2009)
Log Message:
-----------
Mark pdf backend fix as merged
Property Changed:
----------------
trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6934
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6938
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lee...@us...> - 2009-02-26 20:12:43
|
Revision: 6939
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6939&view=rev
Author: leejjoon
Date: 2009-02-26 20:12:38 +0000 (Thu, 26 Feb 2009)
Log Message:
-----------
Add optional bbox_to_anchor argument for legend class
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/examples/pylab_examples/legend_demo3.py
trunk/matplotlib/lib/matplotlib/legend.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2009-02-26 19:54:48 UTC (rev 6938)
+++ trunk/matplotlib/CHANGELOG 2009-02-26 20:12:38 UTC (rev 6939)
@@ -1,3 +1,5 @@
+2009-02-26 Add optional bbox_to_anchor argument for legend class - JJL
+
2009-02-26 Support image clipping in pdf backend. - JKS
2009-02-25 Improve tick location subset choice in FixedLocator. - EF
Modified: trunk/matplotlib/examples/pylab_examples/legend_demo3.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/legend_demo3.py 2009-02-26 19:54:48 UTC (rev 6938)
+++ trunk/matplotlib/examples/pylab_examples/legend_demo3.py 2009-02-26 20:12:38 UTC (rev 6939)
@@ -3,7 +3,6 @@
matplotlib.rcParams['legend.fancybox'] = True
import matplotlib.pyplot as plt
import numpy as np
-import pylab
def myplot(ax):
t1 = np.arange(0.0, 1.0, 0.1)
@@ -18,7 +17,8 @@
ax2 = plt.subplot(3,1,2)
myplot(ax2)
-ax2.legend(loc=1, ncol=2, shadow=True, title="Legend")
+ax2.legend(loc="center left", bbox_to_anchor=[0.5, 0.5],
+ ncol=2, shadow=True, title="Legend")
ax2.get_legend().get_title().set_color("red")
ax3 = plt.subplot(3,1,3)
@@ -26,8 +26,6 @@
ax3.legend(loc=1, ncol=4, mode="expand", shadow=True)
-#title('Damped oscillation')
-
plt.draw()
plt.show()
Modified: trunk/matplotlib/lib/matplotlib/legend.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/legend.py 2009-02-26 19:54:48 UTC (rev 6938)
+++ trunk/matplotlib/lib/matplotlib/legend.py 2009-02-26 20:12:38 UTC (rev 6939)
@@ -32,7 +32,7 @@
from matplotlib.lines import Line2D
from matplotlib.patches import Patch, Rectangle, Shadow, FancyBboxPatch
from matplotlib.collections import LineCollection, RegularPolyCollection
-from matplotlib.transforms import Bbox
+from matplotlib.transforms import Bbox, TransformedBbox, BboxTransformTo
from matplotlib.offsetbox import HPacker, VPacker, TextArea, DrawingArea
@@ -112,6 +112,7 @@
fancybox=None, # True use a fancy box, false use a rounded box, none use rc
shadow = None,
title = None, # set a title for the legend
+ bbox_to_anchor = None, # bbox thaw the legend will be anchored.
):
"""
- *parent* : the artist that contains the legend
@@ -137,6 +138,7 @@
borderaxespad the pad between the axes and legend border
columnspacing the spacing between columns
title the legend title
+ bbox_to_anchor the bbox that the legend will be anchored.
================ ==================================================================
The dimensions of pad and spacing are given as a fraction of the
@@ -249,7 +251,8 @@
self._loc = loc
self._mode = mode
-
+ self.set_bbox_to_anchor(bbox_to_anchor)
+
# We use FancyBboxPatch to draw a legend frame. The location
# and size of the box will be updated during the drawing time.
self.legendPatch = FancyBboxPatch(
@@ -294,6 +297,7 @@
a.set_transform(self.get_transform())
+
def _findoffset_best(self, width, height, xdescent, ydescent, renderer):
"Heper function to locate the legend at its best position"
ox, oy = self._find_best_position(width, height, renderer)
@@ -305,11 +309,11 @@
if iterable(self._loc) and len(self._loc)==2:
# when loc is a tuple of axes(or figure) coordinates.
fx, fy = self._loc
- bbox = self.parent.bbox
+ bbox = self.get_bbox_to_anchor()
x, y = bbox.x0 + bbox.width * fx, bbox.y0 + bbox.height * fy
else:
bbox = Bbox.from_bounds(0, 0, width, height)
- x, y = self._get_anchored_bbox(self._loc, bbox, self.parent.bbox, renderer)
+ x, y = self._get_anchored_bbox(self._loc, bbox, self.get_bbox_to_anchor(), renderer)
return x+xdescent, y+ydescent
@@ -340,7 +344,7 @@
# width of the paret (minus pads)
if self._mode in ["expand"]:
pad = 2*(self.borderaxespad+self.borderpad)*fontsize
- self._legend_box.set_width(self.parent.bbox.width-pad)
+ self._legend_box.set_width(self.get_bbox_to_anchor().width-pad)
if self._drawFrame:
# update the location and size of the legend
@@ -671,6 +675,48 @@
return self.legendPatch.get_window_extent()
+ def get_bbox_to_anchor(self):
+ """
+ return the bbox that the legend will be anchored
+ """
+ if self._bbox_to_anchor is None:
+ return self.parent.bbox
+ else:
+ return self._bbox_to_anchor
+
+
+ def set_bbox_to_anchor(self, bbox, transform=None):
+ """
+ set the bbox that the legend will be anchored.
+
+ *bbox* can be a Bbox instance, a list of [left, bottom, width,
+ height] in normalized axes coordinate, or a list of [left,
+ bottom] where the width and height will be assumed to be zero.
+ """
+ if bbox is None:
+ self._bbox_to_anchor = None
+ return
+ elif isinstance(bbox, Bbox):
+ self._bbox_to_anchor = bbox
+ else:
+ try:
+ l = len(bbox)
+ except TypeError:
+ raise ValueError("Invalid argument for bbox : %s" % str(bbox))
+
+ if l == 2:
+ bbox = [bbox[0], bbox[1], 0, 0]
+
+ self._bbox_to_anchor = Bbox.from_bounds(*bbox)
+
+ if transform is None:
+ transform = BboxTransformTo(self.parent.bbox)
+
+ self._bbox_to_anchor = TransformedBbox(self._bbox_to_anchor,
+ transform)
+
+
+
def _get_anchored_bbox(self, loc, bbox, parentbbox, renderer):
"""
Place the *bbox* inside the *parentbbox* according to a given
@@ -719,7 +765,8 @@
verts, bboxes, lines = self._auto_legend_data()
bbox = Bbox.from_bounds(0, 0, width, height)
- consider = [self._get_anchored_bbox(x, bbox, self.parent.bbox, renderer) for x in range(1, len(self.codes))]
+ consider = [self._get_anchored_bbox(x, bbox, self.get_bbox_to_anchor(),
+ renderer) for x in range(1, len(self.codes))]
#tx, ty = self.legendPatch.get_x(), self.legendPatch.get_y()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2009-02-26 19:54:58
|
Revision: 6938
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6938&view=rev
Author: jouni
Date: 2009-02-26 19:54:48 +0000 (Thu, 26 Feb 2009)
Log Message:
-----------
Support image clipping in the pdf backend
Modified Paths:
--------------
branches/v0_98_5_maint/CHANGELOG
branches/v0_98_5_maint/lib/matplotlib/backends/backend_pdf.py
Modified: branches/v0_98_5_maint/CHANGELOG
===================================================================
--- branches/v0_98_5_maint/CHANGELOG 2009-02-26 19:44:30 UTC (rev 6937)
+++ branches/v0_98_5_maint/CHANGELOG 2009-02-26 19:54:48 UTC (rev 6938)
@@ -1,3 +1,5 @@
+2009-02-26 Support image clipping in pdf backend. - JKS
+
2009-02-16 Move plot_directive.py to the installed source tree. Add
support for inline code content - MGD
Modified: branches/v0_98_5_maint/lib/matplotlib/backends/backend_pdf.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/backends/backend_pdf.py 2009-02-26 19:44:30 UTC (rev 6937)
+++ branches/v0_98_5_maint/lib/matplotlib/backends/backend_pdf.py 2009-02-26 19:54:48 UTC (rev 6938)
@@ -39,7 +39,7 @@
from matplotlib.ft2font import FT2Font, FIXED_WIDTH, ITALIC, LOAD_NO_SCALE, \
LOAD_NO_HINTING, KERNING_UNFITTED
from matplotlib.mathtext import MathTextParser
-from matplotlib.transforms import Affine2D, Bbox, BboxBase
+from matplotlib.transforms import Affine2D, Bbox, BboxBase, TransformedPath
from matplotlib.path import Path
from matplotlib import ttconv
@@ -1235,10 +1235,12 @@
return self.image_dpi/72.0
def draw_image(self, x, y, im, bbox, clippath=None, clippath_trans=None):
- # MGDTODO: Support clippath here
gc = self.new_gc()
if bbox is not None:
gc.set_clip_rectangle(bbox)
+ if clippath is not None:
+ clippath = TransformedPath(clippath, clippath_trans)
+ gc.set_clip_path(clippath)
self.check_gc(gc)
h, w = im.get_size_out()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|