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: <jd...@us...> - 2008-12-16 19:34:42
|
Revision: 6637
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6637&view=rev
Author: jdh2358
Date: 2008-12-16 19:34:32 +0000 (Tue, 16 Dec 2008)
Log Message:
-----------
tagged for bugfix release 98.5.1
Modified Paths:
--------------
branches/v0_98_5_maint/CHANGELOG
Modified: branches/v0_98_5_maint/CHANGELOG
===================================================================
--- branches/v0_98_5_maint/CHANGELOG 2008-12-16 19:09:30 UTC (rev 6636)
+++ branches/v0_98_5_maint/CHANGELOG 2008-12-16 19:34:32 UTC (rev 6637)
@@ -1,3 +1,6 @@
+======================================================================
+2008-12-16 Release 0.98.5.1 at r6636
+
2008-12-16 Fixed dpi-dependent behavior of Legend and fancybox in Text.
-JJL
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lee...@us...> - 2008-12-16 19:09:35
|
Revision: 6636
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6636&view=rev
Author: leejjoon
Date: 2008-12-16 19:09:30 +0000 (Tue, 16 Dec 2008)
Log Message:
-----------
........
r6635 | leejjoon | 2008-12-16 14:02:39 -0500 (Tue, 16 Dec 2008) | 2 lines
fixed dpi-dependent behavior of legend and text fancybox.
........
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/legend.py
trunk/matplotlib/lib/matplotlib/text.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-12-16 19:02:39 UTC (rev 6635)
+++ trunk/matplotlib/CHANGELOG 2008-12-16 19:09:30 UTC (rev 6636)
@@ -1,3 +1,6 @@
+2008-12-16 Fixed dpi-dependent behavior of Legend and fancybox in Text.
+ -JJL
+
2008-12-16 Added markevery property to Line2D to support subsampling
of markers - JDH
Modified: trunk/matplotlib/lib/matplotlib/legend.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/legend.py 2008-12-16 19:02:39 UTC (rev 6635)
+++ trunk/matplotlib/lib/matplotlib/legend.py 2008-12-16 19:09:30 UTC (rev 6636)
@@ -207,6 +207,11 @@
reps = int(self.numpoints / len(self._scatteryoffsets)) + 1
self._scatteryoffsets = np.tile(self._scatteryoffsets, reps)[:self.scatterpoints]
+ # handles & labels (which can be iterators) need to be
+ # explicitly converted to list.
+ self._handles_labels = list(handles), list(labels)
+
+
# _legend_box is an OffsetBox instance that contains all
# legend items and will be initialized from _init_legend_box()
# method.
@@ -273,9 +278,9 @@
self._drawFrame = True
- # populate the legend_box with legend items.
- self._init_legend_box(handles, labels)
- self._legend_box.set_figure(self.figure)
+ # init with null renderer
+ #self._init_legend_box(handles, labels, None)
+ #self._legend_box.set_figure(self.figure)
def _set_artist_props(self, a):
@@ -294,7 +299,7 @@
ox, oy = self._find_best_position(width, height)
return ox+xdescent, oy+ydescent
- def _findoffset_loc(self, width, height, xdescent, ydescent):
+ def _findoffset_loc(self, width, height, xdescent, ydescent, renderer):
"Heper function to locate the legend using the location code"
if iterable(self._loc) and len(self._loc)==2:
@@ -304,7 +309,7 @@
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)
+ x, y = self._get_anchored_bbox(self._loc, bbox, self.parent.bbox, renderer)
return x+xdescent, y+ydescent
@@ -312,6 +317,11 @@
"Draw everything that belongs to the legend"
if not self.get_visible(): return
+ # populate the legend_box with legend items.
+ handles, labels = self._handles_labels
+ self._init_legend_box(handles, labels, renderer)
+ self._legend_box.set_figure(self.figure)
+
renderer.open_group('legend')
# find_offset function will be provided to _legend_box and
@@ -320,12 +330,16 @@
if self._loc == 0:
self._legend_box.set_offset(self._findoffset_best)
else:
- self._legend_box.set_offset(self._findoffset_loc)
+ def _findoffset_loc(width, height, xdescent, ydescent):
+ return self._findoffset_loc(width, height, xdescent, ydescent, renderer)
+ self._legend_box.set_offset(_findoffset_loc)
+ fontsize = renderer.points_to_pixels(self.fontsize)
+
# if mode == fill, set the width of the legend_box to the
# width of the paret (minus pads)
if self._mode in ["expand"]:
- pad = 2*(self.borderaxespad+self.borderpad)*self.fontsize
+ pad = 2*(self.borderaxespad+self.borderpad)*fontsize
self._legend_box.set_width(self.parent.bbox.width-pad)
if self._drawFrame:
@@ -334,6 +348,8 @@
self.legendPatch.set_bounds(bbox.x0, bbox.y0,
bbox.width, bbox.height)
+ self.legendPatch.set_mutation_scale(fontsize)
+
if self.shadow:
shadow = Shadow(self.legendPatch, 2, -2)
shadow.draw(renderer)
@@ -353,7 +369,7 @@
return self.fontsize/72.0*self.figure.dpi
- def _init_legend_box(self, handles, labels):
+ def _init_legend_box(self, handles, labels, renderer=None):
"""
Initiallize the legend_box. The legend_box is an instance of
the OffsetBox, which is packed with legend handles and
@@ -361,6 +377,11 @@
drawing time.
"""
+ if renderer is None:
+ fontsize = self.fontsize
+ else:
+ fontsize = renderer.points_to_pixels(self.fontsize)
+
# legend_box is a HPacker, horizontally packed with
# columns. Each column is a VPacker, vertically packed with
# legend items. Each legend item is HPacker packed with
@@ -411,13 +432,13 @@
if npoints > 1:
# we put some pad here to compensate the size of the
# marker
- xdata = np.linspace(0.3*self.fontsize,
- (self.handlelength-0.3)*self.fontsize,
+ xdata = np.linspace(0.3*fontsize,
+ (self.handlelength-0.3)*fontsize,
npoints)
xdata_marker = xdata
elif npoints == 1:
- xdata = np.linspace(0, self.handlelength*self.fontsize, 2)
- xdata_marker = [0.5*self.handlelength*self.fontsize]
+ xdata = np.linspace(0, self.handlelength*fontsize, 2)
+ xdata_marker = [0.5*self.handlelength*fontsize]
if isinstance(handle, Line2D):
ydata = ((height-descent)/2.)*np.ones(xdata.shape, float)
@@ -445,7 +466,7 @@
elif isinstance(handle, Patch):
p = Rectangle(xy=(0., 0.),
- width = self.handlelength*self.fontsize,
+ width = self.handlelength*fontsize,
height=(height-descent),
)
p.update_from(handle)
@@ -499,7 +520,7 @@
else:
handle_list.append(None)
- handlebox = DrawingArea(width=self.handlelength*self.fontsize,
+ handlebox = DrawingArea(width=self.handlelength*fontsize,
height=height,
xdescent=0., ydescent=descent)
@@ -527,7 +548,7 @@
for i0, di in largecol+smallcol:
# pack handleBox and labelBox into itemBox
itemBoxes = [HPacker(pad=0,
- sep=self.handletextpad*self.fontsize,
+ sep=self.handletextpad*fontsize,
children=[h, t], align="baseline")
for h, t in handle_label[i0:i0+di]]
# minimumdescent=False for the text of the last row of the column
@@ -535,7 +556,7 @@
# pack columnBox
columnbox.append(VPacker(pad=0,
- sep=self.labelspacing*self.fontsize,
+ sep=self.labelspacing*fontsize,
align="baseline",
children=itemBoxes))
@@ -544,9 +565,9 @@
else:
mode = "fixed"
- sep = self.columnspacing*self.fontsize
+ sep = self.columnspacing*fontsize
- self._legend_box = HPacker(pad=self.borderpad*self.fontsize,
+ self._legend_box = HPacker(pad=self.borderpad*fontsize,
sep=sep, align="baseline",
mode=mode,
children=columnbox)
@@ -627,7 +648,7 @@
return self.legendPatch.get_window_extent()
- def _get_anchored_bbox(self, loc, bbox, parentbbox):
+ def _get_anchored_bbox(self, loc, bbox, parentbbox, renderer):
"""
Place the *bbox* inside the *parentbbox* according to a given
location code. Return the (x,y) coordinate of the bbox.
@@ -655,8 +676,9 @@
C:"C"}
c = anchor_coefs[loc]
-
- container = parentbbox.padded(-(self.borderaxespad) * self.fontsize)
+
+ fontsize = renderer.points_to_pixels(self.fontsize)
+ container = parentbbox.padded(-(self.borderaxespad) * fontsize)
anchored_box = bbox.anchored(c, container=container)
return anchored_box.x0, anchored_box.y0
Modified: trunk/matplotlib/lib/matplotlib/text.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/text.py 2008-12-16 19:02:39 UTC (rev 6635)
+++ trunk/matplotlib/lib/matplotlib/text.py 2008-12-16 19:09:30 UTC (rev 6636)
@@ -395,7 +395,8 @@
tr = mtransforms.Affine2D().rotate(theta)
tr = tr.translate(posx+x_box, posy+y_box)
self._bbox_patch.set_transform(tr)
- self._bbox_patch.set_mutation_scale(self.get_size())
+ fontsize = renderer.points_to_pixels(self.get_size())
+ self._bbox_patch.set_mutation_scale(fontsize)
#self._bbox_patch.draw(renderer)
else:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lee...@us...> - 2008-12-16 19:02:43
|
Revision: 6635
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6635&view=rev
Author: leejjoon
Date: 2008-12-16 19:02:39 +0000 (Tue, 16 Dec 2008)
Log Message:
-----------
fixed dpi-dependent behavior of legend and text fancybox.
Modified Paths:
--------------
branches/v0_98_5_maint/CHANGELOG
branches/v0_98_5_maint/lib/matplotlib/legend.py
branches/v0_98_5_maint/lib/matplotlib/text.py
Modified: branches/v0_98_5_maint/CHANGELOG
===================================================================
--- branches/v0_98_5_maint/CHANGELOG 2008-12-16 19:01:45 UTC (rev 6634)
+++ branches/v0_98_5_maint/CHANGELOG 2008-12-16 19:02:39 UTC (rev 6635)
@@ -1,3 +1,6 @@
+2008-12-16 Fixed dpi-dependent behavior of Legend and fancybox in Text.
+ -JJL
+
2008-12-15 Removed mpl_data symlink in docs. On platforms that do not
support symlinks, these become copies, and the font files
are large, so the distro becomes unneccessarily bloaded.
Modified: branches/v0_98_5_maint/lib/matplotlib/legend.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/legend.py 2008-12-16 19:01:45 UTC (rev 6634)
+++ branches/v0_98_5_maint/lib/matplotlib/legend.py 2008-12-16 19:02:39 UTC (rev 6635)
@@ -207,6 +207,11 @@
reps = int(self.numpoints / len(self._scatteryoffsets)) + 1
self._scatteryoffsets = np.tile(self._scatteryoffsets, reps)[:self.scatterpoints]
+ # handles & labels (which can be iterators) need to be
+ # explicitly converted to list.
+ self._handles_labels = list(handles), list(labels)
+
+
# _legend_box is an OffsetBox instance that contains all
# legend items and will be initialized from _init_legend_box()
# method.
@@ -273,9 +278,9 @@
self._drawFrame = True
- # populate the legend_box with legend items.
- self._init_legend_box(handles, labels)
- self._legend_box.set_figure(self.figure)
+ # init with null renderer
+ #self._init_legend_box(handles, labels, None)
+ #self._legend_box.set_figure(self.figure)
def _set_artist_props(self, a):
@@ -294,7 +299,7 @@
ox, oy = self._find_best_position(width, height)
return ox+xdescent, oy+ydescent
- def _findoffset_loc(self, width, height, xdescent, ydescent):
+ def _findoffset_loc(self, width, height, xdescent, ydescent, renderer):
"Heper function to locate the legend using the location code"
if iterable(self._loc) and len(self._loc)==2:
@@ -304,7 +309,7 @@
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)
+ x, y = self._get_anchored_bbox(self._loc, bbox, self.parent.bbox, renderer)
return x+xdescent, y+ydescent
@@ -312,6 +317,11 @@
"Draw everything that belongs to the legend"
if not self.get_visible(): return
+ # populate the legend_box with legend items.
+ handles, labels = self._handles_labels
+ self._init_legend_box(handles, labels, renderer)
+ self._legend_box.set_figure(self.figure)
+
renderer.open_group('legend')
# find_offset function will be provided to _legend_box and
@@ -320,12 +330,16 @@
if self._loc == 0:
self._legend_box.set_offset(self._findoffset_best)
else:
- self._legend_box.set_offset(self._findoffset_loc)
+ def _findoffset_loc(width, height, xdescent, ydescent):
+ return self._findoffset_loc(width, height, xdescent, ydescent, renderer)
+ self._legend_box.set_offset(_findoffset_loc)
+ fontsize = renderer.points_to_pixels(self.fontsize)
+
# if mode == fill, set the width of the legend_box to the
# width of the paret (minus pads)
if self._mode in ["expand"]:
- pad = 2*(self.borderaxespad+self.borderpad)*self.fontsize
+ pad = 2*(self.borderaxespad+self.borderpad)*fontsize
self._legend_box.set_width(self.parent.bbox.width-pad)
if self._drawFrame:
@@ -334,6 +348,8 @@
self.legendPatch.set_bounds(bbox.x0, bbox.y0,
bbox.width, bbox.height)
+ self.legendPatch.set_mutation_scale(fontsize)
+
if self.shadow:
shadow = Shadow(self.legendPatch, 2, -2)
shadow.draw(renderer)
@@ -353,7 +369,7 @@
return self.fontsize/72.0*self.figure.dpi
- def _init_legend_box(self, handles, labels):
+ def _init_legend_box(self, handles, labels, renderer=None):
"""
Initiallize the legend_box. The legend_box is an instance of
the OffsetBox, which is packed with legend handles and
@@ -361,6 +377,11 @@
drawing time.
"""
+ if renderer is None:
+ fontsize = self.fontsize
+ else:
+ fontsize = renderer.points_to_pixels(self.fontsize)
+
# legend_box is a HPacker, horizontally packed with
# columns. Each column is a VPacker, vertically packed with
# legend items. Each legend item is HPacker packed with
@@ -411,13 +432,13 @@
if npoints > 1:
# we put some pad here to compensate the size of the
# marker
- xdata = np.linspace(0.3*self.fontsize,
- (self.handlelength-0.3)*self.fontsize,
+ xdata = np.linspace(0.3*fontsize,
+ (self.handlelength-0.3)*fontsize,
npoints)
xdata_marker = xdata
elif npoints == 1:
- xdata = np.linspace(0, self.handlelength*self.fontsize, 2)
- xdata_marker = [0.5*self.handlelength*self.fontsize]
+ xdata = np.linspace(0, self.handlelength*fontsize, 2)
+ xdata_marker = [0.5*self.handlelength*fontsize]
if isinstance(handle, Line2D):
ydata = ((height-descent)/2.)*np.ones(xdata.shape, float)
@@ -445,7 +466,7 @@
elif isinstance(handle, Patch):
p = Rectangle(xy=(0., 0.),
- width = self.handlelength*self.fontsize,
+ width = self.handlelength*fontsize,
height=(height-descent),
)
p.update_from(handle)
@@ -499,7 +520,7 @@
else:
handle_list.append(None)
- handlebox = DrawingArea(width=self.handlelength*self.fontsize,
+ handlebox = DrawingArea(width=self.handlelength*fontsize,
height=height,
xdescent=0., ydescent=descent)
@@ -527,7 +548,7 @@
for i0, di in largecol+smallcol:
# pack handleBox and labelBox into itemBox
itemBoxes = [HPacker(pad=0,
- sep=self.handletextpad*self.fontsize,
+ sep=self.handletextpad*fontsize,
children=[h, t], align="baseline")
for h, t in handle_label[i0:i0+di]]
# minimumdescent=False for the text of the last row of the column
@@ -535,7 +556,7 @@
# pack columnBox
columnbox.append(VPacker(pad=0,
- sep=self.labelspacing*self.fontsize,
+ sep=self.labelspacing*fontsize,
align="baseline",
children=itemBoxes))
@@ -544,9 +565,9 @@
else:
mode = "fixed"
- sep = self.columnspacing*self.fontsize
+ sep = self.columnspacing*fontsize
- self._legend_box = HPacker(pad=self.borderpad*self.fontsize,
+ self._legend_box = HPacker(pad=self.borderpad*fontsize,
sep=sep, align="baseline",
mode=mode,
children=columnbox)
@@ -627,7 +648,7 @@
return self.legendPatch.get_window_extent()
- def _get_anchored_bbox(self, loc, bbox, parentbbox):
+ def _get_anchored_bbox(self, loc, bbox, parentbbox, renderer):
"""
Place the *bbox* inside the *parentbbox* according to a given
location code. Return the (x,y) coordinate of the bbox.
@@ -655,8 +676,9 @@
C:"C"}
c = anchor_coefs[loc]
-
- container = parentbbox.padded(-(self.borderaxespad) * self.fontsize)
+
+ fontsize = renderer.points_to_pixels(self.fontsize)
+ container = parentbbox.padded(-(self.borderaxespad) * fontsize)
anchored_box = bbox.anchored(c, container=container)
return anchored_box.x0, anchored_box.y0
Modified: branches/v0_98_5_maint/lib/matplotlib/text.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/text.py 2008-12-16 19:01:45 UTC (rev 6634)
+++ branches/v0_98_5_maint/lib/matplotlib/text.py 2008-12-16 19:02:39 UTC (rev 6635)
@@ -395,7 +395,8 @@
tr = mtransforms.Affine2D().rotate(theta)
tr = tr.translate(posx+x_box, posy+y_box)
self._bbox_patch.set_transform(tr)
- self._bbox_patch.set_mutation_scale(self.get_size())
+ fontsize = renderer.points_to_pixels(self.get_size())
+ self._bbox_patch.set_mutation_scale(fontsize)
#self._bbox_patch.draw(renderer)
else:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-12-16 19:01:55
|
Revision: 6634
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6634&view=rev
Author: jdh2358
Date: 2008-12-16 19:01:45 +0000 (Tue, 16 Dec 2008)
Log Message:
-----------
Merged revisions 6633 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r6633 | jdh2358 | 2008-12-16 11:00:38 -0800 (Tue, 16 Dec 2008) | 1 line
fixed os.link problem for win32
........
Modified Paths:
--------------
trunk/matplotlib/setup.py
Property Changed:
----------------
trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6629
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6633
Modified: trunk/matplotlib/setup.py
===================================================================
--- trunk/matplotlib/setup.py 2008-12-16 19:00:38 UTC (rev 6633)
+++ trunk/matplotlib/setup.py 2008-12-16 19:01:45 UTC (rev 6634)
@@ -10,7 +10,10 @@
# distutils will copy if os.link is not available, so this is a hack
# to force copying
import os
-del os.link
+try:
+ del os.link
+except AttributeError:
+ pass
# This dict will be updated as we try to select the best option during
# the build process. However, values in setup.cfg will be used, if
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-12-16 19:00:45
|
Revision: 6633
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6633&view=rev
Author: jdh2358
Date: 2008-12-16 19:00:38 +0000 (Tue, 16 Dec 2008)
Log Message:
-----------
fixed os.link problem for win32
Modified Paths:
--------------
branches/v0_98_5_maint/setup.py
Modified: branches/v0_98_5_maint/setup.py
===================================================================
--- branches/v0_98_5_maint/setup.py 2008-12-16 16:58:37 UTC (rev 6632)
+++ branches/v0_98_5_maint/setup.py 2008-12-16 19:00:38 UTC (rev 6633)
@@ -10,7 +10,10 @@
# distutils will copy if os.link is not available, so this is a hack
# to force copying
import os
-del os.link
+try:
+ del os.link
+except AttributeError:
+ pass
# This dict will be updated as we try to select the best option during
# the build process. However, values in setup.cfg will be used, if
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-12-16 16:58:41
|
Revision: 6632
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6632&view=rev
Author: jdh2358
Date: 2008-12-16 16:58:37 +0000 (Tue, 16 Dec 2008)
Log Message:
-----------
added legend to markevery tests
Modified Paths:
--------------
trunk/matplotlib/unit/nose_tests.py
Modified: trunk/matplotlib/unit/nose_tests.py
===================================================================
--- trunk/matplotlib/unit/nose_tests.py 2008-12-16 16:54:10 UTC (rev 6631)
+++ trunk/matplotlib/unit/nose_tests.py 2008-12-16 16:58:37 UTC (rev 6632)
@@ -3,6 +3,7 @@
import nose, nose.tools as nt
import numpy.testing as nptest
+
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
@@ -20,20 +21,22 @@
# check marker only plot
fig = plt.figure()
ax = fig.add_subplot(111)
- ax.plot(x, y, 'o')
- ax.plot(x, y, 'd', markevery=None)
- ax.plot(x, y, 's', markevery=10)
- ax.plot(x, y, '+', markevery=(5, 20))
+ ax.plot(x, y, 'o', label='default')
+ ax.plot(x, y, 'd', markevery=None, label='mark all')
+ ax.plot(x, y, 's', markevery=10, label='mark every 10')
+ ax.plot(x, y, '+', markevery=(5, 20), label='mark every 5 starting at 10')
+ ax.legend()
fig.canvas.draw()
plt.close(fig)
# check line/marker combos
fig = plt.figure()
ax = fig.add_subplot(111)
- ax.plot(x, y, '-o')
- ax.plot(x, y, '-d', markevery=None)
- ax.plot(x, y, '-s', markevery=10)
- ax.plot(x, y, '-+', markevery=(5, 20))
+ ax.plot(x, y, '-o', label='default')
+ ax.plot(x, y, '-d', markevery=None, label='mark all')
+ ax.plot(x, y, '-s', markevery=10, label='mark every 10')
+ ax.plot(x, y, '-+', markevery=(5, 20), label='mark every 5 starting at 10')
+ ax.legend()
fig.canvas.draw()
plt.close(fig)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-12-16 16:54:15
|
Revision: 6631
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6631&view=rev
Author: jdh2358
Date: 2008-12-16 16:54:10 +0000 (Tue, 16 Dec 2008)
Log Message:
-----------
added markevery property to Line2D
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/doc/users/pyplot_tutorial.rst
trunk/matplotlib/lib/matplotlib/lines.py
trunk/matplotlib/unit/nose_tests.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-12-16 16:19:21 UTC (rev 6630)
+++ trunk/matplotlib/CHANGELOG 2008-12-16 16:54:10 UTC (rev 6631)
@@ -1,3 +1,6 @@
+2008-12-16 Added markevery property to Line2D to support subsampling
+ of markers - JDH
+
2008-12-15 Removed mpl_data symlink in docs. On platforms that do not
support symlinks, these become copies, and the font files
are large, so the distro becomes unneccessarily bloaded.
Modified: trunk/matplotlib/doc/users/pyplot_tutorial.rst
===================================================================
--- trunk/matplotlib/doc/users/pyplot_tutorial.rst 2008-12-16 16:19:21 UTC (rev 6630)
+++ trunk/matplotlib/doc/users/pyplot_tutorial.rst 2008-12-16 16:54:10 UTC (rev 6631)
@@ -117,6 +117,7 @@
markeredgewidth or mew float value in points
markerfacecolor or mfc any matplotlib color
markersize or ms float
+markevery None | integer | (startind, stride)
picker used in interactive line selection
pickradius the line pick selection radius
solid_capstyle ['butt' | 'round' | 'projecting']
Modified: trunk/matplotlib/lib/matplotlib/lines.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/lines.py 2008-12-16 16:19:21 UTC (rev 6630)
+++ trunk/matplotlib/lib/matplotlib/lines.py 2008-12-16 16:54:10 UTC (rev 6631)
@@ -177,6 +177,7 @@
solid_joinstyle = None,
pickradius = 5,
drawstyle = None,
+ markevery = None,
**kwargs
):
"""
@@ -226,6 +227,7 @@
self.set_linewidth(linewidth)
self.set_color(color)
self.set_marker(marker)
+ self.set_markevery(markevery)
self.set_antialiased(antialiased)
self.set_markersize(markersize)
self._dashSeq = None
@@ -320,6 +322,32 @@
"""
self.pickradius = d
+
+ def set_markevery(self, every):
+ """
+ Set the markevery property to subsample the plot when using
+ markers. Eg if ``markevery=5``, every 5-th marker will be
+ plotted. *every* can be
+
+ None
+ Every point will be plotted
+
+ an integer N
+ Every N-th marker will be plotted starting with marker 0
+
+ A length-2 tuple of integers
+ every=(start, N) will start at point start and plot every N-th marker
+
+
+ ACCEPTS: None | integer | (startind, stride)
+
+ """
+ self._markevery = every
+
+ def get_markevery(self):
+ 'return the markevery setting'
+ return self._markevery
+
def set_picker(self,p):
"""Sets the event picker details for the line.
@@ -472,6 +500,19 @@
funcname = self._markers.get(self._marker, '_draw_nothing')
if funcname != '_draw_nothing':
tpath, affine = self._transformed_path.get_transformed_points_and_affine()
+
+ # subsample the markers if markevery is not None
+ markevery = self.get_markevery()
+ if markevery is not None:
+ if iterable(markevery):
+ startind, stride = markevery
+ else:
+ startind, stride = 0, markevery
+ if tpath.codes is not None:
+ tpath.codes = tpath.codes[startind::stride]
+ tpath.vertices = tpath.vertices[startind::stride]
+
+
markerFunc = getattr(self, funcname)
markerFunc(renderer, gc, tpath, affine.frozen())
Modified: trunk/matplotlib/unit/nose_tests.py
===================================================================
--- trunk/matplotlib/unit/nose_tests.py 2008-12-16 16:19:21 UTC (rev 6630)
+++ trunk/matplotlib/unit/nose_tests.py 2008-12-16 16:54:10 UTC (rev 6631)
@@ -1,3 +1,5 @@
+import numpy as np
+
import nose, nose.tools as nt
import numpy.testing as nptest
@@ -3,5 +5,4 @@
import matplotlib
matplotlib.use('Agg')
-import numpy as np
import matplotlib.pyplot as plt
import matplotlib.axes as maxes
@@ -11,7 +12,32 @@
fig = plt.figure()
ax = maxes.Subplot(fig, 1, 1, 1)
fig.add_subplot(ax)
+ plt.close(fig)
+def test_markevery():
+ x, y = np.random.rand(2, 100)
+
+ # check marker only plot
+ fig = plt.figure()
+ ax = fig.add_subplot(111)
+ ax.plot(x, y, 'o')
+ ax.plot(x, y, 'd', markevery=None)
+ ax.plot(x, y, 's', markevery=10)
+ ax.plot(x, y, '+', markevery=(5, 20))
+ fig.canvas.draw()
+ plt.close(fig)
+
+ # check line/marker combos
+ fig = plt.figure()
+ ax = fig.add_subplot(111)
+ ax.plot(x, y, '-o')
+ ax.plot(x, y, '-d', markevery=None)
+ ax.plot(x, y, '-s', markevery=10)
+ ax.plot(x, y, '-+', markevery=(5, 20))
+ fig.canvas.draw()
+ plt.close(fig)
+
if __name__=='__main__':
nose.runmodule(argv=['-s','--with-doctest'], exit=False)
- pass
+
+ plt.show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-12-16 16:19:26
|
Revision: 6630
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6630&view=rev
Author: jdh2358
Date: 2008-12-16 16:19:21 +0000 (Tue, 16 Dec 2008)
Log Message:
-----------
Merged revisions 6627,6629 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r6627 | jdh2358 | 2008-12-16 06:44:09 -0800 (Tue, 16 Dec 2008) | 1 line
removed mpl_data link
........
r6629 | jdh2358 | 2008-12-16 08:13:07 -0800 (Tue, 16 Dec 2008) | 1 line
applied Darren's sphinx patch, cleaned up some docstrings
........
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/doc/README.txt
trunk/matplotlib/doc/api/api_changes.rst
trunk/matplotlib/doc/api/font_manager_api.rst
trunk/matplotlib/doc/devel/documenting_mpl.rst
trunk/matplotlib/doc/make.py
trunk/matplotlib/doc/pyplots/plotmap.py
trunk/matplotlib/doc/sphinxext/inheritance_diagram.py
trunk/matplotlib/doc/sphinxext/mathmpl.py
trunk/matplotlib/doc/sphinxext/only_directives.py
trunk/matplotlib/doc/users/customizing.rst
trunk/matplotlib/doc/users/navigation_toolbar.rst
trunk/matplotlib/lib/matplotlib/collections.py
trunk/matplotlib/lib/matplotlib/pyplot.py
Property Changed:
----------------
trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6625
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6629
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/CHANGELOG 2008-12-16 16:19:21 UTC (rev 6630)
@@ -1,3 +1,10 @@
+2008-12-15 Removed mpl_data symlink in docs. On platforms that do not
+ support symlinks, these become copies, and the font files
+ are large, so the distro becomes unneccessarily bloaded.
+ Keeping the mpl_examples dir because relative links are
+ harder for the plot directive and the *.py files are not so
+ large. - JDH
+
2008-12-15 Fix \$ in non-math text with usetex off. Document
differences between usetex on/off - MGD
Modified: trunk/matplotlib/doc/README.txt
===================================================================
--- trunk/matplotlib/doc/README.txt 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/doc/README.txt 2008-12-16 16:19:21 UTC (rev 6630)
@@ -27,9 +27,6 @@
* sphinxext - Sphinx extensions for the mpl docs
-* mpl_data - a symbolic link to the matplotlib data for reference by
- sphinx documentation
-
* mpl_examples - a link to the matplotlib examples in case any
documentation wants to literal include them
Modified: trunk/matplotlib/doc/api/api_changes.rst
===================================================================
--- trunk/matplotlib/doc/api/api_changes.rst 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/doc/api/api_changes.rst 2008-12-16 16:19:21 UTC (rev 6630)
@@ -260,7 +260,7 @@
`Axes.toggle_log_lineary()` has been removed.
:mod:`matplotlib.artist`
-~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~
============================================================ ============================================================
Old method New method
Modified: trunk/matplotlib/doc/api/font_manager_api.rst
===================================================================
--- trunk/matplotlib/doc/api/font_manager_api.rst 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/doc/api/font_manager_api.rst 2008-12-16 16:19:21 UTC (rev 6630)
@@ -11,7 +11,7 @@
:show-inheritance:
:mod:`matplotlib.fontconfig_pattern`
-====================================
+========================================
.. automodule:: matplotlib.fontconfig_pattern
:members:
Modified: trunk/matplotlib/doc/devel/documenting_mpl.rst
===================================================================
--- trunk/matplotlib/doc/devel/documenting_mpl.rst 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/doc/devel/documenting_mpl.rst 2008-12-16 16:19:21 UTC (rev 6630)
@@ -271,26 +271,41 @@
==========================
In the documentation, you may want to include to a document in the
-matplotlib src, e.g. a license file, an image file from `mpl-data`, or an
-example. When you include these files, include them using a symbolic
-link from the documentation parent directory. This way, if we
-relocate the mpl documentation directory, all of the internal pointers
-to files will not have to change, just the top level symlinks. For
-example, In the top level doc directory we have symlinks pointing to
-the mpl `examples` and `mpl-data`::
+matplotlib src, e.g. a license file or an image file from `mpl-data`,
+refer to it via a relative path from the document where the rst file
+resides, eg, in :file:`users/navigation_toolbar.rst`, we refer to the
+image icons with::
- home:~/mpl/doc2> ls -l mpl_*
- mpl_data -> ../lib/matplotlib/mpl-data
- mpl_examples -> ../examples
+ .. image:: ../../lib/matplotlib/mpl-data/images/subplots.png
-
In the `users` subdirectory, if I want to refer to a file in the mpl-data
directory, I use the symlink directory. For example, from
`customizing.rst`::
- .. literalinclude:: ../mpl_data/matplotlibrc
+ .. literalinclude:: ../../lib/matplotlib/mpl-data/matplotlibrc
+On exception to this is when referring to the examples dir. Relative
+paths are extremely confusing in the sphinx plot extensions, so
+without getting into the dirty details, it is easier to simply include
+a symlink to the files at the top doc level directory. This way, API
+documents like :meth:`matplotlib.pyplot.plot` can refer to the
+examples in a known location.
+In the top level doc directory we have symlinks pointing to
+the mpl `examples`::
+
+ home:~/mpl/doc> ls -l mpl_*
+ mpl_examples -> ../examples
+
+So we can include plots from the examples dir using the symlink::
+
+ .. plot:: mpl_examples/pylab_examples/simple_plot.py
+
+
+We used to use a symlink for :file:`mpl-data` too, but the distro
+becomes very large on platforms that do not support links (eg the font
+files are duplicated and large)
+
.. _internal-section-refs:
Internal section references
Modified: trunk/matplotlib/doc/make.py
===================================================================
--- trunk/matplotlib/doc/make.py 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/doc/make.py 2008-12-16 16:19:21 UTC (rev 6630)
@@ -41,7 +41,7 @@
check_build()
if not os.path.exists('examples/index.rst'):
examples()
- shutil.copy('mpl_data/matplotlibrc', '_static/matplotlibrc')
+ shutil.copy('../lib/matplotlib/mpl-data/matplotlibrc', '_static/matplotlibrc')
#figs()
if os.system('sphinx-build -b html -d build/doctrees . build/html'):
raise SystemExit("Building HTML failed.")
Modified: trunk/matplotlib/doc/pyplots/plotmap.py
===================================================================
--- trunk/matplotlib/doc/pyplots/plotmap.py 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/doc/pyplots/plotmap.py 2008-12-16 16:19:21 UTC (rev 6630)
@@ -11,7 +11,7 @@
# read in topo data (on a regular lat/lon grid)
# longitudes go from 20 to 380.
# you can get this data from matplolib svn matplotlib/htdocs/screenshots/data/
-datadir = '/home/jdhunter/python/svn/matplotlib/htdocs/screenshots/data/'
+datadir = '/home/jdhunter/python/svn/matplotlib/trunk/htdocs/screenshots/data/'
if not os.path.exists(datadir):
raise SystemExit('You need to download the data with svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/htdocs/screenshots/data/" and set the datadir variable in %s'%__file__)
Modified: trunk/matplotlib/doc/sphinxext/inheritance_diagram.py
===================================================================
--- trunk/matplotlib/doc/sphinxext/inheritance_diagram.py 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/doc/sphinxext/inheritance_diagram.py 2008-12-16 16:19:21 UTC (rev 6630)
@@ -39,8 +39,6 @@
from md5 import md5
from docutils.nodes import Body, Element
-from docutils.writers.html4css1 import HTMLTranslator
-from sphinx.latexwriter import LaTeXTranslator
from docutils.parsers.rst import directives
from sphinx.roles import xfileref_role
@@ -409,12 +407,9 @@
inheritance_diagram_directive)
def setup(app):
- app.add_node(inheritance_diagram)
-
- HTMLTranslator.visit_inheritance_diagram = \
- visit_inheritance_diagram(html_output_graph)
- HTMLTranslator.depart_inheritance_diagram = do_nothing
-
- LaTeXTranslator.visit_inheritance_diagram = \
- visit_inheritance_diagram(latex_output_graph)
- LaTeXTranslator.depart_inheritance_diagram = do_nothing
+ app.add_node(inheritance_diagram,
+ html=(visit_inheritance_diagram(html_output_graph),
+ do_nothing))
+ app.add_node(inheritance_diagram,
+ latex=(visit_inheritance_diagram(latex_output_graph),
+ do_nothing))
Modified: trunk/matplotlib/doc/sphinxext/mathmpl.py
===================================================================
--- trunk/matplotlib/doc/sphinxext/mathmpl.py 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/doc/sphinxext/mathmpl.py 2008-12-16 16:19:21 UTC (rev 6630)
@@ -6,8 +6,6 @@
from docutils import nodes
from docutils.parsers.rst import directives
-from docutils.writers.html4css1 import HTMLTranslator
-from sphinx.latexwriter import LaTeXTranslator
import warnings
# Define LaTeX math node:
@@ -69,8 +67,6 @@
self.body.append(latex2html(node, source))
def depart_latex_math_html(self, node):
pass
- HTMLTranslator.visit_latex_math = visit_latex_math_html
- HTMLTranslator.depart_latex_math = depart_latex_math_html
# Add visit/depart methods to LaTeX-Translator:
def visit_latex_math_latex(self, node):
@@ -83,9 +79,14 @@
'\\end{equation}'])
def depart_latex_math_latex(self, node):
pass
- LaTeXTranslator.visit_latex_math = visit_latex_math_latex
- LaTeXTranslator.depart_latex_math = depart_latex_math_latex
+ app.add_node(latex_math, html=(visit_latex_math_html,
+ depart_latex_math_html))
+ app.add_node(latex_math, latex=(visit_latex_math_latex,
+ depart_latex_math_latex))
+ app.add_role('math', math_role)
+
+
from matplotlib import rcParams
from matplotlib.mathtext import MathTextParser
rcParams['mathtext.fontset'] = 'cm'
Modified: trunk/matplotlib/doc/sphinxext/only_directives.py
===================================================================
--- trunk/matplotlib/doc/sphinxext/only_directives.py 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/doc/sphinxext/only_directives.py 2008-12-16 16:19:21 UTC (rev 6630)
@@ -4,8 +4,6 @@
#
from docutils.nodes import Body, Element
-from docutils.writers.html4css1 import HTMLTranslator
-from sphinx.latexwriter import LaTeXTranslator
from docutils.parsers.rst import directives
class html_only(Body, Element):
@@ -63,9 +61,6 @@
directives.register_directive('latexonly', LatexOnlyDirective)
def setup(app):
- app.add_node(html_only)
- app.add_node(latex_only)
-
# Add visit/depart methods to HTML-Translator:
def visit_perform(self, node):
pass
@@ -76,12 +71,7 @@
def depart_ignore(self, node):
node.children = []
- HTMLTranslator.visit_html_only = visit_perform
- HTMLTranslator.depart_html_only = depart_perform
- HTMLTranslator.visit_latex_only = visit_ignore
- HTMLTranslator.depart_latex_only = depart_ignore
-
- LaTeXTranslator.visit_html_only = visit_ignore
- LaTeXTranslator.depart_html_only = depart_ignore
- LaTeXTranslator.visit_latex_only = visit_perform
- LaTeXTranslator.depart_latex_only = depart_perform
+ app.add_node(html_only, html=(visit_perform, depart_perform))
+ app.add_node(html_only, latex=(visit_ignore, depart_ignore))
+ app.add_node(latex_only, latex=(visit_perform, depart_perform))
+ app.add_node(latex_only, html=(visit_ignore, depart_ignore))
Modified: trunk/matplotlib/doc/users/customizing.rst
===================================================================
--- trunk/matplotlib/doc/users/customizing.rst 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/doc/users/customizing.rst 2008-12-16 16:19:21 UTC (rev 6630)
@@ -67,4 +67,4 @@
`(download) <../_static/matplotlibrc>`__
-.. literalinclude:: ../mpl_data/matplotlibrc
+.. literalinclude:: ../../lib/matplotlib/mpl-data/matplotlibrc
Modified: trunk/matplotlib/doc/users/navigation_toolbar.rst
===================================================================
--- trunk/matplotlib/doc/users/navigation_toolbar.rst 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/doc/users/navigation_toolbar.rst 2008-12-16 16:19:21 UTC (rev 6630)
@@ -9,11 +9,11 @@
to navigate through the data set. Here is a description of each of
the buttons at the bottom of the toolbar
-.. image:: ../mpl_data/images/home.png
+.. image:: ../../lib/matplotlib/mpl-data/images/home.png
-.. image:: ../mpl_data/images/back.png
+.. image:: ../../lib/matplotlib/mpl-data/images/back.png
-.. image:: ../mpl_data/images/forward.png
+.. image:: ../../lib/matplotlib/mpl-data/images/forward.png
The ``Forward`` and ``Back`` buttons
These are akin to the web browser forward and back buttons. They
@@ -26,7 +26,7 @@
``Back``, think web browser where data views are web pages. Use
the pan and zoom to rectangle to define new views.
-.. image:: ../mpl_data/images/move.png
+.. image:: ../../lib/matplotlib/mpl-data/images/move.png
The ``Pan/Zoom`` button
This button has two modes: pan and zoom. Click the toolbar button
@@ -50,7 +50,7 @@
mouse button. The radius scale can be zoomed in and out using the
right mouse button.
-.. image:: ../mpl_data/images/zoom_to_rect.png
+.. image:: ../../lib/matplotlib/mpl-data/images/zoom_to_rect.png
The ``Zoom-to-rectangle`` button
Click this toolbar button to activate this mode. Put your mouse
@@ -61,14 +61,14 @@
with the right button, which will place your entire axes in the
region defined by the zoom out rectangle.
-.. image:: ../mpl_data/images/subplots.png
+.. image:: ../../lib/matplotlib/mpl-data/images/subplots.png
The ``Subplot-configuration`` button
Use this tool to configure the parameters of the subplot: the
left, right, top, bottom, space between the rows and space between
the columns.
-.. image:: ../mpl_data/images/filesave.png
+.. image:: ../../lib/matplotlib/mpl-data/images/filesave.png
The ``Save`` button
Click this button to launch a file save dialog. You can save
@@ -84,14 +84,14 @@
================================== ==============================================
Home/Reset **h** or **r** or **home**
Back **c** or **left arrow** or **backspace**
-Forward **v** or **right arrow**
-Pan/Zoom **p**
-Zoom-to-rect **o**
-Save **s**
+Forward **v** or **right arrow**
+Pan/Zoom **p**
+Zoom-to-rect **o**
+Save **s**
Toggle fullscreen **f**
Constrain pan/zoom to x axis hold **x**
Constrain pan/zoom to y axis hold **y**
-Preserve aspect ratio hold **CONTROL**
+Preserve aspect ratio hold **CONTROL**
Toggle grid **g**
Toggle y axis scale (log/linear) **l**
================================== ==============================================
Modified: trunk/matplotlib/lib/matplotlib/collections.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/collections.py 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/lib/matplotlib/collections.py 2008-12-16 16:19:21 UTC (rev 6630)
@@ -720,7 +720,7 @@
over the regions in *x* where *where* is True. The bars range
on the y-axis from *ymin* to *ymax*
- A :class:`BrokenBarHCollection` is returned. kwargs are
+ A :class:`BrokenBarHCollection` is returned. *kwargs* are
passed on to the collection.
"""
xranges = []
Modified: trunk/matplotlib/lib/matplotlib/pyplot.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pyplot.py 2008-12-16 16:13:07 UTC (rev 6629)
+++ trunk/matplotlib/lib/matplotlib/pyplot.py 2008-12-16 16:19:21 UTC (rev 6630)
@@ -604,7 +604,7 @@
*axisbg*:
The background color of the subplot, which can be any valid
- color specifier. See :module:`matplotlib.colors` for more
+ color specifier. See :mod:`matplotlib.colors` for more
information.
*polar*:
@@ -1149,62 +1149,62 @@
"""
Plotting commands
- ============== =================================================
- Command Description
- ============== =================================================
- axes Create a new axes
- axis Set or return the current axis limits
- bar make a bar chart
- boxplot make a box and whiskers chart
- cla clear current axes
- clabel label a contour plot
- clf clear a figure window
- close close a figure window
- colorbar add a colorbar to the current figure
- cohere make a plot of coherence
- contour make a contour plot
- contourf make a filled contour plot
- csd make a plot of cross spectral density
- draw force a redraw of the current figure
- errorbar make an errorbar graph
- figlegend add a legend to the figure
- figimage add an image to the figure, w/o resampling
- figtext add text in figure coords
- figure create or change active figure
- fill make filled polygons
- fill_between make filled polygons
- gca return the current axes
- gcf return the current figure
- gci get the current image, or None
- getp get a handle graphics property
- hist make a histogram
- hold set the hold state on current axes
- legend add a legend to the axes
- loglog a log log plot
- imread load image file into array
- imshow plot image data
- matshow display a matrix in a new figure preserving aspect
- pcolor make a pseudocolor plot
- plot make a line plot
- plotfile plot data from a flat file
- psd make a plot of power spectral density
- quiver make a direction field (arrows) plot
- rc control the default params
- savefig save the current figure
- scatter make a scatter plot
- setp set a handle graphics property
- semilogx log x axis
- semilogy log y axis
- show show the figures
- specgram a spectrogram plot
- stem make a stem plot
- subplot make a subplot (numrows, numcols, axesnum)
- table add a table to the axes
- text add some text at location x,y to the current axes
- title add a title to the current axes
- xlabel add an xlabel to the current axes
- ylabel add a ylabel to the current axes
- ============== =================================================
+ ============ =================================================
+ Command Description
+ ========= =================================================
+ axes Create a new axes
+ axis Set or return the current axis limits
+ bar make a bar chart
+ boxplot make a box and whiskers chart
+ cla clear current axes
+ clabel label a contour plot
+ clf clear a figure window
+ close close a figure window
+ colorbar add a colorbar to the current figure
+ cohere make a plot of coherence
+ contour make a contour plot
+ contourf make a filled contour plot
+ csd make a plot of cross spectral density
+ draw force a redraw of the current figure
+ errorbar make an errorbar graph
+ figlegend add a legend to the figure
+ figimage add an image to the figure, w/o resampling
+ figtext add text in figure coords
+ figure create or change active figure
+ fill make filled polygons
+ fill_between make filled polygons
+ gca return the current axes
+ gcf return the current figure
+ gci get the current image, or None
+ getp get a handle graphics property
+ hist make a histogram
+ hold set the hold state on current axes
+ legend add a legend to the axes
+ loglog a log log plot
+ imread load image file into array
+ imshow plot image data
+ matshow display a matrix in a new figure preserving aspect
+ pcolor make a pseudocolor plot
+ plot make a line plot
+ plotfile plot data from a flat file
+ psd make a plot of power spectral density
+ quiver make a direction field (arrows) plot
+ rc control the default params
+ savefig save the current figure
+ scatter make a scatter plot
+ setp set a handle graphics property
+ semilogx log x axis
+ semilogy log y axis
+ show show the figures
+ specgram a spectrogram plot
+ stem make a stem plot
+ subplot make a subplot (numrows, numcols, axesnum)
+ table add a table to the axes
+ text add some text at location x,y to the current axes
+ title add a title to the current axes
+ xlabel add an xlabel to the current axes
+ ylabel add a ylabel to the current axes
+ ============ =================================================
The following commands will set the default colormap accordingly:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-12-16 16:13:12
|
Revision: 6629
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6629&view=rev
Author: jdh2358
Date: 2008-12-16 16:13:07 +0000 (Tue, 16 Dec 2008)
Log Message:
-----------
applied Darren's sphinx patch, cleaned up some docstrings
Modified Paths:
--------------
branches/v0_98_5_maint/doc/api/api_changes.rst
branches/v0_98_5_maint/doc/api/font_manager_api.rst
branches/v0_98_5_maint/doc/pyplots/plotmap.py
branches/v0_98_5_maint/doc/sphinxext/inheritance_diagram.py
branches/v0_98_5_maint/doc/sphinxext/mathmpl.py
branches/v0_98_5_maint/doc/sphinxext/only_directives.py
branches/v0_98_5_maint/doc/users/event_handling.rst
branches/v0_98_5_maint/lib/matplotlib/collections.py
branches/v0_98_5_maint/lib/matplotlib/pyplot.py
branches/v0_98_5_maint/lib/matplotlib/ticker.py
Modified: branches/v0_98_5_maint/doc/api/api_changes.rst
===================================================================
--- branches/v0_98_5_maint/doc/api/api_changes.rst 2008-12-16 16:12:33 UTC (rev 6628)
+++ branches/v0_98_5_maint/doc/api/api_changes.rst 2008-12-16 16:13:07 UTC (rev 6629)
@@ -253,7 +253,7 @@
`Axes.toggle_log_lineary()` has been removed.
:mod:`matplotlib.artist`
-~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~
============================================================ ============================================================
Old method New method
Modified: branches/v0_98_5_maint/doc/api/font_manager_api.rst
===================================================================
--- branches/v0_98_5_maint/doc/api/font_manager_api.rst 2008-12-16 16:12:33 UTC (rev 6628)
+++ branches/v0_98_5_maint/doc/api/font_manager_api.rst 2008-12-16 16:13:07 UTC (rev 6629)
@@ -11,7 +11,7 @@
:show-inheritance:
:mod:`matplotlib.fontconfig_pattern`
-==============================
+========================================
.. automodule:: matplotlib.fontconfig_pattern
:members:
Modified: branches/v0_98_5_maint/doc/pyplots/plotmap.py
===================================================================
--- branches/v0_98_5_maint/doc/pyplots/plotmap.py 2008-12-16 16:12:33 UTC (rev 6628)
+++ branches/v0_98_5_maint/doc/pyplots/plotmap.py 2008-12-16 16:13:07 UTC (rev 6629)
@@ -11,7 +11,7 @@
# read in topo data (on a regular lat/lon grid)
# longitudes go from 20 to 380.
# you can get this data from matplolib svn matplotlib/htdocs/screenshots/data/
-datadir = '/home/jdhunter/python/svn/matplotlib/htdocs/screenshots/data/'
+datadir = '/home/jdhunter/python/svn/matplotlib/trunk/htdocs/screenshots/data/'
if not os.path.exists(datadir):
raise SystemExit('You need to download the data with svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/htdocs/screenshots/data/" and set the datadir variable in %s'%__file__)
Modified: branches/v0_98_5_maint/doc/sphinxext/inheritance_diagram.py
===================================================================
--- branches/v0_98_5_maint/doc/sphinxext/inheritance_diagram.py 2008-12-16 16:12:33 UTC (rev 6628)
+++ branches/v0_98_5_maint/doc/sphinxext/inheritance_diagram.py 2008-12-16 16:13:07 UTC (rev 6629)
@@ -39,8 +39,6 @@
from md5 import md5
from docutils.nodes import Body, Element
-from docutils.writers.html4css1 import HTMLTranslator
-from sphinx.latexwriter import LaTeXTranslator
from docutils.parsers.rst import directives
from sphinx.roles import xfileref_role
@@ -409,12 +407,9 @@
inheritance_diagram_directive)
def setup(app):
- app.add_node(inheritance_diagram)
-
- HTMLTranslator.visit_inheritance_diagram = \
- visit_inheritance_diagram(html_output_graph)
- HTMLTranslator.depart_inheritance_diagram = do_nothing
-
- LaTeXTranslator.visit_inheritance_diagram = \
- visit_inheritance_diagram(latex_output_graph)
- LaTeXTranslator.depart_inheritance_diagram = do_nothing
+ app.add_node(inheritance_diagram,
+ html=(visit_inheritance_diagram(html_output_graph),
+ do_nothing))
+ app.add_node(inheritance_diagram,
+ latex=(visit_inheritance_diagram(latex_output_graph),
+ do_nothing))
Modified: branches/v0_98_5_maint/doc/sphinxext/mathmpl.py
===================================================================
--- branches/v0_98_5_maint/doc/sphinxext/mathmpl.py 2008-12-16 16:12:33 UTC (rev 6628)
+++ branches/v0_98_5_maint/doc/sphinxext/mathmpl.py 2008-12-16 16:13:07 UTC (rev 6629)
@@ -6,8 +6,6 @@
from docutils import nodes
from docutils.parsers.rst import directives
-from docutils.writers.html4css1 import HTMLTranslator
-from sphinx.latexwriter import LaTeXTranslator
import warnings
# Define LaTeX math node:
@@ -69,8 +67,6 @@
self.body.append(latex2html(node, source))
def depart_latex_math_html(self, node):
pass
- HTMLTranslator.visit_latex_math = visit_latex_math_html
- HTMLTranslator.depart_latex_math = depart_latex_math_html
# Add visit/depart methods to LaTeX-Translator:
def visit_latex_math_latex(self, node):
@@ -83,9 +79,14 @@
'\\end{equation}'])
def depart_latex_math_latex(self, node):
pass
- LaTeXTranslator.visit_latex_math = visit_latex_math_latex
- LaTeXTranslator.depart_latex_math = depart_latex_math_latex
+ app.add_node(latex_math, html=(visit_latex_math_html,
+ depart_latex_math_html))
+ app.add_node(latex_math, latex=(visit_latex_math_latex,
+ depart_latex_math_latex))
+ app.add_role('math', math_role)
+
+
from matplotlib import rcParams
from matplotlib.mathtext import MathTextParser
rcParams['mathtext.fontset'] = 'cm'
Modified: branches/v0_98_5_maint/doc/sphinxext/only_directives.py
===================================================================
--- branches/v0_98_5_maint/doc/sphinxext/only_directives.py 2008-12-16 16:12:33 UTC (rev 6628)
+++ branches/v0_98_5_maint/doc/sphinxext/only_directives.py 2008-12-16 16:13:07 UTC (rev 6629)
@@ -4,8 +4,6 @@
#
from docutils.nodes import Body, Element
-from docutils.writers.html4css1 import HTMLTranslator
-from sphinx.latexwriter import LaTeXTranslator
from docutils.parsers.rst import directives
class html_only(Body, Element):
@@ -63,9 +61,6 @@
directives.register_directive('latexonly', LatexOnlyDirective)
def setup(app):
- app.add_node(html_only)
- app.add_node(latex_only)
-
# Add visit/depart methods to HTML-Translator:
def visit_perform(self, node):
pass
@@ -76,12 +71,7 @@
def depart_ignore(self, node):
node.children = []
- HTMLTranslator.visit_html_only = visit_perform
- HTMLTranslator.depart_html_only = depart_perform
- HTMLTranslator.visit_latex_only = visit_ignore
- HTMLTranslator.depart_latex_only = depart_ignore
-
- LaTeXTranslator.visit_html_only = visit_ignore
- LaTeXTranslator.depart_html_only = depart_ignore
- LaTeXTranslator.visit_latex_only = visit_perform
- LaTeXTranslator.depart_latex_only = depart_perform
+ app.add_node(html_only, html=(visit_perform, depart_perform))
+ app.add_node(html_only, latex=(visit_ignore, depart_ignore))
+ app.add_node(latex_only, latex=(visit_perform, depart_perform))
+ app.add_node(latex_only, html=(visit_ignore, depart_ignore))
Modified: branches/v0_98_5_maint/doc/users/event_handling.rst
===================================================================
--- branches/v0_98_5_maint/doc/users/event_handling.rst 2008-12-16 16:12:33 UTC (rev 6628)
+++ branches/v0_98_5_maint/doc/users/event_handling.rst 2008-12-16 16:13:07 UTC (rev 6629)
@@ -64,8 +64,8 @@
'scroll_event' :class:`~matplotlib.backend_bases.MouseEvent` - mouse scroll wheel is rolled
'figure_enter_event' :class:`~matplotlib.backend_bases.LocationEvent` - mouse enters a new figure
'figure_leave_event' :class:`~matplotlib.backend_bases.LocationEvent` - mouse leaves a figure
-'axes_enter_event' :class:`~matplotlib.backend_bases.LocationEvent` - mouse enters a new axes
-'axes_leave_event' :class:`~matplotlib.backend_bases.LocationEvent` - mouse leaves an axes
+'axes_enter_event' :class:`~matplotlib.backend_bases.LocationEvent` - mouse enters a new axes
+'axes_leave_event' :class:`~matplotlib.backend_bases.LocationEvent` - mouse leaves an axes
======================= ======================================================================================
.. _event-attributes:
Modified: branches/v0_98_5_maint/lib/matplotlib/collections.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/collections.py 2008-12-16 16:12:33 UTC (rev 6628)
+++ branches/v0_98_5_maint/lib/matplotlib/collections.py 2008-12-16 16:13:07 UTC (rev 6629)
@@ -703,7 +703,7 @@
on the y-axis from *ymin* to *ymax*
A :class:`BrokenBarHCollection` is returned.
- **kwargs are passed on to the collection
+ *kwargs* are passed on to the collection
"""
xranges = []
for ind0, ind1 in mlab.contiguous_regions(where):
Modified: branches/v0_98_5_maint/lib/matplotlib/pyplot.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/pyplot.py 2008-12-16 16:12:33 UTC (rev 6628)
+++ branches/v0_98_5_maint/lib/matplotlib/pyplot.py 2008-12-16 16:13:07 UTC (rev 6629)
@@ -603,7 +603,7 @@
*axisbg*:
The background color of the subplot, which can be any valid
- color specifier. See :module:`matplotlib.colors` for more
+ color specifier. See :mod:`matplotlib.colors` for more
information.
*polar*:
@@ -1138,63 +1138,62 @@
def plotting():
"""
Plotting commands
-
- ========= =================================================
- Command Description
- ========= =================================================
- axes Create a new axes
- axis Set or return the current axis limits
- bar make a bar chart
- boxplot make a box and whiskers chart
- cla clear current axes
- clabel label a contour plot
- clf clear a figure window
- close close a figure window
- colorbar add a colorbar to the current figure
- cohere make a plot of coherence
- contour make a contour plot
- contourf make a filled contour plot
- csd make a plot of cross spectral density
- draw force a redraw of the current figure
- errorbar make an errorbar graph
- figlegend add a legend to the figure
- figimage add an image to the figure, w/o resampling
- figtext add text in figure coords
- figure create or change active figure
- fill make filled polygons
+ ============ =================================================
+ Command Description
+ ========= =================================================
+ axes Create a new axes
+ axis Set or return the current axis limits
+ bar make a bar chart
+ boxplot make a box and whiskers chart
+ cla clear current axes
+ clabel label a contour plot
+ clf clear a figure window
+ close close a figure window
+ colorbar add a colorbar to the current figure
+ cohere make a plot of coherence
+ contour make a contour plot
+ contourf make a filled contour plot
+ csd make a plot of cross spectral density
+ draw force a redraw of the current figure
+ errorbar make an errorbar graph
+ figlegend add a legend to the figure
+ figimage add an image to the figure, w/o resampling
+ figtext add text in figure coords
+ figure create or change active figure
+ fill make filled polygons
fill_between make filled polygons
- gca return the current axes
- gcf return the current figure
- gci get the current image, or None
- getp get a handle graphics property
- hist make a histogram
- hold set the hold state on current axes
- legend add a legend to the axes
- loglog a log log plot
- imread load image file into array
- imshow plot image data
- matshow display a matrix in a new figure preserving aspect
- pcolor make a pseudocolor plot
- plot make a line plot
- plotfile plot data from a flat file
- psd make a plot of power spectral density
- quiver make a direction field (arrows) plot
- rc control the default params
- savefig save the current figure
- scatter make a scatter plot
- setp set a handle graphics property
- semilogx log x axis
- semilogy log y axis
- show show the figures
- specgram a spectrogram plot
- stem make a stem plot
- subplot make a subplot (numrows, numcols, axesnum)
- table add a table to the axes
- text add some text at location x,y to the current axes
- title add a title to the current axes
- xlabel add an xlabel to the current axes
- ylabel add a ylabel to the current axes
- ========= =================================================
+ gca return the current axes
+ gcf return the current figure
+ gci get the current image, or None
+ getp get a handle graphics property
+ hist make a histogram
+ hold set the hold state on current axes
+ legend add a legend to the axes
+ loglog a log log plot
+ imread load image file into array
+ imshow plot image data
+ matshow display a matrix in a new figure preserving aspect
+ pcolor make a pseudocolor plot
+ plot make a line plot
+ plotfile plot data from a flat file
+ psd make a plot of power spectral density
+ quiver make a direction field (arrows) plot
+ rc control the default params
+ savefig save the current figure
+ scatter make a scatter plot
+ setp set a handle graphics property
+ semilogx log x axis
+ semilogy log y axis
+ show show the figures
+ specgram a spectrogram plot
+ stem make a stem plot
+ subplot make a subplot (numrows, numcols, axesnum)
+ table add a table to the axes
+ text add some text at location x,y to the current axes
+ title add a title to the current axes
+ xlabel add an xlabel to the current axes
+ ylabel add a ylabel to the current axes
+ ============ =================================================
The following commands will set the default colormap accordingly:
Modified: branches/v0_98_5_maint/lib/matplotlib/ticker.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/ticker.py 2008-12-16 16:12:33 UTC (rev 6628)
+++ branches/v0_98_5_maint/lib/matplotlib/ticker.py 2008-12-16 16:13:07 UTC (rev 6629)
@@ -213,7 +213,7 @@
'Return fixed strings for tick labels'
def __init__(self, seq):
"""
- seq is a sequence of strings. For positions ``i<len(seq)` return
+ seq is a sequence of strings. For positions `i<len(seq)` return
*seq[i]* regardless of *x*. Otherwise return ''
"""
self.seq = seq
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-12-16 16:12:38
|
Revision: 6628
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6628&view=rev
Author: jdh2358
Date: 2008-12-16 16:12:33 +0000 (Tue, 16 Dec 2008)
Log Message:
-----------
applied Darren's sphinx patch, cleaned up some docstrings
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-12-16 14:44:09 UTC (rev 6627)
+++ trunk/matplotlib/CHANGELOG 2008-12-16 16:12:33 UTC (rev 6628)
@@ -1,5 +1,5 @@
2008-12-15 Fix \$ in non-math text with usetex off. Document
-differences between usetex on/off - MGD
+ differences between usetex on/off - MGD
2008-12-15 Fix anti-aliasing when auto-snapping - MGD
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-12-16 14:44:25
|
Revision: 6627
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6627&view=rev
Author: jdh2358
Date: 2008-12-16 14:44:09 +0000 (Tue, 16 Dec 2008)
Log Message:
-----------
removed mpl_data link
Modified Paths:
--------------
branches/v0_98_5_maint/CHANGELOG
branches/v0_98_5_maint/doc/README.txt
branches/v0_98_5_maint/doc/devel/documenting_mpl.rst
branches/v0_98_5_maint/doc/make.py
branches/v0_98_5_maint/doc/users/customizing.rst
branches/v0_98_5_maint/doc/users/navigation_toolbar.rst
Modified: branches/v0_98_5_maint/CHANGELOG
===================================================================
--- branches/v0_98_5_maint/CHANGELOG 2008-12-15 21:04:03 UTC (rev 6626)
+++ branches/v0_98_5_maint/CHANGELOG 2008-12-16 14:44:09 UTC (rev 6627)
@@ -1,3 +1,10 @@
+2008-12-15 Removed mpl_data symlink in docs. On platforms that do not
+ support symlinks, these become copies, and the font files
+ are large, so the distro becomes unneccessarily bloaded.
+ Keeping the mpl_examples dir because relative links are
+ harder for the plot directive and the *.py files are not so
+ large. - JDH
+
2008-12-15 Fix \$ in non-math text with usetex off. Document
differences between usetex on/off - MGD
Modified: branches/v0_98_5_maint/doc/README.txt
===================================================================
--- branches/v0_98_5_maint/doc/README.txt 2008-12-15 21:04:03 UTC (rev 6626)
+++ branches/v0_98_5_maint/doc/README.txt 2008-12-16 14:44:09 UTC (rev 6627)
@@ -27,9 +27,6 @@
* sphinxext - Sphinx extensions for the mpl docs
-* mpl_data - a symbolic link to the matplotlib data for reference by
- sphinx documentation
-
* mpl_examples - a link to the matplotlib examples in case any
documentation wants to literal include them
Modified: branches/v0_98_5_maint/doc/devel/documenting_mpl.rst
===================================================================
--- branches/v0_98_5_maint/doc/devel/documenting_mpl.rst 2008-12-15 21:04:03 UTC (rev 6626)
+++ branches/v0_98_5_maint/doc/devel/documenting_mpl.rst 2008-12-16 14:44:09 UTC (rev 6627)
@@ -271,26 +271,41 @@
==========================
In the documentation, you may want to include to a document in the
-matplotlib src, e.g. a license file, an image file from `mpl-data`, or an
-example. When you include these files, include them using a symbolic
-link from the documentation parent directory. This way, if we
-relocate the mpl documentation directory, all of the internal pointers
-to files will not have to change, just the top level symlinks. For
-example, In the top level doc directory we have symlinks pointing to
-the mpl `examples` and `mpl-data`::
+matplotlib src, e.g. a license file or an image file from `mpl-data`,
+refer to it via a relative path from the document where the rst file
+resides, eg, in :file:`users/navigation_toolbar.rst`, we refer to the
+image icons with::
- home:~/mpl/doc2> ls -l mpl_*
- mpl_data -> ../lib/matplotlib/mpl-data
- mpl_examples -> ../examples
+ .. image:: ../../lib/matplotlib/mpl-data/images/subplots.png
-
In the `users` subdirectory, if I want to refer to a file in the mpl-data
directory, I use the symlink directory. For example, from
`customizing.rst`::
- .. literalinclude:: ../mpl_data/matplotlibrc
+ .. literalinclude:: ../../lib/matplotlib/mpl-data/matplotlibrc
+On exception to this is when referring to the examples dir. Relative
+paths are extremely confusing in the sphinx plot extensions, so
+without getting into the dirty details, it is easier to simply include
+a symlink to the files at the top doc level directory. This way, API
+documents like :meth:`matplotlib.pyplot.plot` can refer to the
+examples in a known location.
+In the top level doc directory we have symlinks pointing to
+the mpl `examples`::
+
+ home:~/mpl/doc> ls -l mpl_*
+ mpl_examples -> ../examples
+
+So we can include plots from the examples dir using the symlink::
+
+ .. plot:: mpl_examples/pylab_examples/simple_plot.py
+
+
+We used to use a symlink for :file:`mpl-data` too, but the distro
+becomes very large on platforms that do not support links (eg the font
+files are duplicated and large)
+
.. _internal-section-refs:
Internal section references
Modified: branches/v0_98_5_maint/doc/make.py
===================================================================
--- branches/v0_98_5_maint/doc/make.py 2008-12-15 21:04:03 UTC (rev 6626)
+++ branches/v0_98_5_maint/doc/make.py 2008-12-16 14:44:09 UTC (rev 6627)
@@ -41,7 +41,7 @@
check_build()
if not os.path.exists('examples/index.rst'):
examples()
- shutil.copy('mpl_data/matplotlibrc', '_static/matplotlibrc')
+ shutil.copy('../lib/matplotlib/mpl-data/matplotlibrc', '_static/matplotlibrc')
#figs()
if os.system('sphinx-build -b html -d build/doctrees . build/html'):
raise SystemExit("Building HTML failed.")
Modified: branches/v0_98_5_maint/doc/users/customizing.rst
===================================================================
--- branches/v0_98_5_maint/doc/users/customizing.rst 2008-12-15 21:04:03 UTC (rev 6626)
+++ branches/v0_98_5_maint/doc/users/customizing.rst 2008-12-16 14:44:09 UTC (rev 6627)
@@ -67,4 +67,4 @@
`(download) <../_static/matplotlibrc>`__
-.. literalinclude:: ../mpl_data/matplotlibrc
+.. literalinclude:: ../../lib/matplotlib/mpl-data/matplotlibrc
Modified: branches/v0_98_5_maint/doc/users/navigation_toolbar.rst
===================================================================
--- branches/v0_98_5_maint/doc/users/navigation_toolbar.rst 2008-12-15 21:04:03 UTC (rev 6626)
+++ branches/v0_98_5_maint/doc/users/navigation_toolbar.rst 2008-12-16 14:44:09 UTC (rev 6627)
@@ -9,11 +9,11 @@
to navigate through the data set. Here is a description of each of
the buttons at the bottom of the toolbar
-.. image:: ../mpl_data/images/home.png
+.. image:: ../../lib/matplotlib/mpl-data/images/home.png
-.. image:: ../mpl_data/images/back.png
+.. image:: ../../lib/matplotlib/mpl-data/images/back.png
-.. image:: ../mpl_data/images/forward.png
+.. image:: ../../lib/matplotlib/mpl-data/images/forward.png
The ``Forward`` and ``Back`` buttons
These are akin to the web browser forward and back buttons. They
@@ -26,7 +26,7 @@
``Back``, think web browser where data views are web pages. Use
the pan and zoom to rectangle to define new views.
-.. image:: ../mpl_data/images/move.png
+.. image:: ../../lib/matplotlib/mpl-data/images/move.png
The ``Pan/Zoom`` button
This button has two modes: pan and zoom. Click the toolbar button
@@ -50,7 +50,7 @@
mouse button. The radius scale can be zoomed in and out using the
right mouse button.
-.. image:: ../mpl_data/images/zoom_to_rect.png
+.. image:: ../../lib/matplotlib/mpl-data/images/zoom_to_rect.png
The ``Zoom-to-rectangle`` button
Click this toolbar button to activate this mode. Put your mouse
@@ -61,14 +61,14 @@
with the right button, which will place your entire axes in the
region defined by the zoom out rectangle.
-.. image:: ../mpl_data/images/subplots.png
+.. image:: ../../lib/matplotlib/mpl-data/images/subplots.png
The ``Subplot-configuration`` button
Use this tool to configure the parameters of the subplot: the
left, right, top, bottom, space between the rows and space between
the columns.
-.. image:: ../mpl_data/images/filesave.png
+.. image:: ../../lib/matplotlib/mpl-data/images/filesave.png
The ``Save`` button
Click this button to launch a file save dialog. You can save
@@ -84,14 +84,14 @@
================================== ==============================================
Home/Reset **h** or **r** or **home**
Back **c** or **left arrow** or **backspace**
-Forward **v** or **right arrow**
-Pan/Zoom **p**
-Zoom-to-rect **o**
-Save **s**
+Forward **v** or **right arrow**
+Pan/Zoom **p**
+Zoom-to-rect **o**
+Save **s**
Toggle fullscreen **f**
Constrain pan/zoom to x axis hold **x**
Constrain pan/zoom to y axis hold **y**
-Preserve aspect ratio hold **CONTROL**
+Preserve aspect ratio hold **CONTROL**
Toggle grid **g**
Toggle y axis scale (log/linear) **l**
================================== ==============================================
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-12-15 21:04:07
|
Revision: 6626
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6626&view=rev
Author: mdboom
Date: 2008-12-15 21:04:03 +0000 (Mon, 15 Dec 2008)
Log Message:
-----------
Merged revisions 6625 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r6625 | mdboom | 2008-12-15 15:49:22 -0500 (Mon, 15 Dec 2008) | 2 lines
Fix docstring formatting.
........
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/axes.py
Property Changed:
----------------
trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6623
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6625
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625
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
+ /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-12-15 20:49:22 UTC (rev 6625)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-12-15 21:04:03 UTC (rev 6626)
@@ -3182,7 +3182,7 @@
Return value is a list of lines that were added.
The following format string characters are accepted to control
- the line style or marker
+ the line style or marker:
================ ===============================
character description
@@ -3216,7 +3216,7 @@
================ ===============================
- The following color abbreviations are supported::
+ The following color abbreviations are supported:
========== ========
character color
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-12-15 20:49:26
|
Revision: 6625
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6625&view=rev
Author: mdboom
Date: 2008-12-15 20:49:22 +0000 (Mon, 15 Dec 2008)
Log Message:
-----------
Fix docstring formatting.
Modified Paths:
--------------
branches/v0_98_5_maint/lib/matplotlib/axes.py
Modified: branches/v0_98_5_maint/lib/matplotlib/axes.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/axes.py 2008-12-15 20:48:34 UTC (rev 6624)
+++ branches/v0_98_5_maint/lib/matplotlib/axes.py 2008-12-15 20:49:22 UTC (rev 6625)
@@ -3174,7 +3174,7 @@
Return value is a list of lines that were added.
The following format string characters are accepted to control
- the line style or marker
+ the line style or marker:
================ ===============================
character description
@@ -3208,7 +3208,7 @@
================ ===============================
- The following color abbreviations are supported::
+ The following color abbreviations are supported:
========== ========
character color
@@ -5593,7 +5593,7 @@
%(PolyCollection)s
- .. plot:: mpl_examples/pylab_examples/fill_between.py
+ .. plot:: mpl_examples/pylab_examples/fill_between.py
"""
# Handle united data, such as dates
self._process_unit_info(xdata=x, ydata=y1, kwargs=kwargs)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-12-15 20:48:38
|
Revision: 6624
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6624&view=rev
Author: jdh2358
Date: 2008-12-15 20:48:34 +0000 (Mon, 15 Dec 2008)
Log Message:
-----------
Merged revisions 6621-6622 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r6621 | jdh2358 | 2008-12-15 12:19:01 -0800 (Mon, 15 Dec 2008) | 1 line
hack to prevent distutils from linking our files
........
r6622 | jdh2358 | 2008-12-15 12:45:20 -0800 (Mon, 15 Dec 2008) | 1 line
hack to prevent distutils from creating links in our sdist
........
Modified Paths:
--------------
trunk/matplotlib/MANIFEST.in
trunk/matplotlib/setup.py
Property Changed:
----------------
trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6619
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6623
Modified: trunk/matplotlib/MANIFEST.in
===================================================================
--- trunk/matplotlib/MANIFEST.in 2008-12-15 20:46:00 UTC (rev 6623)
+++ trunk/matplotlib/MANIFEST.in 2008-12-15 20:48:34 UTC (rev 6624)
@@ -1,7 +1,7 @@
include CHANGELOG KNOWN_BUGS INSTALL
include INTERACTIVE TODO
include Makefile MANIFEST.in MANIFEST
-include matplotlibrc.template matplotlibrc setup.cfg.template
+include matplotlibrc.template setup.cfg.template
include __init__.py setupext.py setup.py setupegg.py
include examples/data/*
include lib/mpl_toolkits
Modified: trunk/matplotlib/setup.py
===================================================================
--- trunk/matplotlib/setup.py 2008-12-15 20:46:00 UTC (rev 6623)
+++ trunk/matplotlib/setup.py 2008-12-15 20:48:34 UTC (rev 6624)
@@ -6,6 +6,11 @@
The matplotlib build options can be modified with a setup.cfg file. See
setup.cfg.template for more information.
"""
+# distutils is breaking our sdists for files in symlinked dirs.
+# distutils will copy if os.link is not available, so this is a hack
+# to force copying
+import os
+del os.link
# This dict will be updated as we try to select the best option during
# the build process. However, values in setup.cfg will be used, if
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-12-15 20:46:04
|
Revision: 6623
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6623&view=rev
Author: jdh2358
Date: 2008-12-15 20:46:00 +0000 (Mon, 15 Dec 2008)
Log Message:
-----------
bumped version number
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/__init__.py
Modified: trunk/matplotlib/lib/matplotlib/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/__init__.py 2008-12-15 20:45:20 UTC (rev 6622)
+++ trunk/matplotlib/lib/matplotlib/__init__.py 2008-12-15 20:46:00 UTC (rev 6623)
@@ -89,7 +89,7 @@
"""
from __future__ import generators
-__version__ = '0.98.5'
+__version__ = '0.98.6svn'
__revision__ = '$Revision$'
__date__ = '$Date$'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-12-15 20:45:24
|
Revision: 6622
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6622&view=rev
Author: jdh2358
Date: 2008-12-15 20:45:20 +0000 (Mon, 15 Dec 2008)
Log Message:
-----------
hack to prevent distutils from creating links in our sdist
Modified Paths:
--------------
branches/v0_98_5_maint/MANIFEST.in
branches/v0_98_5_maint/lib/matplotlib/__init__.py
Modified: branches/v0_98_5_maint/MANIFEST.in
===================================================================
--- branches/v0_98_5_maint/MANIFEST.in 2008-12-15 20:19:01 UTC (rev 6621)
+++ branches/v0_98_5_maint/MANIFEST.in 2008-12-15 20:45:20 UTC (rev 6622)
@@ -1,7 +1,7 @@
include CHANGELOG KNOWN_BUGS INSTALL
include INTERACTIVE TODO
include Makefile MANIFEST.in MANIFEST
-include matplotlibrc.template matplotlibrc setup.cfg.template
+include matplotlibrc.template setup.cfg.template
include __init__.py setupext.py setup.py setupegg.py
include examples/data/*
include lib/mpl_toolkits
Modified: branches/v0_98_5_maint/lib/matplotlib/__init__.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/__init__.py 2008-12-15 20:19:01 UTC (rev 6621)
+++ branches/v0_98_5_maint/lib/matplotlib/__init__.py 2008-12-15 20:45:20 UTC (rev 6622)
@@ -89,7 +89,7 @@
"""
from __future__ import generators
-__version__ = '0.98.5'
+__version__ = '0.98.5.1'
__revision__ = '$Revision$'
__date__ = '$Date$'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-12-15 20:19:04
|
Revision: 6621
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6621&view=rev
Author: jdh2358
Date: 2008-12-15 20:19:01 +0000 (Mon, 15 Dec 2008)
Log Message:
-----------
hack to prevent distutils from linking our files
Modified Paths:
--------------
branches/v0_98_5_maint/setup.py
Modified: branches/v0_98_5_maint/setup.py
===================================================================
--- branches/v0_98_5_maint/setup.py 2008-12-15 19:52:29 UTC (rev 6620)
+++ branches/v0_98_5_maint/setup.py 2008-12-15 20:19:01 UTC (rev 6621)
@@ -6,6 +6,11 @@
The matplotlib build options can be modified with a setup.cfg file. See
setup.cfg.template for more information.
"""
+# distutils is breaking our sdists for files in symlinked dirs.
+# distutils will copy if os.link is not available, so this is a hack
+# to force copying
+import os
+del os.link
# This dict will be updated as we try to select the best option during
# the build process. However, values in setup.cfg will be used, if
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-12-15 19:52:32
|
Revision: 6620
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6620&view=rev
Author: jdh2358
Date: 2008-12-15 19:52:29 +0000 (Mon, 15 Dec 2008)
Log Message:
-----------
Merged revisions 6618 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r6618 | jdh2358 | 2008-12-15 11:42:23 -0800 (Mon, 15 Dec 2008) | 1 line
removed deprecated files from manifest
........
Modified Paths:
--------------
trunk/matplotlib/MANIFEST.in
Property Changed:
----------------
trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6616
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6619
Modified: trunk/matplotlib/MANIFEST.in
===================================================================
--- trunk/matplotlib/MANIFEST.in 2008-12-15 19:46:34 UTC (rev 6619)
+++ trunk/matplotlib/MANIFEST.in 2008-12-15 19:52:29 UTC (rev 6620)
@@ -1,8 +1,8 @@
-include API_CHANGES CHANGELOG KNOWN_BUGS INSTALL NUMARRAY_ISSUES
+include CHANGELOG KNOWN_BUGS INSTALL
include INTERACTIVE TODO
include Makefile MANIFEST.in MANIFEST
include matplotlibrc.template matplotlibrc setup.cfg.template
-include __init__.py setupext.py setup.py setupegg.py makeswig.py
+include __init__.py setupext.py setup.py setupegg.py
include examples/data/*
include lib/mpl_toolkits
include lib/matplotlib/mpl-data/matplotlib.conf
@@ -20,5 +20,4 @@
recursive-include CXX *.cxx *.hxx *.c *.h
recursive-include agg24 *
recursive-include lib *
-recursive-include swig *
recursive-include ttconv *.cpp *.h
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-12-15 19:46:38
|
Revision: 6619
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6619&view=rev
Author: jdh2358
Date: 2008-12-15 19:46:34 +0000 (Mon, 15 Dec 2008)
Log Message:
-----------
removed plot example from mathtext - doesn't work in pdf
Modified Paths:
--------------
trunk/matplotlib/doc/users/mathtext.rst
Modified: trunk/matplotlib/doc/users/mathtext.rst
===================================================================
--- trunk/matplotlib/doc/users/mathtext.rst 2008-12-15 19:42:23 UTC (rev 6618)
+++ trunk/matplotlib/doc/users/mathtext.rst 2008-12-15 19:46:34 UTC (rev 6619)
@@ -321,8 +321,8 @@
.. plot:: pyplots/pyplot_mathtext.py
:include-source:
-.. plot:: mpl_examples/pylab_examples/mathtext_examples.py
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-12-15 19:42:27
|
Revision: 6618
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6618&view=rev
Author: jdh2358
Date: 2008-12-15 19:42:23 +0000 (Mon, 15 Dec 2008)
Log Message:
-----------
removed deprecated files from manifest
Modified Paths:
--------------
branches/v0_98_5_maint/MANIFEST.in
Modified: branches/v0_98_5_maint/MANIFEST.in
===================================================================
--- branches/v0_98_5_maint/MANIFEST.in 2008-12-15 18:06:52 UTC (rev 6617)
+++ branches/v0_98_5_maint/MANIFEST.in 2008-12-15 19:42:23 UTC (rev 6618)
@@ -1,8 +1,8 @@
-include API_CHANGES CHANGELOG KNOWN_BUGS INSTALL NUMARRAY_ISSUES
+include CHANGELOG KNOWN_BUGS INSTALL
include INTERACTIVE TODO
include Makefile MANIFEST.in MANIFEST
include matplotlibrc.template matplotlibrc setup.cfg.template
-include __init__.py setupext.py setup.py setupegg.py makeswig.py
+include __init__.py setupext.py setup.py setupegg.py
include examples/data/*
include lib/mpl_toolkits
include lib/matplotlib/mpl-data/matplotlib.conf
@@ -20,5 +20,4 @@
recursive-include CXX *.cxx *.hxx *.c *.h
recursive-include agg24 *
recursive-include lib *
-recursive-include swig *
recursive-include ttconv *.cpp *.h
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-12-15 18:06:55
|
Revision: 6617
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6617&view=rev
Author: mdboom
Date: 2008-12-15 18:06:52 +0000 (Mon, 15 Dec 2008)
Log Message:
-----------
Merged revisions 6616 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r6616 | mdboom | 2008-12-15 13:06:13 -0500 (Mon, 15 Dec 2008) | 1 line
Forgot to add to CHANGELOG
........
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
Property Changed:
----------------
trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6614
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6616
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2008-12-15 18:06:13 UTC (rev 6616)
+++ trunk/matplotlib/CHANGELOG 2008-12-15 18:06:52 UTC (rev 6617)
@@ -1,3 +1,6 @@
+2008-12-15 Fix \$ in non-math text with usetex off. Document
+differences between usetex on/off - MGD
+
2008-12-15 Fix anti-aliasing when auto-snapping - MGD
2008-12-15 Fix grid lines not moving correctly during pan and zoom - MGD
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
+ /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-12-15 18:06:17
|
Revision: 6616
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6616&view=rev
Author: mdboom
Date: 2008-12-15 18:06:13 +0000 (Mon, 15 Dec 2008)
Log Message:
-----------
Forgot to add to CHANGELOG
Modified Paths:
--------------
branches/v0_98_5_maint/CHANGELOG
Modified: branches/v0_98_5_maint/CHANGELOG
===================================================================
--- branches/v0_98_5_maint/CHANGELOG 2008-12-15 18:04:45 UTC (rev 6615)
+++ branches/v0_98_5_maint/CHANGELOG 2008-12-15 18:06:13 UTC (rev 6616)
@@ -1,3 +1,6 @@
+2008-12-15 Fix \$ in non-math text with usetex off. Document
+differences between usetex on/off - MGD
+
2008-12-15 Fix anti-aliasing when auto-snapping - MGD
2008-12-15 Fix grid lines not moving correctly during pan and zoom - MGD
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-12-15 18:04:49
|
Revision: 6615
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6615&view=rev
Author: mdboom
Date: 2008-12-15 18:04:45 +0000 (Mon, 15 Dec 2008)
Log Message:
-----------
Merged revisions 6614 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_98_5_maint
........
r6614 | mdboom | 2008-12-15 13:03:34 -0500 (Mon, 15 Dec 2008) | 1 line
Backporting 6613: Making $ work in regular text
........
Property Changed:
----------------
trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6609
+ /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6614
Modified: svn:mergeinfo
- /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609
+ /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614
Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609
+ /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-12-15 18:03:37
|
Revision: 6614
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6614&view=rev
Author: mdboom
Date: 2008-12-15 18:03:34 +0000 (Mon, 15 Dec 2008)
Log Message:
-----------
Backporting 6613: Making $ work in regular text
Modified Paths:
--------------
branches/v0_98_5_maint/doc/users/mathtext.rst
branches/v0_98_5_maint/doc/users/text_intro.rst
branches/v0_98_5_maint/doc/users/usetex.rst
branches/v0_98_5_maint/lib/matplotlib/offsetbox.py
branches/v0_98_5_maint/lib/matplotlib/text.py
Modified: branches/v0_98_5_maint/doc/users/mathtext.rst
===================================================================
--- branches/v0_98_5_maint/doc/users/mathtext.rst 2008-12-15 17:58:43 UTC (rev 6613)
+++ branches/v0_98_5_maint/doc/users/mathtext.rst 2008-12-15 18:03:34 UTC (rev 6614)
@@ -3,17 +3,19 @@
Writing mathematical expressions
================================
-You can use TeX markup in any matplotlib text string. Note that you
-do not need to have TeX installed, since matplotlib ships its own TeX
-expression parser, layout engine and fonts. The layout engine is a
-fairly direct adaptation of the layout algorithms in Donald Knuth's
-TeX, so the quality is quite good (matplotlib also provides a
-``usetex`` option for those who do want to call out to TeX to generate
-their text (see :ref:`usetex-tutorial`).
+You can use a subset TeX markup in any matplotlib text string by
+placing it inside a pair of dollar signs ($).
-Any text element can use math text. You need to use raw strings
-(preceed the quotes with an ``'r'``), and surround the string text
-with dollar signs, as in TeX. Regular text and mathtext can be
+Note that you do not need to have TeX installed, since matplotlib
+ships its own TeX expression parser, layout engine and fonts. The
+layout engine is a fairly direct adaptation of the layout algorithms
+in Donald Knuth's TeX, so the quality is quite good (matplotlib also
+provides a ``usetex`` option for those who do want to call out to TeX
+to generate their text (see :ref:`usetex-tutorial`).
+
+Any text element can use math text. You should use raw strings
+(preceed the quotes with an ``'r'``), and surround the math text with
+dollar signs ($), as in TeX. Regular text and mathtext can be
interleaved within the same string. Mathtext can use the Computer
Modern fonts (from (La)TeX), `STIX <http://www.aip.org/stixfonts/>`_
fonts (with are designed to blend well with Times) or a Unicode font
@@ -35,6 +37,26 @@
produces ":math:`\alpha > \beta`".
+.. note::
+ Mathtext should be placed between a pair of dollar signs ($). To
+ make it easy to display monetary values, e.g. "$100.00", if a
+ single dollar sign is present in the entire string, it will be
+ displayed verbatim as a dollar sign. This is a small change from
+ regular TeX, where the dollar sign in non-math text would have to
+ be escaped ('\$').
+
+.. note::
+ While the syntax inside the pair of dollar signs ($) aims to be
+ TeX-like, the text outside does not. In particular, characters
+ such as::
+
+ # $ % & ~ _ ^ \ { } \( \) \[ \]
+
+ have special meaning outside of math mode in TeX. Therefore, these
+ characters will behave differently depending on the rcParam
+ ``text.usetex`` flag. See the :ref:`usetex tutorial
+ <usetex-tutorial>` for more information.
+
Subscripts and superscripts
---------------------------
Modified: branches/v0_98_5_maint/doc/users/text_intro.rst
===================================================================
--- branches/v0_98_5_maint/doc/users/text_intro.rst 2008-12-15 17:58:43 UTC (rev 6613)
+++ branches/v0_98_5_maint/doc/users/text_intro.rst 2008-12-15 18:03:34 UTC (rev 6614)
@@ -18,8 +18,8 @@
weight, text location and color, etc) with sensible defaults set in
the rc file. And significantly for those interested in mathematical
or scientific figures, matplotlib implements a large number of TeX
-math symbols and commands, to support mathematical expressions
-anywhere in your figure.
+math symbols and commands, to support :ref:`mathematical expressions
+<mathtext-tutorial>` anywhere in your figure.
Basic text commands
Modified: branches/v0_98_5_maint/doc/users/usetex.rst
===================================================================
--- branches/v0_98_5_maint/doc/users/usetex.rst 2008-12-15 17:58:43 UTC (rev 6613)
+++ branches/v0_98_5_maint/doc/users/usetex.rst 2008-12-15 18:03:34 UTC (rev 6614)
@@ -59,6 +59,14 @@
command ``\displaystyle``, as in `tex_demo.py`, will produce the same
results.
+.. note::
+ Certain characters require special escaping in TeX, such as::
+
+ # $ % & ~ _ ^ \ { } \( \) \[ \]
+
+ Therefore, these characters will behave differently depending on
+ the rcParam ``text.usetex`` flag.
+
.. _usetex-unicode:
usetex with unicode
Modified: branches/v0_98_5_maint/lib/matplotlib/offsetbox.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/offsetbox.py 2008-12-15 17:58:43 UTC (rev 6613)
+++ branches/v0_98_5_maint/lib/matplotlib/offsetbox.py 2008-12-15 18:03:34 UTC (rev 6614)
@@ -548,7 +548,7 @@
def get_extent(self, renderer):
- ismath = self._text.is_math_text(self._text._text)
+ clean_line, ismath = self._text.is_math_text(self._text._text)
_, h_, d_ = renderer.get_text_width_height_descent(
"lp", self._text._fontproperties, ismath=False)
@@ -558,30 +558,30 @@
line = info[0][0] # first line
_, hh, dd = renderer.get_text_width_height_descent(
- line, self._text._fontproperties, ismath=ismath)
+ clean_line, self._text._fontproperties, ismath=ismath)
self._baseline_transform.clear()
if len(info) > 1 and self._multilinebaseline: # multi line
d = h-(hh-dd) # the baseline of the first line
d_new = 0.5 * h - 0.5 * (h_ - d_)
-
+
self._baseline_transform.translate(0, d - d_new)
d = d_new
-
+
else: # single line
h_d = max(h_ - d_, h-dd)
if self.get_minimumdescent():
## to have a minimum descent, #i.e., "l" and "p" have same
- ## descents.
+ ## descents.
d = max(dd, d_)
else:
d = dd
h = h_d + d
-
+
return w, h, 0., d
Modified: branches/v0_98_5_maint/lib/matplotlib/text.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/text.py 2008-12-15 17:58:43 UTC (rev 6613)
+++ branches/v0_98_5_maint/lib/matplotlib/text.py 2008-12-15 18:03:34 UTC (rev 6614)
@@ -248,8 +248,9 @@
baseline = None
for i, line in enumerate(lines):
+ clean_line, ismath = self.is_math_text(line)
w, h, d = renderer.get_text_width_height_descent(
- line, self._fontproperties, ismath=self.is_math_text(line))
+ clean_line, self._fontproperties, ismath=ismath)
if baseline is None:
baseline = h - d
whs[i] = w, h
@@ -480,8 +481,9 @@
y = y + posy
if renderer.flipy():
y = canvash-y
+ clean_line, ismath = self.is_math_text(line)
- renderer.draw_tex(gc, x, y, line,
+ renderer.draw_tex(gc, x, y, clean_line,
self._fontproperties, angle)
return
@@ -490,10 +492,11 @@
y = y + posy
if renderer.flipy():
y = canvash-y
+ clean_line, ismath = self.is_math_text(line)
- renderer.draw_text(gc, x, y, line,
+ renderer.draw_text(gc, x, y, clean_line,
self._fontproperties, angle,
- ismath=self.is_math_text(line))
+ ismath=ismath)
def get_color(self):
"Return the color of the text"
@@ -873,16 +876,19 @@
"""
Returns True if the given string *s* contains any mathtext.
"""
- if rcParams['text.usetex']: return 'TeX'
-
# Did we find an even number of non-escaped dollar signs?
# If so, treat is as math text.
dollar_count = s.count(r'$') - s.count(r'\$')
- if dollar_count > 0 and dollar_count % 2 == 0:
- return True
+ even_dollars = (dollar_count > 0 and dollar_count % 2 == 0)
- return False
+ if rcParams['text.usetex']:
+ return s, 'TeX'
+ if even_dollars:
+ return s, True
+ else:
+ return s.replace(r'\$', '$'), False
+
def set_fontproperties(self, fp):
"""
Set the font properties that control the text. *fp* must be a
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-12-15 17:58:47
|
Revision: 6613
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6613&view=rev
Author: mdboom
Date: 2008-12-15 17:58:43 +0000 (Mon, 15 Dec 2008)
Log Message:
-----------
Make escaped $ work in non-usetex mode
Modified Paths:
--------------
trunk/matplotlib/doc/users/mathtext.rst
trunk/matplotlib/doc/users/text_intro.rst
trunk/matplotlib/doc/users/usetex.rst
trunk/matplotlib/lib/matplotlib/offsetbox.py
trunk/matplotlib/lib/matplotlib/text.py
Modified: trunk/matplotlib/doc/users/mathtext.rst
===================================================================
--- trunk/matplotlib/doc/users/mathtext.rst 2008-12-15 14:58:02 UTC (rev 6612)
+++ trunk/matplotlib/doc/users/mathtext.rst 2008-12-15 17:58:43 UTC (rev 6613)
@@ -3,17 +3,19 @@
Writing mathematical expressions
================================
-You can use TeX markup in any matplotlib text string. Note that you
-do not need to have TeX installed, since matplotlib ships its own TeX
-expression parser, layout engine and fonts. The layout engine is a
-fairly direct adaptation of the layout algorithms in Donald Knuth's
-TeX, so the quality is quite good (matplotlib also provides a
-``usetex`` option for those who do want to call out to TeX to generate
-their text (see :ref:`usetex-tutorial`).
+You can use a subset TeX markup in any matplotlib text string by
+placing it inside a pair of dollar signs ($).
-Any text element can use math text. You need to use raw strings
-(preceed the quotes with an ``'r'``), and surround the string text
-with dollar signs, as in TeX. Regular text and mathtext can be
+Note that you do not need to have TeX installed, since matplotlib
+ships its own TeX expression parser, layout engine and fonts. The
+layout engine is a fairly direct adaptation of the layout algorithms
+in Donald Knuth's TeX, so the quality is quite good (matplotlib also
+provides a ``usetex`` option for those who do want to call out to TeX
+to generate their text (see :ref:`usetex-tutorial`).
+
+Any text element can use math text. You should use raw strings
+(preceed the quotes with an ``'r'``), and surround the math text with
+dollar signs ($), as in TeX. Regular text and mathtext can be
interleaved within the same string. Mathtext can use the Computer
Modern fonts (from (La)TeX), `STIX <http://www.aip.org/stixfonts/>`_
fonts (with are designed to blend well with Times) or a Unicode font
@@ -35,6 +37,26 @@
produces ":math:`\alpha > \beta`".
+.. note::
+ Mathtext should be placed between a pair of dollar signs ($). To
+ make it easy to display monetary values, e.g. "$100.00", if a
+ single dollar sign is present in the entire string, it will be
+ displayed verbatim as a dollar sign. This is a small change from
+ regular TeX, where the dollar sign in non-math text would have to
+ be escaped ('\$').
+
+.. note::
+ While the syntax inside the pair of dollar signs ($) aims to be
+ TeX-like, the text outside does not. In particular, characters
+ such as::
+
+ # $ % & ~ _ ^ \ { } \( \) \[ \]
+
+ have special meaning outside of math mode in TeX. Therefore, these
+ characters will behave differently depending on the rcParam
+ ``text.usetex`` flag. See the :ref:`usetex tutorial
+ <usetex-tutorial>` for more information.
+
Subscripts and superscripts
---------------------------
Modified: trunk/matplotlib/doc/users/text_intro.rst
===================================================================
--- trunk/matplotlib/doc/users/text_intro.rst 2008-12-15 14:58:02 UTC (rev 6612)
+++ trunk/matplotlib/doc/users/text_intro.rst 2008-12-15 17:58:43 UTC (rev 6613)
@@ -18,8 +18,8 @@
weight, text location and color, etc) with sensible defaults set in
the rc file. And significantly for those interested in mathematical
or scientific figures, matplotlib implements a large number of TeX
-math symbols and commands, to support mathematical expressions
-anywhere in your figure.
+math symbols and commands, to support :ref:`mathematical expressions
+<mathtext-tutorial>` anywhere in your figure.
Basic text commands
Modified: trunk/matplotlib/doc/users/usetex.rst
===================================================================
--- trunk/matplotlib/doc/users/usetex.rst 2008-12-15 14:58:02 UTC (rev 6612)
+++ trunk/matplotlib/doc/users/usetex.rst 2008-12-15 17:58:43 UTC (rev 6613)
@@ -59,6 +59,14 @@
command ``\displaystyle``, as in `tex_demo.py`, will produce the same
results.
+.. note::
+ Certain characters require special escaping in TeX, such as::
+
+ # $ % & ~ _ ^ \ { } \( \) \[ \]
+
+ Therefore, these characters will behave differently depending on
+ the rcParam ``text.usetex`` flag.
+
.. _usetex-unicode:
usetex with unicode
Modified: trunk/matplotlib/lib/matplotlib/offsetbox.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/offsetbox.py 2008-12-15 14:58:02 UTC (rev 6612)
+++ trunk/matplotlib/lib/matplotlib/offsetbox.py 2008-12-15 17:58:43 UTC (rev 6613)
@@ -548,7 +548,7 @@
def get_extent(self, renderer):
- ismath = self._text.is_math_text(self._text._text)
+ clean_line, ismath = self._text.is_math_text(self._text._text)
_, h_, d_ = renderer.get_text_width_height_descent(
"lp", self._text._fontproperties, ismath=False)
@@ -558,30 +558,30 @@
line = info[0][0] # first line
_, hh, dd = renderer.get_text_width_height_descent(
- line, self._text._fontproperties, ismath=ismath)
+ clean_line, self._text._fontproperties, ismath=ismath)
self._baseline_transform.clear()
if len(info) > 1 and self._multilinebaseline: # multi line
d = h-(hh-dd) # the baseline of the first line
d_new = 0.5 * h - 0.5 * (h_ - d_)
-
+
self._baseline_transform.translate(0, d - d_new)
d = d_new
-
+
else: # single line
h_d = max(h_ - d_, h-dd)
if self.get_minimumdescent():
## to have a minimum descent, #i.e., "l" and "p" have same
- ## descents.
+ ## descents.
d = max(dd, d_)
else:
d = dd
h = h_d + d
-
+
return w, h, 0., d
Modified: trunk/matplotlib/lib/matplotlib/text.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/text.py 2008-12-15 14:58:02 UTC (rev 6612)
+++ trunk/matplotlib/lib/matplotlib/text.py 2008-12-15 17:58:43 UTC (rev 6613)
@@ -248,8 +248,9 @@
baseline = None
for i, line in enumerate(lines):
+ clean_line, ismath = self.is_math_text(line)
w, h, d = renderer.get_text_width_height_descent(
- line, self._fontproperties, ismath=self.is_math_text(line))
+ clean_line, self._fontproperties, ismath=ismath)
if baseline is None:
baseline = h - d
whs[i] = w, h
@@ -480,8 +481,9 @@
y = y + posy
if renderer.flipy():
y = canvash-y
+ clean_line, ismath = self.is_math_text(line)
- renderer.draw_tex(gc, x, y, line,
+ renderer.draw_tex(gc, x, y, clean_line,
self._fontproperties, angle)
return
@@ -490,10 +492,11 @@
y = y + posy
if renderer.flipy():
y = canvash-y
+ clean_line, ismath = self.is_math_text(line)
- renderer.draw_text(gc, x, y, line,
+ renderer.draw_text(gc, x, y, clean_line,
self._fontproperties, angle,
- ismath=self.is_math_text(line))
+ ismath=ismath)
def get_color(self):
"Return the color of the text"
@@ -875,16 +878,19 @@
"""
Returns True if the given string *s* contains any mathtext.
"""
- if rcParams['text.usetex']: return 'TeX'
-
# Did we find an even number of non-escaped dollar signs?
# If so, treat is as math text.
dollar_count = s.count(r'$') - s.count(r'\$')
- if dollar_count > 0 and dollar_count % 2 == 0:
- return True
+ even_dollars = (dollar_count > 0 and dollar_count % 2 == 0)
- return False
+ if rcParams['text.usetex']:
+ return s, 'TeX'
+ if even_dollars:
+ return s, True
+ else:
+ return s.replace(r'\$', '$'), False
+
def set_fontproperties(self, fp):
"""
Set the font properties that control the text. *fp* must be a
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|