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
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
1
(1) |
2
|
3
(3) |
4
(1) |
5
|
6
(5) |
7
|
8
(6) |
9
(1) |
10
(2) |
11
(2) |
12
(2) |
13
|
14
|
15
(5) |
16
(3) |
17
(4) |
18
(1) |
19
|
20
|
21
|
22
(8) |
23
(1) |
24
(3) |
25
(3) |
26
(5) |
27
(1) |
28
(1) |
|
|
|
|
|
|
From: <jd...@us...> - 2010-02-17 02:33:08
|
Revision: 8138 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8138&view=rev Author: jdh2358 Date: 2010-02-17 02:33:01 +0000 (Wed, 17 Feb 2010) Log Message: ----------- added TJ's filled marker patch Modified Paths: -------------- trunk/matplotlib/CHANGELOG trunk/matplotlib/lib/matplotlib/axes.py trunk/matplotlib/lib/matplotlib/lines.py trunk/matplotlib/lib/matplotlib/path.py Added Paths: ----------- trunk/matplotlib/examples/pylab_examples/filledmarker_demo.py Modified: trunk/matplotlib/CHANGELOG =================================================================== --- trunk/matplotlib/CHANGELOG 2010-02-17 02:15:13 UTC (rev 8137) +++ trunk/matplotlib/CHANGELOG 2010-02-17 02:33:01 UTC (rev 8138) @@ -1,3 +1,7 @@ +2010-02-16 Committed TJ's filled marker patch for + left|right|bottom|top|full filled markers. See + examples/pylab_examples/filledmarker_demo.py. JDH + 2010-02-11 Added 'bootstrap' option to boxplot. This allows bootstrap estimates of median confidence intervals. Based on an initial patch by Paul Hobson. - ADS Added: trunk/matplotlib/examples/pylab_examples/filledmarker_demo.py =================================================================== --- trunk/matplotlib/examples/pylab_examples/filledmarker_demo.py (rev 0) +++ trunk/matplotlib/examples/pylab_examples/filledmarker_demo.py 2010-02-17 02:33:01 UTC (rev 8138) @@ -0,0 +1,38 @@ +import itertools + +import numpy as np +import matplotlib.lines as mlines +import matplotlib.pyplot as plt + +colors = itertools.cycle(['b', 'g', 'r', 'c', 'm', 'y', 'k']) +altcolor = 'lightgreen' + +plt.rcParams['text.usetex'] = False # otherwise, '^' will cause trouble + +y = np.arange(10) +for marker in mlines.Line2D.filled_markers: + f = plt.figure() + f.text(.5,.95, "marker = %r" % marker, ha='center') + for i,fs in enumerate(mlines.Line2D.fillStyles): + color = colors.next() + + ax = f.add_subplot(121) + ax.plot(2*(4-i)+y, c=color, + marker=marker, + markersize=20, + fillstyle=fs, + label=fs) + ax.legend(loc=2) + ax.set_title('fillstyle') + + ax = f.add_subplot(122) + ax.plot(2*(4-i)+y, c=color, + marker=marker, + markersize=20, + markerfacecoloralt=altcolor, + fillstyle=fs, + label=fs) + ax.legend(loc=2) + ax.set_title('fillstyle') + +plt.show() Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2010-02-17 02:15:13 UTC (rev 8137) +++ trunk/matplotlib/lib/matplotlib/axes.py 2010-02-17 02:33:01 UTC (rev 8138) @@ -62,9 +62,21 @@ # Is fmt just a colorspec? try: color = mcolors.colorConverter.to_rgb(fmt) - return linestyle, marker, color # Yes. + + # We need to differentiate grayscale '1.0' from tri_down marker '1' + try: + fmtint = str(int(fmt)) + except ValueError: + return linestyle, marker, color # Yes + else: + if fmt != fmtint: + # user definitely doesn't want tri_down marker + return linestyle, marker, color # Yes + else: + # ignore converted color + color = None except ValueError: - pass # No, not just a color. + pass # No, not just a color. # handle the multi char special cases and strip them from the # string Modified: trunk/matplotlib/lib/matplotlib/lines.py =================================================================== --- trunk/matplotlib/lib/matplotlib/lines.py 2010-02-17 02:15:13 UTC (rev 8137) +++ trunk/matplotlib/lib/matplotlib/lines.py 2010-02-17 02:33:01 UTC (rev 8138) @@ -142,6 +142,8 @@ filled_markers = ('o', '^', 'v', '<', '>', 's', 'd', 'D', 'h', 'H', 'p', '*') + fillStyles = ('full', 'left' , 'right' , 'bottom' , 'top') + zorder = 2 validCap = ('butt', 'round', 'projecting') validJoin = ('miter', 'round', 'bevel') @@ -167,6 +169,7 @@ markeredgewidth = None, markeredgecolor = None, markerfacecolor = None, + markerfacecoloralt = 'none', fillstyle = 'full', antialiased = None, dash_capstyle = None, @@ -232,6 +235,7 @@ self.set_markerfacecolor(markerfacecolor) + self.set_markerfacecoloralt(markerfacecoloralt) self.set_markeredgecolor(markeredgecolor) self.set_markeredgewidth(markeredgewidth) self.set_fillstyle(fillstyle) @@ -336,7 +340,7 @@ ACCEPTS: ['full' | 'left' | 'right' | 'bottom' | 'top'] """ - assert fs in ['full', 'left' , 'right' , 'bottom' , 'top'] + assert fs in self.fillStyles self._fillstyle = fs def set_markevery(self, every): @@ -586,18 +590,25 @@ return self._markeredgecolor def get_markeredgewidth(self): return self._markeredgewidth - def get_markerfacecolor(self): - if (self._markerfacecolor is None or - (is_string_like(self._markerfacecolor) and - self._markerfacecolor.lower()=='none') ): - return self._markerfacecolor - elif (is_string_like(self._markerfacecolor) and - self._markerfacecolor.lower() == 'auto'): + def _get_markerfacecolor(self, alt=False): + if alt: + fc = self._markerfacecoloralt + else: + fc = self._markerfacecolor + + if (fc is None or (is_string_like(fc) and fc.lower()=='none') ): + return fc + elif (is_string_like(fc) and fc.lower() == 'auto'): return self._color else: - return self._markerfacecolor + return fc + def get_markerfacecolor(self): + return self._get_markerfacecolor(alt=False) + def get_markerfacecoloralt(self): + return self._get_markerfacecolor(alt=True) + def get_markersize(self): return self._markersize def get_data(self, orig=True): @@ -820,14 +831,26 @@ def set_markerfacecolor(self, fc): """ - Set the marker face color + Set the marker face color. ACCEPTS: any matplotlib color """ - if fc is None : + if fc is None: fc = 'auto' + self._markerfacecolor = fc + def set_markerfacecoloralt(self, fc): + """ + Set the alternate marker face color. + + ACCEPTS: any matplotlib color + """ + if fc is None: + fc = 'auto' + + self._markerfacecoloralt = fc + def set_markersize(self, sz): """ Set the marker size in points @@ -872,6 +895,7 @@ def _draw_lines(self, renderer, gc, path, trans): self._lineFunc(renderer, gc, path, trans) + def _draw_mathtext_path(self, renderer, gc, path, trans): """ Draws mathtext markers '$...$' using TextPath object. @@ -904,6 +928,7 @@ rgbFace = self._get_rgb_face() renderer.draw_markers(gc, text, path_trans, path, trans, rgbFace) + def _draw_steps_pre(self, renderer, gc, path, trans): vertices = self._xy steps = ma.zeros((2*len(vertices)-1, 2), np.float_) @@ -915,6 +940,7 @@ path = path.transformed(self.get_transform()) self._lineFunc(renderer, gc, path, IdentityTransform()) + def _draw_steps_post(self, renderer, gc, path, trans): vertices = self._xy steps = ma.zeros((2*len(vertices)-1, 2), np.float_) @@ -926,6 +952,7 @@ path = path.transformed(self.get_transform()) self._lineFunc(renderer, gc, path, IdentityTransform()) + def _draw_steps_mid(self, renderer, gc, path, trans): vertices = self._xy steps = ma.zeros((2*len(vertices), 2), np.float_) @@ -944,10 +971,12 @@ def _draw_nothing(self, *args, **kwargs): pass + def _draw_solid(self, renderer, gc, path, trans): gc.set_linestyle('solid') renderer.draw_path(gc, path, trans) + def _draw_dashed(self, renderer, gc, path, trans): gc.set_linestyle('dashed') if self._dashSeq is not None: @@ -967,100 +996,146 @@ def _draw_point(self, renderer, gc, path, path_trans): - fs = self.get_fillstyle() - if fs!='full': - raise NotImplementedError('non-full markers have not been implemented for this marker style yet; please contribute') - + # just like _draw_circle + gc.set_snap(renderer.points_to_pixels(self._markersize) > 3.0) w = renderer.points_to_pixels(self._markersize) * \ self._point_size_reduction * 0.5 - gc.set_snap(renderer.points_to_pixels(self._markersize) > 3.0) + transform = Affine2D().scale(w) rgbFace = self._get_rgb_face() - transform = Affine2D().scale(w) - renderer.draw_markers( - gc, Path.unit_circle(), transform, path, path_trans, - rgbFace) + fs = self.get_fillstyle() + if fs=='full': + renderer.draw_markers( + gc, Path.unit_circle(), transform, path, path_trans, rgbFace) + else: + rgbFace_alt = self._get_rgb_face(alt=True) + # build a right-half circle + if fs=='bottom': rotate = 270. + elif fs=='top': rotate = 90. + elif fs=='left': rotate = 180. + else: rotate = 0. + righthalf = Path.unit_circle_righthalf() + transform = transform.rotate_deg(rotate) + renderer.draw_markers(gc, righthalf, transform, + path, path_trans, rgbFace) + transform = transform.rotate_deg(180.) + renderer.draw_markers(gc, righthalf, transform, + path, path_trans, rgbFace_alt) + + _draw_pixel_transform = Affine2D().translate(-0.5, -0.5) def _draw_pixel(self, renderer, gc, path, path_trans): + gc.set_snap(False) + rgbFace = self._get_rgb_face() fs = self.get_fillstyle() - if fs!='full': - raise NotImplementedError('non-full markers have not been implemented for this marker style yet; please contribute') - - rgbFace = self._get_rgb_face() - gc.set_snap(False) + # There is no visible difference, so always paint it 'full' renderer.draw_markers(gc, Path.unit_rectangle(), self._draw_pixel_transform, path, path_trans, rgbFace) def _draw_circle(self, renderer, gc, path, path_trans): - fs = self.get_fillstyle() - if fs!='full': - raise NotImplementedError('non-full markers have not been implemented for this marker style yet; please contribute') - + gc.set_snap(renderer.points_to_pixels(self._markersize) > 3.0) w = renderer.points_to_pixels(self._markersize) * 0.5 - gc.set_snap(renderer.points_to_pixels(self._markersize) > 3.0) + transform = Affine2D().scale(w, w) rgbFace = self._get_rgb_face() - transform = Affine2D().scale(w, w) - renderer.draw_markers( - gc, Path.unit_circle(), transform, path, path_trans, - rgbFace) + fs = self.get_fillstyle() + if fs=='full': + renderer.draw_markers(gc, Path.unit_circle(), transform, + path, path_trans, rgbFace) + else: + rgbFace_alt = self._get_rgb_face(alt=True) + # build a right-half circle + if fs=='bottom': rotate = 270. + elif fs=='top': rotate = 90. + elif fs=='left': rotate = 180. + else: rotate = 0. + righthalf = Path.unit_circle_righthalf() + transform = transform.rotate_deg(rotate) + renderer.draw_markers(gc, righthalf, transform, + path, path_trans, rgbFace) + transform = transform.rotate_deg(180.) + renderer.draw_markers(gc, righthalf, transform, + path, path_trans, rgbFace_alt) + _triangle_path = Path([[0.0, 1.0], [-1.0, -1.0], [1.0, -1.0], [0.0, 1.0]]) - def _draw_triangle_up(self, renderer, gc, path, path_trans): - - fs = self.get_fillstyle() - if fs!='full': - raise NotImplementedError('non-full markers have not been implemented for this marker style yet; please contribute') - + # Going down halfway looks to small. Golden ratio is too far. + _triangle_path_u = Path([[0.0, 1.0], [-3/5., -1/5.], [3/5., -1/5.], [0.0, 1.0]]) + _triangle_path_d = Path([[-3/5., -1/5.], [3/5., -1/5.], [1.0, -1.0], [-1.0, -1.0], [-3/5., -1/5.]]) + _triangle_path_l = Path([[0.0, 1.0], [0.0, -1.0], [-1.0, -1.0], [0.0, 1.0]]) + _triangle_path_r = Path([[0.0, 1.0], [0.0, -1.0], [1.0, -1.0], [0.0, 1.0]]) + def _draw_triangle(self, renderer, gc, path, path_trans, direction): gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0) offset = 0.5*renderer.points_to_pixels(self._markersize) - transform = Affine2D().scale(offset, offset) + assert direction in ['up', 'down', 'left', 'right'] + if direction == 'up': + x,y = offset, offset + rot = 0.0 + skip = 0 + elif direction == 'down': + x,y = offset, offset + rot = 180.0 + skip = 2 + elif direction == 'left': + x,y = offset, offset + rot = 90.0 + skip = 3 + else: + x,y = offset, offset + rot = 270.0 + skip = 1 + transform = Affine2D().scale(x,y).rotate_deg(rot) rgbFace = self._get_rgb_face() - renderer.draw_markers(gc, self._triangle_path, transform, - path, path_trans, rgbFace) + fs = self.get_fillstyle() + if fs=='full': + renderer.draw_markers(gc, self._triangle_path, transform, + path, path_trans, rgbFace) + else: + rgbFace_alt = self._get_rgb_face(alt=True) + mpaths = [self._triangle_path_u, + self._triangle_path_l, + self._triangle_path_d, + self._triangle_path_r] + + if fs=='top': + mpath = mpaths[(0+skip) % 4] + mpath_alt = mpaths[(2+skip) % 4] + elif fs=='bottom': + mpath = mpaths[(2+skip) % 4] + mpath_alt = mpaths[(0+skip) % 4] + elif fs=='left': + mpath = mpaths[(1+skip) % 4] + mpath_alt = mpaths[(3+skip) % 4] + else: + mpath = mpaths[(3+skip) % 4] + mpath_alt = mpaths[(1+skip) % 4] + + renderer.draw_markers(gc, mpath, transform, + path, path_trans, rgbFace) + renderer.draw_markers(gc, mpath_alt, transform, + path, path_trans, rgbFace_alt) + + + def _draw_triangle_up(self, renderer, gc, path, path_trans): + self._draw_triangle(renderer, gc, path, path_trans, 'up') + + def _draw_triangle_down(self, renderer, gc, path, path_trans): - fs = self.get_fillstyle() - if fs!='full': - raise NotImplementedError('non-full markers have not been implemented for this marker style yet; please contribute') + self._draw_triangle(renderer, gc, path, path_trans, 'down') - gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0) - offset = 0.5*renderer.points_to_pixels(self._markersize) - transform = Affine2D().scale(offset, -offset) - rgbFace = self._get_rgb_face() - renderer.draw_markers(gc, self._triangle_path, transform, - path, path_trans, rgbFace) - def _draw_triangle_left(self, renderer, gc, path, path_trans): - fs = self.get_fillstyle() - if fs!='full': - raise NotImplementedError('non-full markers have not been implemented for this marker style yet; please contribute') + self._draw_triangle(renderer, gc, path, path_trans, 'left') - gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0) - offset = 0.5*renderer.points_to_pixels(self._markersize) - transform = Affine2D().scale(offset, offset).rotate_deg(90) - rgbFace = self._get_rgb_face() - renderer.draw_markers(gc, self._triangle_path, transform, - path, path_trans, rgbFace) - def _draw_triangle_right(self, renderer, gc, path, path_trans): - fs = self.get_fillstyle() - if fs!='full': - raise NotImplementedError('non-full markers have not been implemented for this marker style yet; please contribute') + self._draw_triangle(renderer, gc, path, path_trans, 'right') - gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0) - offset = 0.5*renderer.points_to_pixels(self._markersize) - transform = Affine2D().scale(offset, offset).rotate_deg(-90) - rgbFace = self._get_rgb_face() - renderer.draw_markers(gc, self._triangle_path, transform, - path, path_trans, rgbFace) - def _draw_square(self, renderer, gc, path, path_trans): gc.set_snap(renderer.points_to_pixels(self._markersize) >= 2.0) side = renderer.points_to_pixels(self._markersize) @@ -1071,6 +1146,7 @@ renderer.draw_markers(gc, Path.unit_rectangle(), transform, path, path_trans, rgbFace) else: + rgbFace_alt = self._get_rgb_face(alt=True) # build a bottom filled square out of two rectangles, one # filled. Use the rotation to support left, right, bottom # or top @@ -1080,86 +1156,226 @@ else: rotate = 90. bottom = Path([[0.0, 0.0], [1.0, 0.0], [1.0, 0.5], [0.0, 0.5], [0.0, 0.0]]) - top = Path([[0.0, 0.5], [1.0, 0.5], [1.0, 1.0], [0.0, 1.0], [0.0, 0.05]]) + top = Path([[0.0, 0.5], [1.0, 0.5], [1.0, 1.0], [0.0, 1.0], [0.0, 0.5]]) transform = transform.rotate_deg(rotate) renderer.draw_markers(gc, bottom, transform, path, path_trans, rgbFace) renderer.draw_markers(gc, top, transform, - path, path_trans, None) + path, path_trans, rgbFace_alt) + def _draw_diamond(self, renderer, gc, path, path_trans): - fs = self.get_fillstyle() - if fs!='full': - raise NotImplementedError('non-full markers have not been implemented for this marker style yet; please contribute') gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0) side = renderer.points_to_pixels(self._markersize) transform = Affine2D().translate(-0.5, -0.5).rotate_deg(45).scale(side) + rgbFace = self._get_rgb_face() - renderer.draw_markers(gc, Path.unit_rectangle(), transform, - path, path_trans, rgbFace) + fs = self.get_fillstyle() + if fs=='full': + renderer.draw_markers(gc, Path.unit_rectangle(), transform, + path, path_trans, rgbFace) + else: + right = Path([[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 0.0]]) + left = Path([[0.0, 0.0], [0.0, 1.0], [1.0, 1.0], [0.0, 0.0]]) + if fs=='bottom': rotate = 270. + elif fs=='top': rotate = 90. + elif fs=='left': rotate = 180. + else: rotate = 0. + transform = transform.rotate_deg(rotate) + rgbFace_alt = self._get_rgb_face(alt=True) + + renderer.draw_markers(gc, right, transform, + path, path_trans, rgbFace) + renderer.draw_markers(gc, left, transform, + path, path_trans, rgbFace_alt) + + def _draw_thin_diamond(self, renderer, gc, path, path_trans): - fs = self.get_fillstyle() - if fs!='full': - raise NotImplementedError('non-full markers have not been implemented for this marker style yet; please contribute') gc.set_snap(renderer.points_to_pixels(self._markersize) >= 3.0) offset = renderer.points_to_pixels(self._markersize) transform = Affine2D().translate(-0.5, -0.5) \ - .rotate_deg(45).scale(offset * 0.6, offset) + .rotate_deg(45) + rgbFace = self._get_rgb_face() - renderer.draw_markers(gc, Path.unit_rectangle(), transform, - path, path_trans, rgbFace) + fs = self.get_fillstyle() + if fs=='full': + transform = transform.scale(offset * 0.6, offset) + renderer.draw_markers(gc, Path.unit_rectangle(), transform, + path, path_trans, rgbFace) + else: + right = Path([[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 0.0]]) + left = Path([[0.0, 0.0], [0.0, 1.0], [1.0, 1.0], [0.0, 0.0]]) + if fs=='bottom': rotate = 270. + elif fs=='top': rotate = 90. + elif fs=='left': rotate = 180. + else: rotate = 0. + # scale after rotation + transform = transform.rotate_deg(rotate).scale(offset * 0.6, offset) + rgbFace_alt = self._get_rgb_face(alt=True) + + renderer.draw_markers(gc, right, transform, + path, path_trans, rgbFace) + renderer.draw_markers(gc, left, transform, + path, path_trans, rgbFace_alt) + + def _draw_pentagon(self, renderer, gc, path, path_trans): - fs = self.get_fillstyle() - if fs!='full': - raise NotImplementedError('non-full markers have not been implemented for this marker style yet; please contribute') gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0) offset = 0.5 * renderer.points_to_pixels(self._markersize) transform = Affine2D().scale(offset) + rgbFace = self._get_rgb_face() - renderer.draw_markers(gc, Path.unit_regular_polygon(5), transform, - path, path_trans, rgbFace) + fs = self.get_fillstyle() + polypath = Path.unit_regular_polygon(5) + + if fs == 'full': + renderer.draw_markers(gc, polypath, transform, + path, path_trans, rgbFace) + else: + verts = polypath.vertices + + y = (1+np.sqrt(5))/4. + top = Path([verts[0], verts[1], verts[4], verts[0]]) + bottom = Path([verts[1], verts[2], verts[3], verts[4], verts[1]]) + left = Path([verts[0], verts[1], verts[2], [0,-y], verts[0]]) + right = Path([verts[0], verts[4], verts[3], [0,-y], verts[0]]) + + if fs == 'top': + mpath, mpath_alt = top, bottom + elif fs == 'bottom': + mpath, mpath_alt = bottom, top + elif fs == 'left': + mpath, mpath_alt = left, right + else: + mpath, mpath_alt = right, left + + rgbFace_alt = self._get_rgb_face(alt=True) + renderer.draw_markers(gc, mpath, transform, + path, path_trans, rgbFace) + renderer.draw_markers(gc, mpath_alt, transform, + path, path_trans, rgbFace_alt) + + def _draw_star(self, renderer, gc, path, path_trans): - fs = self.get_fillstyle() - if fs!='full': - raise NotImplementedError('non-full markers have not been implemented for this marker style yet; please contribute') gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0) offset = 0.5 * renderer.points_to_pixels(self._markersize) transform = Affine2D().scale(offset) + rgbFace = self._get_rgb_face() - _starpath = Path.unit_regular_star(5, innerCircle=0.381966) - renderer.draw_markers(gc, _starpath, transform, - path, path_trans, rgbFace) + fs = self.get_fillstyle() + polypath = Path.unit_regular_star(5, innerCircle=0.381966) + if fs == 'full': + renderer.draw_markers(gc, polypath, transform, + path, path_trans, rgbFace) + else: + verts = polypath.vertices + + top = Path(np.vstack((verts[0:4,:], verts[7:10,:], verts[0]))) + bottom = Path(np.vstack((verts[3:8,:], verts[3]))) + left = Path(np.vstack((verts[0:6,:], verts[0]))) + right = Path(np.vstack((verts[0], verts[5:10,:], verts[0]))) + + if fs == 'top': + mpath, mpath_alt = top, bottom + elif fs == 'bottom': + mpath, mpath_alt = bottom, top + elif fs == 'left': + mpath, mpath_alt = left, right + else: + mpath, mpath_alt = right, left + + rgbFace_alt = self._get_rgb_face(alt=True) + renderer.draw_markers(gc, mpath, transform, + path, path_trans, rgbFace) + renderer.draw_markers(gc, mpath_alt, transform, + path, path_trans, rgbFace_alt) + + def _draw_hexagon1(self, renderer, gc, path, path_trans): - fs = self.get_fillstyle() - if fs!='full': - raise NotImplementedError('non-full markers have not been implemented for this marker style yet; please contribute') - gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0) + gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0) offset = 0.5 * renderer.points_to_pixels(self._markersize) transform = Affine2D().scale(offset) + rgbFace = self._get_rgb_face() - renderer.draw_markers(gc, Path.unit_regular_polygon(6), transform, - path, path_trans, rgbFace) + fs = self.get_fillstyle() + polypath = Path.unit_regular_polygon(6) + if fs == 'full': + renderer.draw_markers(gc, polypath, transform, + path, path_trans, rgbFace) + else: + verts = polypath.vertices + + # not drawing inside lines + x = abs(np.cos(5*np.pi/6.)) + top = Path(np.vstack(([-x,0],verts[(1,0,5),:],[x,0]))) + bottom = Path(np.vstack(([-x,0],verts[2:5,:],[x,0]))) + left = Path(verts[(0,1,2,3),:]) + right = Path(verts[(0,5,4,3),:]) + + if fs == 'top': + mpath, mpath_alt = top, bottom + elif fs == 'bottom': + mpath, mpath_alt = bottom, top + elif fs == 'left': + mpath, mpath_alt = left, right + else: + mpath, mpath_alt = right, left + + rgbFace_alt = self._get_rgb_face(alt=True) + renderer.draw_markers(gc, mpath, transform, + path, path_trans, rgbFace) + renderer.draw_markers(gc, mpath_alt, transform, + path, path_trans, rgbFace_alt) + + def _draw_hexagon2(self, renderer, gc, path, path_trans): - fs = self.get_fillstyle() - if fs!='full': - raise NotImplementedError('non-full markers have not been implemented for this marker style yet; please contribute') - gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0) + gc.set_snap(renderer.points_to_pixels(self._markersize) >= 5.0) offset = 0.5 * renderer.points_to_pixels(self._markersize) transform = Affine2D().scale(offset).rotate_deg(30) + rgbFace = self._get_rgb_face() - renderer.draw_markers(gc, Path.unit_regular_polygon(6), transform, - path, path_trans, rgbFace) + fs = self.get_fillstyle() + polypath = Path.unit_regular_polygon(6) + if fs == 'full': + renderer.draw_markers(gc, polypath, transform, + path, path_trans, rgbFace) + else: + verts = polypath.vertices + + # not drawing inside lines + x, y = np.sqrt(3)/4, 3/4. + top = Path(verts[(1,0,5,4,1),:]) + bottom = Path(verts[(1,2,3,4),:]) + left = Path(np.vstack(([x,y],verts[(0,1,2),:],[-x,-y],[x,y]))) + right = Path(np.vstack(([x,y],verts[(5,4,3),:],[-x,-y]))) + + if fs == 'top': + mpath, mpath_alt = top, bottom + elif fs == 'bottom': + mpath, mpath_alt = bottom, top + elif fs == 'left': + mpath, mpath_alt = left, right + else: + mpath, mpath_alt = right, left + + rgbFace_alt = self._get_rgb_face(alt=True) + renderer.draw_markers(gc, mpath, transform, + path, path_trans, rgbFace) + renderer.draw_markers(gc, mpath_alt, transform, + path, path_trans, rgbFace_alt) + + _line_marker_path = Path([[0.0, -1.0], [0.0, 1.0]]) def _draw_vline(self, renderer, gc, path, path_trans): gc.set_snap(renderer.points_to_pixels(self._markersize) >= 1.0) @@ -1314,6 +1530,7 @@ self._color = other._color self._markersize = other._markersize self._markerfacecolor = other._markerfacecolor + self._markerfacecoloralt = other._markerfacecoloralt self._markeredgecolor = other._markeredgecolor self._markeredgewidth = other._markeredgewidth self._fillstyle = other._fillstyle @@ -1329,8 +1546,8 @@ self._drawstyle = other._drawstyle - def _get_rgb_face(self): - facecolor = self.get_markerfacecolor() + def _get_rgb_face(self, alt=False): + facecolor = self._get_markerfacecolor(alt=alt) if is_string_like(facecolor) and facecolor.lower()=='none': rgbFace = None else: @@ -1369,8 +1586,11 @@ def set_mfc(self, val): 'alias for set_markerfacecolor' - self.set_markerfacecolor(val) + self.set_markerfacecolor(val, alt=alt) + def set_mfcalt(self, val): + 'alias for set_markerfacecoloralt' + self.set_markerfacecoloralt(val) def set_ms(self, val): 'alias for set_markersize' @@ -1409,6 +1629,9 @@ 'alias for get_markerfacecolor' return self.get_markerfacecolor() + def get_mfcalt(self, alt=False): + 'alias for get_markerfacecoloralt' + return self.get_markerfacecoloralt() def get_ms(self): 'alias for get_markersize' @@ -1577,6 +1800,7 @@ lineStyles = Line2D._lineStyles lineMarkers = Line2D._markers drawStyles = Line2D.drawStyles +fillStyles = Line2D.fillStyles docstring.interpd.update(Line2D = artist.kwdoc(Line2D)) Modified: trunk/matplotlib/lib/matplotlib/path.py =================================================================== --- trunk/matplotlib/lib/matplotlib/path.py 2010-02-17 02:15:13 UTC (rev 8137) +++ trunk/matplotlib/lib/matplotlib/path.py 2010-02-17 02:33:01 UTC (rev 8138) @@ -500,7 +500,55 @@ cls._unit_circle = cls(vertices, codes) return cls._unit_circle + _unit_circle_righthalf = None + @classmethod + def unit_circle_righthalf(cls): + """ + (staticmethod) Returns a :class:`Path` of the right half + of a unit circle. The circle is approximated using cubic Bezier + curves. This uses 4 splines around the circle using the approach + presented here: + + Lancaster, Don. `Approximating a Circle or an Ellipse Using Four + Bezier Cubic Splines <http://www.tinaja.com/glib/ellipse4.pdf>`_. + """ + if cls._unit_circle_righthalf is None: + MAGIC = 0.2652031 + SQRTHALF = np.sqrt(0.5) + MAGIC45 = np.sqrt((MAGIC*MAGIC) / 2.0) + + vertices = np.array( + [[0.0, -1.0], + + [MAGIC, -1.0], + [SQRTHALF-MAGIC45, -SQRTHALF-MAGIC45], + [SQRTHALF, -SQRTHALF], + + [SQRTHALF+MAGIC45, -SQRTHALF+MAGIC45], + [1.0, -MAGIC], + [1.0, 0.0], + + [1.0, MAGIC], + [SQRTHALF+MAGIC45, SQRTHALF-MAGIC45], + [SQRTHALF, SQRTHALF], + + [SQRTHALF-MAGIC45, SQRTHALF+MAGIC45], + [MAGIC, 1.0], + [0.0, 1.0], + + [0.0, -1.0]], + + np.float_) + + codes = cls.CURVE4 * np.ones(14) + codes[0] = cls.MOVETO + codes[-1] = cls.CLOSEPOLY + + cls._unit_circle_righthalf = cls(vertices, codes) + return cls._unit_circle_righthalf + + @classmethod def arc(cls, theta1, theta2, n=None, is_wedge=False): """ (staticmethod) Returns an arc on the unit circle from angle This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2010-02-17 02:15:21
|
Revision: 8137 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8137&view=rev Author: mdehoon Date: 2010-02-17 02:15:13 +0000 (Wed, 17 Feb 2010) Log Message: ----------- Fixing a compiler warning. Modified Paths: -------------- trunk/matplotlib/src/_macosx.m Modified: trunk/matplotlib/src/_macosx.m =================================================================== --- trunk/matplotlib/src/_macosx.m 2010-02-16 23:09:50 UTC (rev 8136) +++ trunk/matplotlib/src/_macosx.m 2010-02-17 02:15:13 UTC (rev 8137) @@ -4468,7 +4468,7 @@ self = [super initWithFrame: rect]; rubberband = NSZeroRect; inside = false; - tracking = nil; + tracking = 0; return self; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lee...@us...> - 2010-02-16 23:09:57
|
Revision: 8136 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8136&view=rev Author: leejjoon Date: 2010-02-16 23:09:50 +0000 (Tue, 16 Feb 2010) Log Message: ----------- Merged revisions 8121,8135 via svnmerge from https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_99_maint ........ r8121 | jdh2358 | 2010-02-08 12:50:27 -0500 (Mon, 08 Feb 2010) | 1 line added Ariels csd patch for proper scaling at the dc component ........ r8135 | leejjoon | 2010-02-16 17:55:27 -0500 (Tue, 16 Feb 2010) | 1 line fix a bug in Text._get_layout that returns an incorrect information for an empty string ........ Modified Paths: -------------- trunk/matplotlib/doc/faq/installing_faq.rst trunk/matplotlib/doc/glossary/index.rst trunk/matplotlib/doc/users/installing.rst trunk/matplotlib/lib/matplotlib/mlab.py trunk/matplotlib/lib/matplotlib/text.py Property Changed: ---------------- trunk/matplotlib/ trunk/matplotlib/doc/pyplots/README trunk/matplotlib/doc/sphinxext/gen_gallery.py trunk/matplotlib/doc/sphinxext/gen_rst.py trunk/matplotlib/examples/misc/multiprocess.py trunk/matplotlib/examples/mplot3d/contour3d_demo.py trunk/matplotlib/examples/mplot3d/contourf3d_demo.py trunk/matplotlib/examples/mplot3d/polys3d_demo.py trunk/matplotlib/examples/mplot3d/scatter3d_demo.py trunk/matplotlib/examples/mplot3d/surface3d_demo.py trunk/matplotlib/examples/mplot3d/wire3d_demo.py trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_spines/spines_axes_positions.png Property changes on: trunk/matplotlib ___________________________________________________________________ Modified: svnmerge-integrated - /branches/mathtex:1-7263 /branches/v0_99_maint:1-8116 + /branches/mathtex:1-7263 /branches/v0_99_maint:1-8135 Modified: svn:mergeinfo - /branches/v0_91_maint:5753-5771 /branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 + /branches/v0_91_maint:5753-5771 /branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116,8121-8135 Modified: trunk/matplotlib/doc/faq/installing_faq.rst =================================================================== --- trunk/matplotlib/doc/faq/installing_faq.rst 2010-02-16 22:55:27 UTC (rev 8135) +++ trunk/matplotlib/doc/faq/installing_faq.rst 2010-02-16 23:09:50 UTC (rev 8136) @@ -146,11 +146,11 @@ others in web application servers to dynamically serve up graphs. To support all of these use cases, matplotlib can target different -outputs, and each of these capabililities is called a backend (the +outputs, and each of these capabililities is called a backend; the "frontend" is the user facing code, ie the plotting code, whereas the "backend" does all the dirty work behind the scenes to make the figure. There are two types of backends: user interface backends (for -use in pygtk, wxpython, tkinter, qt or fltk) and hardcopy backends to +use in pygtk, wxpython, tkinter, qt, macosx, or fltk) and hardcopy backends to make image files (PNG, SVG, PDF, PS). There are a two primary ways to configure your backend. One is to set @@ -183,10 +183,10 @@ renderer for user interfaces is ``Agg`` which uses the `antigrain <http://antigrain.html>`_ C++ library to make a raster (pixel) image of the figure. All of the user interfaces can be used with agg -rendering, eg ``WXAgg``, ``GTKAgg``, ``QTAgg``, ``TkAgg``. In -addition, some of the user interfaces support other rendering engines. -For example, with GTK, you can also select GDK rendering (backend -``GTK``) or Cairo rendering (backend ``GTKCairo``). +rendering, eg ``WXAgg``, ``GTKAgg``, ``QTAgg``, ``TkAgg``, +``CocoaAgg``. In addition, some of the user interfaces support other +rendering engines. For example, with GTK, you can also select GDK +rendering (backend ``GTK``) or Cairo rendering (backend ``GTKCairo``). For the rendering engines, one can also distinguish between `vector <http://en.wikipedia.org/wiki/Vector_graphics>`_ or `raster @@ -238,6 +238,7 @@ QtAgg Agg rendering to a :term:`Qt` canvas (requires PyQt_) Qt4Agg Agg rendering to a :term:`Qt4` canvas (requires PyQt4_) FLTKAgg Agg rendering to a :term:`FLTK` canvas (requires pyFLTK_) +macosx Cocoa rendering in OSX windows ============ ================================================================ .. _`Anti-Grain Geometry`: http://www.antigrain.com/ Modified: trunk/matplotlib/doc/glossary/index.rst =================================================================== --- trunk/matplotlib/doc/glossary/index.rst 2010-02-16 22:55:27 UTC (rev 8135) +++ trunk/matplotlib/doc/glossary/index.rst 2010-02-16 23:09:50 UTC (rev 8136) @@ -14,6 +14,11 @@ Cairo The `Cairo graphics <http://cairographics.org>`_ engine + + dateutil + The `dateutil <http://labix.org/python-dateutil>`_ library + provides extensions to the standard datetime module + EPS Encapsulated Postscript (`EPS <http://en.wikipedia.org/wiki/Encapsulated_PostScript>`_) @@ -86,6 +91,14 @@ language widely used for scripting, application development, web application servers, scientific computing and more. + + pytz + `pytz <http://pytz.sourceforge.net/>`_ provides the Olson tz + database in Python. it allows accurate and cross platform + timezone calculations and solves the issue of ambiguous times at + the end of daylight savings + + Qt `Qt <http://trolltech.com/products/qt/>`__ is a cross-platform application framework for desktop and embedded development. Property changes on: trunk/matplotlib/doc/pyplots/README ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/pyplots/README:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 + /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/pyplots/README:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116,8121-8135 Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771 /branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 + /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771 /branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116,8121-8135 Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771 /branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 + /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771 /branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116,8121-8135 Modified: trunk/matplotlib/doc/users/installing.rst =================================================================== --- trunk/matplotlib/doc/users/installing.rst 2010-02-16 22:55:27 UTC (rev 8135) +++ trunk/matplotlib/doc/users/installing.rst 2010-02-16 23:09:50 UTC (rev 8136) @@ -44,11 +44,30 @@ matplotlib requires numpy version 1.1 or later. Although it is not a requirement to use matplotlib, we strongly encourage you to install `ipython <http://ipython.scipy.org/dist>`_, which is an interactive -shell for python that is matplotlib aware. Once you have ipython, -numpy and matplotlib installed, in ipython's "pylab" mode you have a -matlab-like environment that automatically handles most of the -configuration details for you, so you can get up and running quickly:: +shell for python that is matplotlib aware. +Next we need to get matplotlib installed. We provide prebuilt +binaries for OS X and Windows on the matplotlib `download +<http://sourceforge.net/projects/matplotlib/files/>`_ page. Click on +the latest release of the "matplotlib" package, choose your python +version (2.5 or 2.6) and your platform (macosx or win32) and you +should be good to go. If you have any problems, please check the +:ref:`installing-faq`, google around a little bit, and post a question +the `mailing list +<http://sourceforge.net/project/showfiles.php?group_id=80706>`_. If +you are on debian/unbuntu linux, it suffices to do:: + + > sudo apt-get install python-matplotlib + +Instructions for installing our OSX binaries are found in the FAQ +:ref:`install_osx_binaries`. + + +Once you have ipython, numpy and matplotlib installed, in ipython's +"pylab" mode you have a matlab-like environment that automatically +handles most of the configuration details for you, so you can get up +and running quickly:: + johnh@flag:~> ipython -pylab Python 2.4.5 (#4, Apr 12 2008, 09:09:16) IPython 0.9.0 -- An enhanced Interactive Python. @@ -60,20 +79,6 @@ In [2]: hist(x, 100) -And a *voila*, a figure pops up. But we are putting the cart ahead of -the horse -- first we need to get matplotlib installed. We provide -prebuilt binaries for OS X and Windows on the matplotlib `download -<http://sourceforge.net/projects/matplotlib/files/>`_ page. Click on -the latest release of the "matplotlib" package, choose your python -version (2.4 or 2.5) and your platform (macosx or win32) and you -should be good to go. If you have any problems, please check the -:ref:`installing-faq`, google around a little bit, and post a question -the `mailing list -<http://sourceforge.net/project/showfiles.php?group_id=80706>`_. - -Instructions for installing our OSX binaries are found in the FAQ -ref:`install_osx_binaries`. - Note that when testing matplotlib installations from the interactive python console, there are some issues relating to user interface toolkits and interactive settings that are discussed in @@ -85,9 +90,9 @@ ====================== If you are interested perhaps in contributing to matplotlib -development, or just like to build everything yourself, it is not -difficult to build matplotlib from source. Grab the latest *tar.gz* -release file from `sourceforge +development, running the latest greatest code, or just like to +build everything yourself, it is not difficult to build matplotlib +from source. Grab the latest *tar.gz* release file from `sourceforge <http://sourceforge.net/project/showfiles.php?group_id=80706>`_, or if you want to develop matplotlib or just need the latest bugfixed version, grab the latest svn version :ref:`install-svn`. @@ -173,17 +178,17 @@ agg template source statically, so it will not affect anything on your system outside of matplotlib. -pytz 2007g or later +:term:`pytz` 2007g or later timezone handling for python datetime objects. By default, matplotlib will install pytz if it isn't already installed on your - system. To override the default, use setup.cfg to force or + system. To override the default, use :file:`setup.cfg to force or prevent installation of pytz. -dateutil 1.1 or later - extensions to python datetime handling. By - default, matplotlib will install dateutil if it isn't already - installed on your system. To override the default, use setup.cfg - to force or prevent installation of dateutil. +:term:`dateutil` 1.1 or later + provides extensions to python datetime handling. By default, matplotlib + will install dateutil if it isn't already installed on your + system. To override the default, use :file:`setup.cfg` to force + or prevent installation of dateutil. Property changes on: trunk/matplotlib/examples/misc/multiprocess.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/misc/log.py:5753-5771 /branches/v0_98_5_maint/examples/misc/log.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 + /branches/v0_91_maint/examples/misc/log.py:5753-5771 /branches/v0_98_5_maint/examples/misc/log.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116,8121-8135 Property changes on: trunk/matplotlib/examples/mplot3d/contour3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contour.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 + /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contour.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116,8121-8135 Property changes on: trunk/matplotlib/examples/mplot3d/contourf3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contourf.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 + /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contourf.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116,8121-8135 Property changes on: trunk/matplotlib/examples/mplot3d/polys3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/polys.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 + /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/polys.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116,8121-8135 Property changes on: trunk/matplotlib/examples/mplot3d/scatter3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/scatter.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 + /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/scatter.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116,8121-8135 Property changes on: trunk/matplotlib/examples/mplot3d/surface3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/surface.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 + /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/surface.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116,8121-8135 Property changes on: trunk/matplotlib/examples/mplot3d/wire3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/wire.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 + /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/wire.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116,8121-8135 Modified: trunk/matplotlib/lib/matplotlib/mlab.py =================================================================== --- trunk/matplotlib/lib/matplotlib/mlab.py 2010-02-16 22:55:27 UTC (rev 8135) +++ trunk/matplotlib/lib/matplotlib/mlab.py 2010-02-16 23:09:50 UTC (rev 8136) @@ -277,10 +277,18 @@ Pxy[:,i] = np.conjugate(fx[:numFreqs]) * fy[:numFreqs] # Scale the spectrum by the norm of the window to compensate for - # windowing loss; see Bendat & Piersol Sec 11.5.2. Also include - # scaling factors for one-sided densities and dividing by the sampling - # frequency, if desired. - Pxy *= scaling_factor / (np.abs(windowVals)**2).sum() + # windowing loss; see Bendat & Piersol Sec 11.5.2. + Pxy *= 1 / (np.abs(windowVals)**2).sum() + + # Also include scaling factors for one-sided densities and dividing by the + # sampling frequency, if desired. Scale everything, except the DC component + # and the NFFT/2 component: + Pxy[1:-1] *= scaling_factor + + #But do scale those components by Fs, if required + if scale_by_freq: + Pxy[[0,-1]] /= Fs + t = 1./Fs * (ind + NFFT / 2.) freqs = float(Fs) / pad_to * np.arange(numFreqs) Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771 /branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 + /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771 /branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116,8121-8135 Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771 /branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 + /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771 /branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116,8121-8135 Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771 /branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 + /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771 /branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116,8121-8135 Property changes on: trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_spines/spines_axes_positions.png ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_99_maint/lib/matplotlib/tests/baseline_images/test_spines/spines_axes_positions.png:7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 + /branches/v0_99_maint/lib/matplotlib/tests/baseline_images/test_spines/spines_axes_positions.png:7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116,8121-8135 Modified: trunk/matplotlib/lib/matplotlib/text.py =================================================================== --- trunk/matplotlib/lib/matplotlib/text.py 2010-02-16 22:55:27 UTC (rev 8135) +++ trunk/matplotlib/lib/matplotlib/text.py 2010-02-16 23:09:50 UTC (rev 8136) @@ -300,9 +300,13 @@ baseline = None for i, line in enumerate(lines): clean_line, ismath = self.is_math_text(line) - w, h, d = get_text_width_height_descent(clean_line, - self._fontproperties, - ismath=ismath) + if clean_line: + w, h, d = get_text_width_height_descent(clean_line, + self._fontproperties, + ismath=ismath) + else: + w, h, d = 0, 0, 0 + if baseline is None: baseline = h - d whs[i] = w, h This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lee...@us...> - 2010-02-16 22:55:33
|
Revision: 8135 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8135&view=rev Author: leejjoon Date: 2010-02-16 22:55:27 +0000 (Tue, 16 Feb 2010) Log Message: ----------- fix a bug in Text._get_layout that returns an incorrect information for an empty string Modified Paths: -------------- branches/v0_99_maint/lib/matplotlib/text.py Modified: branches/v0_99_maint/lib/matplotlib/text.py =================================================================== --- branches/v0_99_maint/lib/matplotlib/text.py 2010-02-16 14:31:02 UTC (rev 8134) +++ branches/v0_99_maint/lib/matplotlib/text.py 2010-02-16 22:55:27 UTC (rev 8135) @@ -275,8 +275,11 @@ 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( - clean_line, self._fontproperties, ismath=ismath) + if clean_line: + w, h, d = renderer.get_text_width_height_descent( + clean_line, self._fontproperties, ismath=ismath) + else: + w, h, d = 0, 0, 0 if baseline is None: baseline = h - d whs[i] = w, h This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2010-02-16 14:31:10
|
Revision: 8134 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8134&view=rev Author: mdehoon Date: 2010-02-16 14:31:02 +0000 (Tue, 16 Feb 2010) Log Message: ----------- Keeping track of the mouse entering and exiting a window, and moving over an active window. Modified Paths: -------------- trunk/matplotlib/src/_macosx.m Modified: trunk/matplotlib/src/_macosx.m =================================================================== --- trunk/matplotlib/src/_macosx.m 2010-02-15 16:38:50 UTC (rev 8133) +++ trunk/matplotlib/src/_macosx.m 2010-02-16 14:31:02 UTC (rev 8134) @@ -336,6 +336,8 @@ @interface View : NSView { PyObject* canvas; NSRect rubberband; + BOOL inside; + NSTrackingRectTag tracking; } - (void)dealloc; - (void)drawRect:(NSRect)rect; @@ -344,6 +346,8 @@ - (void)setCanvas: (PyObject*)newCanvas; - (BOOL)windowShouldClose:(NSNotification*)notification; - (BOOL)isFlipped; +- (void)mouseEntered:(NSEvent*)event; +- (void)mouseExited:(NSEvent*)event; - (void)mouseDown:(NSEvent*)event; - (void)mouseUp:(NSEvent*)event; - (void)mouseDragged:(NSEvent*)event; @@ -4463,6 +4467,8 @@ { self = [super initWithFrame: rect]; rubberband = NSZeroRect; + inside = false; + tracking = nil; return self; } @@ -4470,6 +4476,7 @@ { FigureCanvas* fc = (FigureCanvas*)canvas; if (fc) fc->view = NULL; + [self removeTrackingRect: tracking]; [super dealloc]; } @@ -4551,6 +4558,11 @@ else PyErr_Print(); PyGILState_Release(gstate); + if (tracking) [self removeTrackingRect: tracking]; + tracking = [self addTrackingRect: [self bounds] + owner: self + userData: nil + assumeInside: NO]; [self setNeedsDisplay: YES]; } @@ -4575,6 +4587,45 @@ return YES; } +- (void)mouseEntered:(NSEvent *)event +{ + PyGILState_STATE gstate; + PyObject* result; + NSWindow* window = [self window]; + if ([window isKeyWindow]==false) return; + + gstate = PyGILState_Ensure(); + result = PyObject_CallMethod(canvas, "enter_notify_event", ""); + if(result) + Py_DECREF(result); + else + PyErr_Print(); + PyGILState_Release(gstate); + + [window setAcceptsMouseMovedEvents: YES]; + inside = true; +} + +- (void)mouseExited:(NSEvent *)event +{ + PyGILState_STATE gstate; + PyObject* result; + NSWindow* window = [self window]; + if ([window isKeyWindow]==false) return; + + if (inside==false) return; + gstate = PyGILState_Ensure(); + result = PyObject_CallMethod(canvas, "leave_notify_event", ""); + if(result) + Py_DECREF(result); + else + PyErr_Print(); + PyGILState_Release(gstate); + + [[self window] setAcceptsMouseMovedEvents: NO]; + inside = false; +} + - (void)mouseDown:(NSEvent *)event { int x, y; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2010-02-15 16:38:58
|
Revision: 8133 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8133&view=rev Author: jswhit Date: 2010-02-15 16:38:50 +0000 (Mon, 15 Feb 2010) Log Message: ----------- update for newer version of geos Modified Paths: -------------- trunk/toolkits/basemap/doc/users/installing.rst Modified: trunk/toolkits/basemap/doc/users/installing.rst =================================================================== --- trunk/toolkits/basemap/doc/users/installing.rst 2010-02-15 02:34:39 UTC (rev 8132) +++ trunk/toolkits/basemap/doc/users/installing.rst 2010-02-15 16:38:50 UTC (rev 8133) @@ -23,8 +23,8 @@ **Required libraries that ship with basemap** -`GEOS <http://trac.osgeo.org/geos/>`__ (Geometry Engine - Open Source) library 2.2.3 or later (2.2.3 recommended). - Source code is included in the geos-2.2.3 directory. +`GEOS <http://trac.osgeo.org/geos/>`__ (Geometry Engine - Open Source) library 3.1.1 or later. + Source code is included in the geos-3.1.1 directory. When building from source, must be built and installed separately from basemap (see build instructions below). Included in Windows binary installers. @@ -75,7 +75,7 @@ Then go to next step. If you don't have it, you can build it from the source code included with basemap by following these steps:: - cd geos-2.2.3 + cd geos-3.1.1 export GEOS_DIR=<where you want the libs and headers to go> # A reasonable choice on a Unix-like system is /usr/local, or # if you don't have permission to write there, your home directory. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2010-02-15 02:34:45
|
Revision: 8132 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8132&view=rev Author: jswhit Date: 2010-02-15 02:34:39 +0000 (Mon, 15 Feb 2010) Log Message: ----------- update with nsper Modified Paths: -------------- trunk/toolkits/basemap/doc/users/graticule.rst trunk/toolkits/basemap/doc/users/intro.rst trunk/toolkits/basemap/doc/users/mapsetup.rst Modified: trunk/toolkits/basemap/doc/users/graticule.rst =================================================================== --- trunk/toolkits/basemap/doc/users/graticule.rst 2010-02-15 02:31:33 UTC (rev 8131) +++ trunk/toolkits/basemap/doc/users/graticule.rst 2010-02-15 02:34:39 UTC (rev 8132) @@ -8,10 +8,10 @@ :func:`~mpl_toolkits.basemap.Basemap.drawparallels` and :func:`~mpl_toolkits.basemap.Basemap.drawmeridians` instance methods. The longitude and latitude lines can be labelled where they intersect -the map projection boundary. There are four exceptions: meridians +the map projection boundary. There are a few exceptions: meridians and parallels cannot be labelled on maps with -``proj`` set to ``ortho`` (orthographic) or -``vandg`` (van der Grinten), +``proj`` set to ``ortho`` (orthographic), ``geos`` (geostationary), +``vandg`` (van der Grinten) or ``nsper`` (near-sided perspective), and meridians cannot be labelled on maps with ``proj`` set to ``robin`` (robinson), ``mbtfpq`` (McBryde-Thomas Flat Polar Quartic), ``moll`` (mollweide) or ``sinu`` Modified: trunk/toolkits/basemap/doc/users/intro.rst =================================================================== --- trunk/toolkits/basemap/doc/users/intro.rst 2010-02-15 02:31:33 UTC (rev 8131) +++ trunk/toolkits/basemap/doc/users/intro.rst 2010-02-15 02:34:39 UTC (rev 8132) @@ -11,7 +11,7 @@ `CDAT <http://www-pcmdi.llnl.gov/software/cdat/support/vcs/vcs.html>`_ are other libraries that provide similar capabilities in Python. -Basemap does not do any plotting on it's own, but provides the facilities to transform coordinates to one of 22 different map projections (using the +Basemap does not do any plotting on it's own, but provides the facilities to transform coordinates to one of 23 different map projections (using the `PROJ.4 <http://trac.osgeo.org/proj/>`_ C library). `Matplotlib <http://matplotlib.sourceforge.net>`_ is then used to plot contours, images, vectors, lines or points Modified: trunk/toolkits/basemap/doc/users/mapsetup.rst =================================================================== --- trunk/toolkits/basemap/doc/users/mapsetup.rst 2010-02-15 02:31:33 UTC (rev 8131) +++ trunk/toolkits/basemap/doc/users/mapsetup.rst 2010-02-15 02:34:39 UTC (rev 8132) @@ -6,7 +6,7 @@ In order to represent the curved surface of the earth on a two-dimensional map, a map projection is needed. Since this cannot be done without distortion, there are many map projections, each with it's own advantages -and disadvantages. Basemap provides 22 different map projections. +and disadvantages. Basemap provides 23 different map projections. Some are global, some can only represent a portion of the globe. When a :class:`~mpl_toolkits.basemap.Basemap` class instance is created, the desired map projection must @@ -37,6 +37,7 @@ gnomon.rst ortho.rst geos.rst + nsper.rst moll.rst robin.rst sinu.rst This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2010-02-15 02:31:40
|
Revision: 8131 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8131&view=rev Author: jswhit Date: 2010-02-15 02:31:33 +0000 (Mon, 15 Feb 2010) Log Message: ----------- add nsper examples Added Paths: ----------- trunk/toolkits/basemap/doc/users/figures/nsper_full.py trunk/toolkits/basemap/doc/users/figures/nsper_partial.py trunk/toolkits/basemap/doc/users/nsper.rst Added: trunk/toolkits/basemap/doc/users/figures/nsper_full.py =================================================================== --- trunk/toolkits/basemap/doc/users/figures/nsper_full.py (rev 0) +++ trunk/toolkits/basemap/doc/users/figures/nsper_full.py 2010-02-15 02:31:33 UTC (rev 8131) @@ -0,0 +1,18 @@ +from mpl_toolkits.basemap import Basemap +import numpy as np +import matplotlib.pyplot as plt +# lon_0, lat_0 are the center point of the projection. +# satellite_height is the altitude of the camera. +# resolution = 'l' means use low resolution coastlines. +h = 3000. +m = Basemap(projection='nsper',lon_0=-105,lat_0=40, + satellite_height=h*1000.,resolution='l') +m.drawcoastlines() +m.fillcontinents(color='coral',lake_color='aqua') +# draw parallels and meridians. +m.drawparallels(np.arange(-90.,120.,30.)) +m.drawmeridians(np.arange(0.,420.,60.)) +m.drawmapboundary(fill_color='aqua') +plt.title("Full Disk Near-Sided Perspective Projection %d km above earth" % + h,fontsize=10) +plt.savefig('nsper_full.png') Added: trunk/toolkits/basemap/doc/users/figures/nsper_partial.py =================================================================== --- trunk/toolkits/basemap/doc/users/figures/nsper_partial.py (rev 0) +++ trunk/toolkits/basemap/doc/users/figures/nsper_partial.py 2010-02-15 02:31:33 UTC (rev 8131) @@ -0,0 +1,33 @@ +from mpl_toolkits.basemap import Basemap +import numpy as np +import matplotlib.pyplot as plt +fig = plt.figure() +# global ortho map centered on lon_0,lat_0 +lat_0=10.; lon_0=57. +# altitude of camera (in km). +h = 3000. +# resolution = None means don't process the boundary datasets. +m1 = Basemap(projection='nsper',satellite_height=h*1000.,\ + lon_0=lon_0,lat_0=lat_0,resolution=None) +# add an axes with a black background +ax = fig.add_axes([0.1,0.1,0.8,0.8],axisbg='k') +# plot just upper right quadrant (corners determined from global map). +# keywords llcrnrx,llcrnry,urcrnrx,urcrnry used to define the lower +# left and upper right corners in map projection coordinates. +# llcrnrlat,llcrnrlon,ucrnrlon,urcrnrlat could be used to define +# lat/lon values of corners - but this won't work in cases such as this +# where one of the corners does not lie on the earth. +m = Basemap(projection='nsper',satellite_height=h*1000.,\ + lon_0=lon_0,lat_0=lat_0,resolution='l',\ + llcrnrx=0.,llcrnry=0.,urcrnrx=m1.urcrnrx/2.,urcrnry=m1.urcrnry/2.) +m.drawcoastlines() +m.drawmapboundary(fill_color='aqua') +m.fillcontinents(color='coral',lake_color='aqua') +m.drawcountries() +# draw parallels and meridians. +m.drawparallels(np.arange(-90.,120.,30.)) +m.drawmeridians(np.arange(0.,360.,60.)) +m.drawmapboundary() +plt.title('Near-Sided Perspective Map Showing A Quadrant of the Globe',\ + fontsize=12) +plt.savefig('nsper_partial.png') Added: trunk/toolkits/basemap/doc/users/nsper.rst =================================================================== --- trunk/toolkits/basemap/doc/users/nsper.rst (rev 0) +++ trunk/toolkits/basemap/doc/users/nsper.rst 2010-02-15 02:31:33 UTC (rev 8131) @@ -0,0 +1,15 @@ +.. _nsper: + +Near-Sided Perspective Projection +================================= + +The near-sided perspective projection displays the earth as a satellite +(in orbit at an arbitrary altitude above the earth) would see it. + +.. literalinclude:: figures/nsper_full.py + +.. image:: figures/nsper_full.png + +.. literalinclude:: figures/nsper_partial.py + +.. image:: figures/nsper_partial.png This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <as...@us...> - 2010-02-15 02:02:38
|
Revision: 8130 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8130&view=rev Author: astraw Date: 2010-02-15 02:02:32 +0000 (Mon, 15 Feb 2010) Log Message: ----------- testing bugfix: always copy baseline image Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/testing/decorators.py Modified: trunk/matplotlib/lib/matplotlib/testing/decorators.py =================================================================== --- trunk/matplotlib/lib/matplotlib/testing/decorators.py 2010-02-15 00:19:05 UTC (rev 8129) +++ trunk/matplotlib/lib/matplotlib/testing/decorators.py 2010-02-15 02:02:32 UTC (rev 8130) @@ -88,8 +88,7 @@ orig_expected_fnames = [os.path.join(baseline_dir,fname) + '.' + extension for fname in baseline_images] expected_fnames = [os.path.join(result_dir,'expected-'+fname) + '.' + extension for fname in baseline_images] for src,dst in zip( orig_expected_fnames, expected_fnames ): - if os.path.exists(src) and not os.path.exists(dst): - shutil.copyfile(src,dst) + shutil.copyfile(src,dst) actual_fnames = [os.path.join(result_dir, fname) + '.' + extension for fname in baseline_images] have_baseline_images = [os.path.exists(expected) for expected in expected_fnames] have_baseline_image = np.all(have_baseline_images) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <as...@us...> - 2010-02-15 01:09:42
|
Revision: 8129 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8129&view=rev Author: astraw Date: 2010-02-15 00:19:05 +0000 (Mon, 15 Feb 2010) Log Message: ----------- replace not-obviously wrong image that is spontaneously failing tests Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_image/image_interps.png Modified: trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_image/image_interps.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <as...@us...> - 2010-02-12 17:25:03
|
Revision: 8128 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8128&view=rev Author: astraw Date: 2010-02-12 17:24:56 +0000 (Fri, 12 Feb 2010) Log Message: ----------- allow numpy 2.x to pass check for numpy >= 1.1 (reported by Nadia Dencheva) Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/__init__.py trunk/matplotlib/setupext.py Modified: trunk/matplotlib/lib/matplotlib/__init__.py =================================================================== --- trunk/matplotlib/lib/matplotlib/__init__.py 2010-02-12 02:21:05 UTC (rev 8127) +++ trunk/matplotlib/lib/matplotlib/__init__.py 2010-02-12 17:24:56 UTC (rev 8128) @@ -147,8 +147,10 @@ import numpy nn = numpy.__version__.split('.') if not (int(nn[0]) >= 1 and int(nn[1]) >= 1): - raise ImportError( - 'numpy 1.1 or later is required; you have %s' % numpy.__version__) + if not (int(nn[0]) >= 2): + raise ImportError( + 'numpy 1.1 or later is required; you have %s' % + numpy.__version__) def is_string_like(obj): if hasattr(obj, 'shape'): return 0 Modified: trunk/matplotlib/setupext.py =================================================================== --- trunk/matplotlib/setupext.py 2010-02-12 02:21:05 UTC (rev 8127) +++ trunk/matplotlib/setupext.py 2010-02-12 17:24:56 UTC (rev 8128) @@ -516,9 +516,11 @@ return False nn = numpy.__version__.split('.') if not (int(nn[0]) >= 1 and int(nn[1]) >= 1): - print_message( - 'numpy 1.1 or later is required; you have %s' % numpy.__version__) - return False + if not (int(nn[0]) >= 2): + print_message( + 'numpy 1.1 or later is required; you have %s' % + numpy.__version__) + return False module = Extension('test', []) add_numpy_flags(module) add_base_flags(module) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <as...@us...> - 2010-02-12 02:21:15
|
Revision: 8127 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8127&view=rev Author: astraw Date: 2010-02-12 02:21:05 +0000 (Fri, 12 Feb 2010) Log Message: ----------- Add option to bootstrap confidence intervals for boxplot (Paul Hobson) Modified Paths: -------------- trunk/matplotlib/CHANGELOG trunk/matplotlib/lib/matplotlib/axes.py Added Paths: ----------- trunk/matplotlib/examples/pylab_examples/boxplot_demo3.py Modified: trunk/matplotlib/CHANGELOG =================================================================== --- trunk/matplotlib/CHANGELOG 2010-02-11 13:15:28 UTC (rev 8126) +++ trunk/matplotlib/CHANGELOG 2010-02-12 02:21:05 UTC (rev 8127) @@ -1,3 +1,7 @@ +2010-02-11 Added 'bootstrap' option to boxplot. This allows bootstrap + estimates of median confidence intervals. Based on an + initial patch by Paul Hobson. - ADS + 2010-02-06 Added setup.cfg "basedirlist" option to override setting in setupext.py "basedir" dictionary; added "gnu0" platform requested by Benjamin Drung. - EF Added: trunk/matplotlib/examples/pylab_examples/boxplot_demo3.py =================================================================== --- trunk/matplotlib/examples/pylab_examples/boxplot_demo3.py (rev 0) +++ trunk/matplotlib/examples/pylab_examples/boxplot_demo3.py 2010-02-12 02:21:05 UTC (rev 8127) @@ -0,0 +1,27 @@ +import matplotlib.pyplot as plt +import matplotlib.transforms as mtransforms +import numpy as np + +np.random.seed(2) +inc = 0.1 +e1 = np.random.uniform(0,1, size=(500,)) +e2 = np.random.uniform(0,1, size=(500,)) +e3 = np.random.uniform(0,1 + inc, size=(500,)) +e4 = np.random.uniform(0,1 + 2*inc, size=(500,)) + +treatments = [e1,e2,e3,e4] + +fig = plt.figure() +ax = fig.add_subplot(111) +pos = np.array(range(len(treatments)))+1 +bp = ax.boxplot( treatments, sym='k+', patch_artist=True, + positions=pos, notch=1, bootstrap=5000 ) +text_transform= mtransforms.blended_transform_factory(ax.transData, + ax.transAxes) +ax.set_xlabel('treatment') +ax.set_ylabel('response') +ax.set_ylim(-0.2, 1.4) +plt.setp(bp['whiskers'], color='k', linestyle='-' ) +plt.setp(bp['fliers'], markersize=3.0) +fig.subplots_adjust(right=0.99,top=0.99) +plt.show() Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2010-02-11 13:15:28 UTC (rev 8126) +++ trunk/matplotlib/lib/matplotlib/axes.py 2010-02-12 02:21:05 UTC (rev 8127) @@ -4881,7 +4881,8 @@ return (l0, caplines, barcols) def boxplot(self, x, notch=0, sym='b+', vert=1, whis=1.5, - positions=None, widths=None, patch_artist=False): + positions=None, widths=None, patch_artist=False, + bootstrap=None): """ call signature:: @@ -4910,6 +4911,16 @@ a function of the inner quartile range. They extend to the most extreme data point within ( ``whis*(75%-25%)`` ) data range. + *bootstrap* (default None) specifies whether to bootstrap the + confidence intervals around the median for notched + boxplots. If bootstrap==None, no bootstrapping is performed, + and notches are calculated using a Gaussian-based asymptotic + approximation (see McGill, R., Tukey, J.W., and Larsen, W.A., + 1978, and Kendall and Stuart, 1967). Otherwise, bootstrap + specifies the number of times to bootstrap the median to + determine it's 95% confidence intervals. Values between 1000 + and 10000 are recommended. + *positions* (default 1,2,...,n) sets the horizontal positions of the boxes. The ticks and limits are automatically set to match the positions. @@ -5021,8 +5032,33 @@ med_x = [box_x_min, box_x_max] # calculate 'notch' plot else: - notch_max = med + 1.57*iq/np.sqrt(row) - notch_min = med - 1.57*iq/np.sqrt(row) + if bootstrap is not None: + # Do a bootstrap estimate of notch locations. + def bootstrapMedian(data, N=5000): + # determine 95% confidence intervals of the median + M = len(data) + percentile = [2.5,97.5] + estimate = np.zeros(N) + for n in range(N): + bsIndex = np.random.random_integers(0,M-1,M) + bsData = data[bsIndex] + estimate[n] = mlab.prctile(bsData, 50) + CI = mlab.prctile(estimate, percentile) + return CI + + # get conf. intervals around median + CI = bootstrapMedian(d, N=bootstrap) + notch_max = CI[1] + notch_min = CI[0] + else: + # Estimate notch locations using Gaussian-based + # asymptotic approximation. + # + # For discussion: McGill, R., Tukey, J.W., + # and Larsen, W.A. (1978) "Variations of + # Boxplots", The American Statistician, 32:12-16. + notch_max = med + 1.57*iq/np.sqrt(row) + notch_min = med - 1.57*iq/np.sqrt(row) # make our notched box vectors box_x = [box_x_min, box_x_max, box_x_max, cap_x_max, box_x_max, box_x_max, box_x_min, box_x_min, cap_x_min, box_x_min, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2010-02-11 13:15:34
|
Revision: 8126 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8126&view=rev Author: jswhit Date: 2010-02-11 13:15:28 +0000 (Thu, 11 Feb 2010) Log Message: ----------- add limited area plot Modified Paths: -------------- trunk/toolkits/basemap/examples/nsper_demo.py Modified: trunk/toolkits/basemap/examples/nsper_demo.py =================================================================== --- trunk/toolkits/basemap/examples/nsper_demo.py 2010-02-11 13:02:50 UTC (rev 8125) +++ trunk/toolkits/basemap/examples/nsper_demo.py 2010-02-11 13:15:28 UTC (rev 8126) @@ -21,5 +21,23 @@ m.drawmeridians(np.arange(0.,420.,20.)) m.drawmapboundary() plt.title('Near-Sided Perspective Map Centered on Lon=%s, Lat=%s, H=%g' %\ - (lon_0,lat_0,h),fontsize=10) + (lon_0,lat_0,h/1000.),fontsize=10) + +fig = plt.figure() +m1 = Basemap(projection='nsper',lon_0=lon_0,lat_0=lat_0,satellite_height=h,resolution=None) +ax = fig.add_axes([0.1,0.1,0.8,0.8],axisbg='k') +# plot just upper right quadrant (coordinates determined from global map). +m = Basemap(projection='nsper',lon_0=lon_0,lat_0=lat_0,satellite_height=h,resolution='l',llcrnrx=0.,llcrnry=0.,urcrnrx=m1.urcrnrx/2.,urcrnry=m1.urcrnry/2.) +m.drawcoastlines() +m.drawmapboundary(fill_color='aqua') +m.fillcontinents(color='coral',lake_color='aqua') +m.drawcountries() +m.drawstates() +# draw parallels and meridians. +m.drawparallels(np.arange(-90.,120.,30.)) +m.drawmeridians(np.arange(0.,420.,60.)) +m.drawmapboundary() +plt.title('Near-Sided Perspective Map Centered on Lon=%s, Lat=%s, H=%g' %\ + (lon_0,lat_0,h/1000.),fontsize=10) + plt.show() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2010-02-11 13:03:03
|
Revision: 8125 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8125&view=rev Author: jswhit Date: 2010-02-11 13:02:50 +0000 (Thu, 11 Feb 2010) Log Message: ----------- initial support for near-sided perspective satellite projection. Modified Paths: -------------- trunk/toolkits/basemap/Changelog trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py trunk/toolkits/basemap/lib/mpl_toolkits/basemap/proj.py Added Paths: ----------- trunk/toolkits/basemap/examples/nsper_demo.py Modified: trunk/toolkits/basemap/Changelog =================================================================== --- trunk/toolkits/basemap/Changelog 2010-02-10 16:00:15 UTC (rev 8124) +++ trunk/toolkits/basemap/Changelog 2010-02-11 13:02:50 UTC (rev 8125) @@ -1,4 +1,6 @@ version 0.99.5 (not yet released) + * added "near-sided perspective" projection for a satellite + view at an arbitrary altitude. * patch from Stephane Raynaud to pass format string to drawmapscale, and allow units='m'. * updated proj4 source to version 4.7.0, pyproj to 1.8.6. Added: trunk/toolkits/basemap/examples/nsper_demo.py =================================================================== --- trunk/toolkits/basemap/examples/nsper_demo.py (rev 0) +++ trunk/toolkits/basemap/examples/nsper_demo.py 2010-02-11 13:02:50 UTC (rev 8125) @@ -0,0 +1,25 @@ +from mpl_toolkits.basemap import Basemap +import numpy as np +import matplotlib.pyplot as plt + +# create Basemap instance for Near-Sided Perspective (satellite view) projection. +lon_0 = float(raw_input('enter reference longitude (lon_0):')) +lat_0 = float(raw_input('enter reference longitude (lat_0):')) +h = float(raw_input('enter altitude of camera in km (h):')) +h=h*1000. + +# map with continents drawn and filled. +fig = plt.figure() +m = Basemap(projection='nsper',lon_0=lon_0,lat_0=lat_0,satellite_height=h,resolution='l') +m.drawcoastlines() +m.drawmapboundary(fill_color='aqua') +m.fillcontinents(color='coral',lake_color='aqua') +m.drawcountries() +m.drawstates() +# draw parallels and meridians. +m.drawparallels(np.arange(-90.,120.,10.)) +m.drawmeridians(np.arange(0.,420.,20.)) +m.drawmapboundary() +plt.title('Near-Sided Perspective Map Centered on Lon=%s, Lat=%s, H=%g' %\ + (lon_0,lat_0,h),fontsize=10) +plt.show() Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py =================================================================== --- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-02-10 16:00:15 UTC (rev 8124) +++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-02-11 13:02:50 UTC (rev 8125) @@ -78,6 +78,7 @@ 'poly' : 'Polyconic', 'ortho' : 'Orthographic', 'geos' : 'Geostationary', + 'nsper' : 'Near-Sided Perspective', 'sinu' : 'Sinusoidal', 'moll' : 'Mollweide', 'robin' : 'Robinson', @@ -116,6 +117,7 @@ 'poly' : 'lon_0,lat_0', 'ortho' : 'lon_0,lat_0,llcrnrx,llcrnry,urcrnrx,urcrnry,no width/height', 'geos' : 'lon_0,satellite_height,llcrnrx,llcrnry,urcrnrx,urcrnry,no width/height', + 'nsper' : 'lon_0,satellite_height,llcrnrx,llcrnry,urcrnrx,urcrnry,no width/height', 'sinu' : 'lon_0,lat_0,no corners or width/height', 'moll' : 'lon_0,lat_0,no corners or width/height', 'robin' : 'lon_0,lat_0,no corners or width/height', @@ -189,10 +191,10 @@ For the cylindrical projections (``cyl``, ``merc``, ``mill`` and ``gall``), the default is to use llcrnrlon=-180,llcrnrlat=-90, urcrnrlon=180 and urcrnrlat=90). For all other - projections except ``ortho`` and ``geos``, either the lat/lon values of the + projections except ``ortho``, ``geos`` and ``nsper``, either the lat/lon values of the corners or width and height must be specified by the user. - For ``ortho`` and ``geos``, the lat/lon values of the corners may be specified, + For ``ortho``, ``geos`` and ``nsper``, the lat/lon values of the corners may be specified, or the x/y values of the corners (llcrnrx,llcrnry,urcrnrx,urcrnry) in the coordinate system of the global projection (with x=0,y=0 at the center of the global projection). If the corners are not specified, @@ -311,8 +313,9 @@ latitude circle boundinglat is tangent to the edge of the map at lon_0. satellite_height height of satellite (in m) above equator - - only relevant for geostationary projections - (``geos``). Default 35,786 km. + only relevant for geostationary + and near-sided perspective (``geos`` or ``nsper``) + projections. Default 35,786 km. ================ ==================================================== Useful instance variables: @@ -475,7 +478,7 @@ _insert_validated(projparams, lon_0, 'lon_0', -360, 720) _insert_validated(projparams, lon_1, 'lon_1', -360, 720) _insert_validated(projparams, lon_2, 'lon_2', -360, 720) - if projection == 'geos': + if projection in ['geos','nsper']: projparams['h'] = satellite_height # check for sane values of projection corners. using_corners = (None not in [llcrnrlon,llcrnrlat,urcrnrlon,urcrnrlat]) @@ -601,6 +604,24 @@ self._fulldisk = False self.llcrnrlon = llcrnrlon; self.llcrnrlat = llcrnrlat self.urcrnrlon = urcrnrlon; self.urcrnrlat = urcrnrlat + elif projection == 'nsper': + if not projparams.has_key('R'): + raise ValueError, 'near-sided perspective projection only works for perfect spheres - not ellipsoids' + if lat_0 is None or lon_0 is None: + msg='must specify lon_0 and lat_0 for near-sided perspective Basemap' + raise ValueError(msg) + if width is not None or height is not None: + print 'warning: width and height keywords ignored for %s projection' % _projnames[self.projection] + if not using_corners: + llcrnrlon = -180. + llcrnrlat = -90. + urcrnrlon = 180 + urcrnrlat = 90. + self._fulldisk = True + else: + self._fulldisk = False + self.llcrnrlon = llcrnrlon; self.llcrnrlat = llcrnrlat + self.urcrnrlon = urcrnrlon; self.urcrnrlat = urcrnrlat elif projection in _pseudocyl: if lon_0 is None: raise ValueError, 'must specify lon_0 for %s projection' % _projnames[self.projection] @@ -723,7 +744,7 @@ self.aspect = (self.urcrnrlat-self.llcrnrlat)/(self.urcrnrlon-self.llcrnrlon) else: self.aspect = (proj.ymax-proj.ymin)/(proj.xmax-proj.xmin) - if projection in ['geos','ortho'] and \ + if projection in ['geos','ortho','nsper'] and \ None not in [llcrnrx,llcrnry,urcrnrx,urcrnry]: self.llcrnrx = llcrnrx+0.5*proj.xmax self.llcrnry = llcrnry+0.5*proj.ymax @@ -764,7 +785,7 @@ self.latmax = self.urcrnrlat self.lonmin = self.llcrnrlon self.lonmax = self.urcrnrlon - elif self.projection in ['ortho','geos'] + _pseudocyl: + elif self.projection in ['ortho','geos','nsper'] + _pseudocyl: self.latmin = -90. self.latmax = 90. self.lonmin = self.llcrnrlon @@ -906,12 +927,12 @@ if containsPole and\ self.projection in _cylproj + _pseudocyl + ['geos']: raise ValueError('%s projection cannot cross pole'%(self.projection)) - # make sure orthographic or gnomonic projection has containsPole=True + # make sure some projections have has containsPole=True # we will compute the intersections in stereographic - # coordinates, then transform to orthographic. This is + # coordinates, then transform back. This is # because these projections are only defined on a hemisphere, and # some boundary features (like Eurasia) would be undefined otherwise. - if self.projection in ['ortho','gnom'] and name == 'gshhs': + if self.projection in ['ortho','gnom','nsper'] and name == 'gshhs': containsPole = True lon_0=self.projparams['lon_0'] lat_0=self.projparams['lat_0'] @@ -922,7 +943,7 @@ lat0 = 90.*(np.around(lat_0/90.)) if np.abs(int(lat0)) == 90: lon0=0. maptran = pyproj.Proj(proj='stere',lon_0=lon0,lat_0=lat0,R=re) - # boundary polygon for ortho/gnom projection + # boundary polygon for ortho/gnom/nsper projection # in stereographic coorindates. b = self._boundarypolyll.boundary blons = b[:,0]; blats = b[:,1] @@ -1030,9 +1051,10 @@ else: # transform coordinates from lat/lon # to map projection coordinates. - # special case for ortho/gnom, compute coastline polygon + # special case for ortho/gnom/nsper, compute coastline polygon # vertices in stereographic coords. - if name == 'gshhs' and self.projection in ['ortho','gnom']: + if name == 'gshhs' and self.projection in\ + ['ortho','gnom','nsper']: b[:,0], b[:,1] = maptran(b[:,0], b[:,1]) else: b[:,0], b[:,1] = self(b[:,0], b[:,1]) @@ -1046,10 +1068,10 @@ # in this map projection. bx = np.compress(goodmask, b[:,0]) by = np.compress(goodmask, b[:,1]) - # for ortho/gnom projection, all points + # for ortho/gnom/nsper projection, all points # outside map projection region are eliminated # with the above step, so we're done. - if self.projection in ['ortho','gnom']: + if self.projection in ['ortho','gnom','nsper']: polygons.append(zip(bx,by)) polygon_types.append(type) continue @@ -1073,22 +1095,22 @@ # iterate over geometries in intersection. for psub in geoms: b = psub.boundary - # if projection in ['ortho','gnom'], + # if projection in ['ortho','gnom','nsper'], # transform polygon from stereographic - # to ortho/gnom coordinates. - if self.projection in ['ortho','gnom']: + # to ortho/gnom/nsper coordinates. + if self.projection in ['ortho','gnom','nsper']: # if coastline polygon covers more than 99% # of map region for fulldisk projection, # it's probably bogus, so skip it. areafrac = psub.area()/boundarypolyxy.area() - if self.projection == 'ortho': + if self.projection == ['ortho','nsper']: if name == 'gshhs' and\ self._fulldisk and\ areafrac > 0.99: continue # inverse transform from stereographic # to lat/lon. b[:,0], b[:,1] = maptran(b[:,0], b[:,1], inverse=True) - # orthographic/gnomonic. + # orthographic/gnomonic/nsper. b[:,0], b[:,1]= self(b[:,0], b[:,1]) polygons.append(zip(b[:,0],b[:,1])) polygon_types.append(type) @@ -1102,7 +1124,7 @@ if self.projection == 'vandg': nx = 10*nx; ny = 10*ny maptran = self - if self.projection in ['ortho','geos']: + if self.projection in ['ortho','geos','nsper']: # circular region. thetas = np.linspace(0.,2.*np.pi,2*nx*ny)[:-1] rminor = self._height @@ -1246,10 +1268,10 @@ # get current axes instance (if none specified). ax = ax or self._check_ax() limb = None - if self.projection in ['ortho','geos'] or (self.projection=='aeqd' and\ + if self.projection in ['ortho','geos','nsper'] or (self.projection=='aeqd' and\ self._fulldisk): limb = Ellipse((self._width,self._height),2.*self._width,2.*self._height) - if self.projection in ['ortho','geos','aeqd'] and self._fulldisk: + if self.projection in ['ortho','geos','nsper','aeqd'] and self._fulldisk: # elliptical region. ax.add_patch(limb) if fill_color is None: @@ -1301,7 +1323,7 @@ except AttributeError: for spine in ax.spines.itervalues(): spine.set_linewidth(linewidth) - if self.projection not in ['geos','ortho']: + if self.projection not in ['geos','ortho','nsper']: if fill_color is not None: ax.axesPatch.set_facecolor(fill_color) try: @@ -1876,7 +1898,7 @@ linecolls[circ] = (lines,[]) # draw labels for parallels # parallels not labelled for fulldisk orthographic or geostationary - if self.projection in ['ortho','geos','vandg','aeqd'] and max(labels): + if self.projection in ['ortho','geos','nsper','vandg','aeqd'] and max(labels): if self.projection == 'vandg' or self._fulldisk: print 'Warning: Cannot label parallels on %s basemap' % _projnames[self.projection] labels = [0,0,0,0] @@ -2118,7 +2140,7 @@ if self.projection in ['sinu','moll','vandg'] and max(labels): print 'Warning: Cannot label meridians on %s basemap' % _projnames[self.projection] labels = [0,0,0,0] - if self.projection in ['ortho','geos','aeqd'] and max(labels): + if self.projection in ['ortho','geos','nsper','aeqd'] and max(labels): if self._fulldisk: print dedent( """'Warning: Cannot label meridians on full-disk @@ -2572,7 +2594,7 @@ # turn off axes frame for non-rectangular projections. if self.projection in _pseudocyl: ax.set_frame_on(False) - if self.projection in ['ortho','geos','aeqd'] and self._fulldisk: + if self.projection in ['ortho','geos','nsper','aeqd'] and self._fulldisk: ax.set_frame_on(False) # make sure aspect ratio of map preserved. # plot is re-centered in bounding rectangle. @@ -3298,7 +3320,7 @@ self.transform_scalar(self._bm_rgba[:,:,k],\ self._bm_lons,self._bm_lats,nx,ny,returnxy=True) # for ortho,geos mask pixels outside projection limb. - if self.projection in ['geos','ortho'] or \ + if self.projection in ['geos','ortho','nsper'] or \ (self.projection == 'aeqd' and self._fulldisk): lonsr,latsr = self(x,y,inverse=True) mask = ma.zeros((ny,nx,4),np.int8) Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/proj.py =================================================================== --- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/proj.py 2010-02-10 16:00:15 UTC (rev 8124) +++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/proj.py 2010-02-11 13:02:50 UTC (rev 8125) @@ -147,6 +147,38 @@ llcrnrx, llcrnry = self(llcrnrlon,llcrnrlat) if llcrnrx > 1.e20 or llcrnry > 1.e20: raise ValueError(_lower_left_out_of_bounds) + elif self.projection == 'nsper': + self._proj4 = pyproj.Proj(projparams) + # find major and minor axes of ellipse defining map proj region. + # h is measured from surface of earth at equator. + h = projparams['h'] + self.rmajor + # latitude of horizon on central meridian + lonmax = 90.-(180./np.pi)*np.arcsin(self.rmajor/h) + # longitude of horizon on equator + latmax = 90.-(180./np.pi)*np.arcsin(self.rmajor/h) + # truncate to nearest hundredth of a degree (to make sure + # they aren't slightly over the horizon) + latmax = int(100*latmax)/100. + lonmax = int(100*lonmax)/100. + # width and height of visible projection + P = pyproj.Proj(proj='nsper',a=self.rmajor,\ + b=self.rminor,lat_0=0,lon_0=0,h=projparams['h']) + x1,y1 = P(0.,latmax); x2,y2 = P(lonmax,0.) + width = x2; height = y1 + self._height = height + self._width = width + if (llcrnrlon == -180 and llcrnrlat == -90 and + urcrnrlon == 180 and urcrnrlat == 90): + self._fulldisk = True + llcrnrx = -width + llcrnry = -height + urcrnrx = -llcrnrx + urcrnry = -llcrnry + else: + self._fulldisk = False + llcrnrx, llcrnry = self(llcrnrlon,llcrnrlat) + if llcrnrx > 1.e20 or llcrnry > 1.e20: + raise ValueError(_lower_left_out_of_bounds) elif self.projection in _pseudocyl: self._proj4 = pyproj.Proj(projparams) xtmp,urcrnry = self(projparams['lon_0'],90.) @@ -172,9 +204,9 @@ if urcrnrislatlon: self.urcrnrlon = urcrnrlon self.urcrnrlat = urcrnrlat - if self.projection not in ['ortho','geos','aeqd'] + _pseudocyl: + if self.projection not in ['ortho','geos','nsper','aeqd'] + _pseudocyl: urcrnrx,urcrnry = self(urcrnrlon,urcrnrlat) - elif self.projection in ['ortho','geos','aeqd']: + elif self.projection in ['ortho','geos','nsper','aeqd']: if self._fulldisk: urcrnrx = 2.*self._width urcrnry = 2.*self._height This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jd...@us...> - 2010-02-10 16:00:34
|
Revision: 8124 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8124&view=rev Author: jdh2358 Date: 2010-02-10 16:00:15 +0000 (Wed, 10 Feb 2010) Log Message: ----------- added Yannick Copin's updated sanke demo Modified Paths: -------------- trunk/matplotlib/examples/api/sankey_demo.py Modified: trunk/matplotlib/examples/api/sankey_demo.py =================================================================== --- trunk/matplotlib/examples/api/sankey_demo.py 2010-02-10 15:56:34 UTC (rev 8123) +++ trunk/matplotlib/examples/api/sankey_demo.py 2010-02-10 16:00:15 UTC (rev 8124) @@ -1,105 +1,188 @@ #!/usr/bin/env python -# Time-stamp: <2010-02-10 01:49:08 ycopin> -import numpy as np -import matplotlib.pyplot as plt -import matplotlib.patches as mpatches -from matplotlib.path import Path +__author__ = "Yannick Copin <yc...@ip...>" +__version__ = "Time-stamp: <10/02/2010 16:49 yc...@ly...>" -def sankey(ax, losses, labels=None, - dx=40, dy=10, angle=45, w=3, dip=10, offset=2, **kwargs): +import numpy as N + +def sankey(ax, + outputs=[100.], outlabels=None, + inputs=[100.], inlabels='', + dx=40, dy=10, outangle=45, w=3, inangle=30, offset=2, **kwargs): """Draw a Sankey diagram. - losses: array of losses, should sum up to 100% - labels: loss labels (same length as losses), - or None (use default labels) or '' (no labels) + outputs: array of outputs, should sum up to 100% + outlabels: output labels (same length as outputs), + or None (use default labels) or '' (no labels) + inputs and inlabels: similar for inputs dx: horizontal elongation dy: vertical elongation - angle: arrow angle [deg] - w: arrow shoulder - dip: input dip + outangle: output arrow angle [deg] + w: output arrow shoulder + inangle: input dip angle offset: text offset **kwargs: propagated to Patch (e.g. fill=False) - Return (patch,texts).""" + Return (patch,[intexts,outtexts]).""" - assert sum(losses)==100, "Input losses don't sum up to 100%" + import matplotlib.patches as mpatches + from matplotlib.path import Path - def add_loss(loss, last=False): - h = (loss/2+w)*np.tan(angle/180.*np.pi) # Arrow tip height + outs = N.absolute(outputs) + outsigns = N.sign(outputs) + outsigns[-1] = 0 # Last output + + ins = N.absolute(inputs) + insigns = N.sign(inputs) + insigns[0] = 0 # First input + + assert sum(outs)==100, "Outputs don't sum up to 100%" + assert sum(ins)==100, "Inputs don't sum up to 100%" + + def add_output(path, loss, sign=1): + h = (loss/2+w)*N.tan(outangle/180.*N.pi) # Arrow tip height move,(x,y) = path[-1] # Use last point as reference - if last: # Final loss (horizontal) + if sign==0: # Final loss (horizontal) path.extend([(Path.LINETO,[x+dx,y]), (Path.LINETO,[x+dx,y+w]), (Path.LINETO,[x+dx+h,y-loss/2]), # Tip (Path.LINETO,[x+dx,y-loss-w]), (Path.LINETO,[x+dx,y-loss])]) - tips.append(path[-3][1]) + outtips.append((sign,path[-3][1])) else: # Intermediate loss (vertical) - path.extend([(Path.LINETO,[x+dx/2,y]), - (Path.CURVE3,[x+dx,y]), - (Path.CURVE3,[x+dx,y+dy]), - (Path.LINETO,[x+dx-w,y+dy]), - (Path.LINETO,[x+dx+loss/2,y+dy+h]), # Tip - (Path.LINETO,[x+dx+loss+w,y+dy]), - (Path.LINETO,[x+dx+loss,y+dy]), - (Path.CURVE3,[x+dx+loss,y-loss]), - (Path.CURVE3,[x+dx/2+loss,y-loss])]) - tips.append(path[-5][1]) + path.extend([(Path.CURVE4,[x+dx/2,y]), + (Path.CURVE4,[x+dx,y]), + (Path.CURVE4,[x+dx,y+sign*dy]), + (Path.LINETO,[x+dx-w,y+sign*dy]), + (Path.LINETO,[x+dx+loss/2,y+sign*(dy+h)]), # Tip + (Path.LINETO,[x+dx+loss+w,y+sign*dy]), + (Path.LINETO,[x+dx+loss,y+sign*dy]), + (Path.CURVE3,[x+dx+loss,y-sign*loss]), + (Path.CURVE3,[x+dx/2+loss,y-sign*loss])]) + outtips.append((sign,path[-5][1])) - tips = [] # Arrow tip positions - path = [(Path.MOVETO,[0,100])] # 1st point - for i,loss in enumerate(losses): - add_loss(loss, last=(i==(len(losses)-1))) - path.extend([(Path.LINETO,[0,0]), - (Path.LINETO,[dip,50]), # Dip - (Path.CLOSEPOLY,[0,100])]) + def add_input(path, gain, sign=1): + h = (gain/2)*N.tan(inangle/180.*N.pi) # Dip depth + move,(x,y) = path[-1] # Use last point as reference + if sign==0: # First gain (horizontal) + path.extend([(Path.LINETO,[x-dx,y]), + (Path.LINETO,[x-dx+h,y+gain/2]), # Dip + (Path.LINETO,[x-dx,y+gain])]) + xd,yd = path[-2][1] # Dip position + indips.append((sign,[xd-h,yd])) + else: # Intermediate gain (vertical) + path.extend([(Path.CURVE4,[x-dx/2,y]), + (Path.CURVE4,[x-dx,y]), + (Path.CURVE4,[x-dx,y+sign*dy]), + (Path.LINETO,[x-dx-gain/2,y+sign*(dy-h)]), # Dip + (Path.LINETO,[x-dx-gain,y+sign*dy]), + (Path.CURVE3,[x-dx-gain,y-sign*gain]), + (Path.CURVE3,[x-dx/2-gain,y-sign*gain])]) + xd,yd = path[-4][1] # Dip position + indips.append((sign,[xd,yd+sign*h])) + + outtips = [] # Output arrow tip dir. and positions + urpath = [(Path.MOVETO,[0,100])] # 1st point of upper right path + lrpath = [(Path.LINETO,[0,0])] # 1st point of lower right path + for loss,sign in zip(outs,outsigns): + add_output(sign>=0 and urpath or lrpath, loss, sign=sign) + + indips = [] # Input arrow tip dir. and positions + llpath = [(Path.LINETO,[0,0])] # 1st point of lower left path + ulpath = [(Path.MOVETO,[0,100])] # 1st point of upper left path + for gain,sign in zip(ins,insigns)[::-1]: + add_input(sign<=0 and llpath or ulpath, gain, sign=sign) + + def revert(path): + """A path is not just revertable by path[::-1] because of Bezier + curves.""" + rpath = [] + nextmove = Path.LINETO + for move,pos in path[::-1]: + rpath.append((nextmove,pos)) + nextmove = move + return rpath + + # Concatenate subpathes in correct order + path = urpath + revert(lrpath) + llpath + revert(ulpath) + codes,verts = zip(*path) - verts = np.array(verts) + verts = N.array(verts) # Path patch path = Path(verts,codes) patch = mpatches.PathPatch(path, **kwargs) ax.add_patch(patch) + if False: # DEBUG + print "urpath", urpath + print "lrpath", revert(lrpath) + print "llpath", llpath + print "ulpath", revert(ulpath) + + xs,ys = zip(*verts) + ax.plot(xs,ys,'go-') + # Labels - if labels=='': # No labels - pass - elif labels is None: # Default labels - labels = [ '%2d%%' % loss for loss in losses ] - else: - assert len(labels)==len(losses) - texts = [] - for i,label in enumerate(labels): - x,y = tips[i] # Label position - last = (i==(len(losses)-1)) - if last: - t = ax.text(x+offset,y,label, ha='left', va='center') + def set_labels(labels,values): + """Set or check labels according to values.""" + if labels=='': # No labels + return labels + elif labels is None: # Default labels + return [ '%2d%%' % val for val in values ] else: - t = ax.text(x,y+offset,label, ha='center', va='bottom') - texts.append(t) + assert len(labels)==len(values) + return labels + def put_labels(labels,positions,output=True): + """Put labels to positions.""" + texts = [] + lbls = output and labels or labels[::-1] + for i,label in enumerate(lbls): + s,(x,y) = positions[i] # Label direction and position + if s==0: + t = ax.text(x+offset,y,label, + ha=output and 'left' or 'right', va='center') + elif s>0: + t = ax.text(x,y+offset,label, ha='center', va='bottom') + else: + t = ax.text(x,y-offset,label, ha='center', va='top') + texts.append(t) + return texts + + outlabels = set_labels(outlabels, outs) + outtexts = put_labels(outlabels, outtips, output=True) + + inlabels = set_labels(inlabels, ins) + intexts = put_labels(inlabels, indips, output=False) + # Axes management - ax.set_xlim(verts[:,0].min()-10, verts[:,0].max()+40) - ax.set_ylim(verts[:,1].min()-10, verts[:,1].max()+20) + ax.set_xlim(verts[:,0].min()-dx, verts[:,0].max()+dx) + ax.set_ylim(verts[:,1].min()-dy, verts[:,1].max()+dy) ax.set_aspect('equal', adjustable='datalim') - ax.set_xticks([]) - ax.set_yticks([]) - return patch,texts + return patch,[intexts,outtexts] if __name__=='__main__': - losses = [10.,20.,5.,15.,10.,40.] - labels = ['First','Second','Third','Fourth','Fifth','Hurray!'] - labels = [ s+'\n%d%%' % l for l,s in zip(losses,labels) ] + import matplotlib.pyplot as P - fig = plt.figure() - ax = fig.add_subplot(1,1,1) + outputs = [10.,-20.,5.,15.,-10.,40.] + outlabels = ['First','Second','Third','Fourth','Fifth','Hurray!'] + outlabels = [ s+'\n%d%%' % abs(l) for l,s in zip(outputs,outlabels) ] - patch,texts = sankey(ax, losses, labels, fc='g', alpha=0.2) - texts[1].set_color('r') - texts[-1].set_fontweight('bold') + inputs = [60.,-25.,15.] - plt.show() + fig = P.figure() + ax = fig.add_subplot(1,1,1, xticks=[],yticks=[], + title="Sankey diagram" + ) + + patch,(intexts,outtexts) = sankey(ax, outputs=outputs, outlabels=outlabels, + inputs=inputs, inlabels=None, + fc='g', alpha=0.2) + outtexts[1].set_color('r') + outtexts[-1].set_fontweight('bold') + + P.show() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jd...@us...> - 2010-02-10 15:56:40
|
Revision: 8123 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8123&view=rev Author: jdh2358 Date: 2010-02-10 15:56:34 +0000 (Wed, 10 Feb 2010) Log Message: ----------- added Yannick Copin's sanke demo Added Paths: ----------- trunk/matplotlib/examples/api/sankey_demo.py Added: trunk/matplotlib/examples/api/sankey_demo.py =================================================================== --- trunk/matplotlib/examples/api/sankey_demo.py (rev 0) +++ trunk/matplotlib/examples/api/sankey_demo.py 2010-02-10 15:56:34 UTC (rev 8123) @@ -0,0 +1,105 @@ +#!/usr/bin/env python +# Time-stamp: <2010-02-10 01:49:08 ycopin> + +import numpy as np +import matplotlib.pyplot as plt +import matplotlib.patches as mpatches +from matplotlib.path import Path + +def sankey(ax, losses, labels=None, + dx=40, dy=10, angle=45, w=3, dip=10, offset=2, **kwargs): + """Draw a Sankey diagram. + + losses: array of losses, should sum up to 100% + labels: loss labels (same length as losses), + or None (use default labels) or '' (no labels) + dx: horizontal elongation + dy: vertical elongation + angle: arrow angle [deg] + w: arrow shoulder + dip: input dip + offset: text offset + **kwargs: propagated to Patch (e.g. fill=False) + + Return (patch,texts).""" + + assert sum(losses)==100, "Input losses don't sum up to 100%" + + def add_loss(loss, last=False): + h = (loss/2+w)*np.tan(angle/180.*np.pi) # Arrow tip height + move,(x,y) = path[-1] # Use last point as reference + if last: # Final loss (horizontal) + path.extend([(Path.LINETO,[x+dx,y]), + (Path.LINETO,[x+dx,y+w]), + (Path.LINETO,[x+dx+h,y-loss/2]), # Tip + (Path.LINETO,[x+dx,y-loss-w]), + (Path.LINETO,[x+dx,y-loss])]) + tips.append(path[-3][1]) + else: # Intermediate loss (vertical) + path.extend([(Path.LINETO,[x+dx/2,y]), + (Path.CURVE3,[x+dx,y]), + (Path.CURVE3,[x+dx,y+dy]), + (Path.LINETO,[x+dx-w,y+dy]), + (Path.LINETO,[x+dx+loss/2,y+dy+h]), # Tip + (Path.LINETO,[x+dx+loss+w,y+dy]), + (Path.LINETO,[x+dx+loss,y+dy]), + (Path.CURVE3,[x+dx+loss,y-loss]), + (Path.CURVE3,[x+dx/2+loss,y-loss])]) + tips.append(path[-5][1]) + + tips = [] # Arrow tip positions + path = [(Path.MOVETO,[0,100])] # 1st point + for i,loss in enumerate(losses): + add_loss(loss, last=(i==(len(losses)-1))) + path.extend([(Path.LINETO,[0,0]), + (Path.LINETO,[dip,50]), # Dip + (Path.CLOSEPOLY,[0,100])]) + codes,verts = zip(*path) + verts = np.array(verts) + + # Path patch + path = Path(verts,codes) + patch = mpatches.PathPatch(path, **kwargs) + ax.add_patch(patch) + + # Labels + if labels=='': # No labels + pass + elif labels is None: # Default labels + labels = [ '%2d%%' % loss for loss in losses ] + else: + assert len(labels)==len(losses) + + texts = [] + for i,label in enumerate(labels): + x,y = tips[i] # Label position + last = (i==(len(losses)-1)) + if last: + t = ax.text(x+offset,y,label, ha='left', va='center') + else: + t = ax.text(x,y+offset,label, ha='center', va='bottom') + texts.append(t) + + # Axes management + ax.set_xlim(verts[:,0].min()-10, verts[:,0].max()+40) + ax.set_ylim(verts[:,1].min()-10, verts[:,1].max()+20) + ax.set_aspect('equal', adjustable='datalim') + ax.set_xticks([]) + ax.set_yticks([]) + + return patch,texts + +if __name__=='__main__': + + losses = [10.,20.,5.,15.,10.,40.] + labels = ['First','Second','Third','Fourth','Fifth','Hurray!'] + labels = [ s+'\n%d%%' % l for l,s in zip(losses,labels) ] + + fig = plt.figure() + ax = fig.add_subplot(1,1,1) + + patch,texts = sankey(ax, losses, labels, fc='g', alpha=0.2) + texts[1].set_color('r') + texts[-1].set_fontweight('bold') + + plt.show() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2010-02-09 13:04:51
|
Revision: 8122 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8122&view=rev Author: mdboom Date: 2010-02-09 13:04:44 +0000 (Tue, 09 Feb 2010) Log Message: ----------- Use a custom encoding containing all of the used glyphs when writing out a Postscript Type 3 font. This resolves a bug when converting Ps output containing non-standard characters (such as the minus sign) to Pdf using ps2pdf/gs 8.7 or later. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/backends/backend_ps.py trunk/matplotlib/ttconv/pprdrv_tt.cpp Modified: trunk/matplotlib/lib/matplotlib/backends/backend_ps.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_ps.py 2010-02-08 17:50:27 UTC (rev 8121) +++ trunk/matplotlib/lib/matplotlib/backends/backend_ps.py 2010-02-09 13:04:44 UTC (rev 8122) @@ -396,7 +396,7 @@ imagecmd = "false 3 colorimage" return h, w, bits, imagecmd - + def draw_image(self, gc, x, y, im, dx=None, dy=None, transform=None): """ Draw the Image instance into the current axes; x is the @@ -1110,6 +1110,14 @@ for c in chars: gind = cmap.get(c) or 0 glyph_ids.append(gind) + + fonttype = rcParams['ps.fonttype'] + + # Can not use more than 255 characters from a + # single font for Type 3 + if len(glyph_ids) > 255: + fonttype = 42 + # The ttf to ps (subsetting) support doesn't work for # OpenType fonts that are Postscript inside (like the # STIX fonts). This will simply turn that off to avoid @@ -1118,7 +1126,7 @@ raise RuntimeError("OpenType CFF fonts can not be saved using the internal Postscript backend at this time.\nConsider using the Cairo backend.") else: fonttype = rcParams['ps.fonttype'] - convert_ttf_to_ps(font_filename, fh, rcParams['ps.fonttype'], glyph_ids) + convert_ttf_to_ps(font_filename, fh, fonttype, glyph_ids) print >>fh, "end" print >>fh, "%%EndProlog" @@ -1394,7 +1402,7 @@ """ paper_option = "-sPAPERSIZE=%s" % ptype - + psfile = tmpfile + '.ps' outfile = tmpfile + '.output' dpi = rcParams['ps.distiller.res'] @@ -1436,7 +1444,7 @@ if eps: paper_option = "-dEPSCrop" else: paper_option = "-sPAPERSIZE=%s" % ptype - + command = 'ps2pdf -dAutoFilterColorImages=false \ -sColorImageFilter=FlateEncode %s "%s" "%s" > "%s"'% \ (paper_option, tmpfile, pdffile, outfile) Modified: trunk/matplotlib/ttconv/pprdrv_tt.cpp =================================================================== --- trunk/matplotlib/ttconv/pprdrv_tt.cpp 2010-02-08 17:50:27 UTC (rev 8121) +++ trunk/matplotlib/ttconv/pprdrv_tt.cpp 2010-02-09 13:04:44 UTC (rev 8122) @@ -58,10 +58,10 @@ ULONG val=0; for(x=0; x<4; x++) - { - val *= 0x100; - val += p[x]; - } + { + val *= 0x100; + val += p[x]; + } return val; } /* end of ftohULONG() */ @@ -75,10 +75,10 @@ USHORT val=0; for(x=0; x<2; x++) - { - val *= 0x100; - val += p[x]; - } + { + val *= 0x100; + val += p[x]; + } return val; } /* end of getUSHORT() */ @@ -120,38 +120,38 @@ ptr = font->offset_table + 12; x=0; while(TRUE) - { - if( strncmp((const char*)ptr,name,4) == 0 ) - { - ULONG offset,length; - BYTE *table; + { + if( strncmp((const char*)ptr,name,4) == 0 ) + { + ULONG offset,length; + BYTE *table; - offset = getULONG( ptr + 8 ); - length = getULONG( ptr + 12 ); - table = (BYTE*)calloc( sizeof(BYTE), length ); + offset = getULONG( ptr + 8 ); + length = getULONG( ptr + 12 ); + table = (BYTE*)calloc( sizeof(BYTE), length ); - try { + try { #ifdef DEBUG_TRUETYPE - debug("Loading table \"%s\" from offset %d, %d bytes",name,offset,length); + debug("Loading table \"%s\" from offset %d, %d bytes",name,offset,length); #endif - if( fseek( font->file, (long)offset, SEEK_SET ) ) - throw TTException("TrueType font may be corrupt (reason 3)"); + if( fseek( font->file, (long)offset, SEEK_SET ) ) + throw TTException("TrueType font may be corrupt (reason 3)"); - if( fread(table,sizeof(BYTE),length,font->file) != (sizeof(BYTE) * length)) - throw TTException("TrueType font may be corrupt (reason 4)"); - } catch (TTException& ) { - free(table); - throw; - } - return table; - } + if( fread(table,sizeof(BYTE),length,font->file) != (sizeof(BYTE) * length)) + throw TTException("TrueType font may be corrupt (reason 4)"); + } catch (TTException& ) { + free(table); + throw; + } + return table; + } - x++; - ptr += 16; - if(x == font->numTables) - throw TTException("TrueType font is missing table"); - } + x++; + ptr += 16; + if(x == font->numTables) + throw TTException("TrueType font is missing table"); + } } /* end of GetTable() */ @@ -165,12 +165,12 @@ void Read_name(struct TTFONT *font) { BYTE *table_ptr,*ptr2; - int numrecords; /* Number of strings in this table */ - BYTE *strings; /* pointer to start of string storage */ + int numrecords; /* Number of strings in this table */ + BYTE *strings; /* pointer to start of string storage */ int x; - int platform,encoding; /* Current platform id, encoding id, */ - int language,nameid; /* language id, name id, */ - int offset,length; /* offset and length of string. */ + int platform,encoding; /* Current platform id, encoding id, */ + int language,nameid; /* language id, name id, */ + int offset,length; /* offset and length of string. */ #ifdef DEBUG_TRUETYPE debug("Read_name()"); @@ -192,136 +192,136 @@ } font->Copyright = font->Trademark = (char*)NULL; - table_ptr = GetTable(font, "name"); /* pointer to table */ + table_ptr = GetTable(font, "name"); /* pointer to table */ try { - numrecords = getUSHORT( table_ptr + 2 ); /* number of names */ - strings = table_ptr + getUSHORT( table_ptr + 4 ); /* start of string storage */ + numrecords = getUSHORT( table_ptr + 2 ); /* number of names */ + strings = table_ptr + getUSHORT( table_ptr + 4 ); /* start of string storage */ ptr2 = table_ptr + 6; for(x=0; x < numrecords; x++,ptr2+=12) - { - platform = getUSHORT(ptr2); - encoding = getUSHORT(ptr2+2); - language = getUSHORT(ptr2+4); - nameid = getUSHORT(ptr2+6); - length = getUSHORT(ptr2+8); - offset = getUSHORT(ptr2+10); + { + platform = getUSHORT(ptr2); + encoding = getUSHORT(ptr2+2); + language = getUSHORT(ptr2+4); + nameid = getUSHORT(ptr2+6); + length = getUSHORT(ptr2+8); + offset = getUSHORT(ptr2+10); #ifdef DEBUG_TRUETYPE - debug("platform %d, encoding %d, language 0x%x, name %d, offset %d, length %d", - platform,encoding,language,nameid,offset,length); + debug("platform %d, encoding %d, language 0x%x, name %d, offset %d, length %d", + platform,encoding,language,nameid,offset,length); #endif - /* Copyright notice */ - if( platform == 1 && nameid == 0 ) - { - font->Copyright = (char*)calloc(sizeof(char),length+1); - strncpy(font->Copyright,(const char*)strings+offset,length); - font->Copyright[length]=(char)NULL; - replace_newlines_with_spaces(font->Copyright); + /* Copyright notice */ + if( platform == 1 && nameid == 0 ) + { + font->Copyright = (char*)calloc(sizeof(char),length+1); + strncpy(font->Copyright,(const char*)strings+offset,length); + font->Copyright[length]=(char)NULL; + replace_newlines_with_spaces(font->Copyright); #ifdef DEBUG_TRUETYPE - debug("font->Copyright=\"%s\"",font->Copyright); + debug("font->Copyright=\"%s\"",font->Copyright); #endif - continue; - } + continue; + } - /* Font Family name */ - if( platform == 1 && nameid == 1 ) - { - free(font->FamilyName); - font->FamilyName = (char*)calloc(sizeof(char),length+1); - strncpy(font->FamilyName,(const char*)strings+offset,length); - font->FamilyName[length]=(char)NULL; - replace_newlines_with_spaces(font->FamilyName); + /* Font Family name */ + if( platform == 1 && nameid == 1 ) + { + free(font->FamilyName); + font->FamilyName = (char*)calloc(sizeof(char),length+1); + strncpy(font->FamilyName,(const char*)strings+offset,length); + font->FamilyName[length]=(char)NULL; + replace_newlines_with_spaces(font->FamilyName); #ifdef DEBUG_TRUETYPE - debug("font->FamilyName=\"%s\"",font->FamilyName); + debug("font->FamilyName=\"%s\"",font->FamilyName); #endif - continue; - } + continue; + } - /* Font Family name */ - if( platform == 1 && nameid == 2 ) - { - free(font->Style); - font->Style = (char*)calloc(sizeof(char),length+1); - strncpy(font->Style,(const char*)strings+offset,length); - font->Style[length]=(char)NULL; - replace_newlines_with_spaces(font->Style); + /* Font Family name */ + if( platform == 1 && nameid == 2 ) + { + free(font->Style); + font->Style = (char*)calloc(sizeof(char),length+1); + strncpy(font->Style,(const char*)strings+offset,length); + font->Style[length]=(char)NULL; + replace_newlines_with_spaces(font->Style); #ifdef DEBUG_TRUETYPE - debug("font->Style=\"%s\"",font->Style); + debug("font->Style=\"%s\"",font->Style); #endif - continue; - } + continue; + } - /* Full Font name */ - if( platform == 1 && nameid == 4 ) - { - free(font->FullName); - font->FullName = (char*)calloc(sizeof(char),length+1); - strncpy(font->FullName,(const char*)strings+offset,length); - font->FullName[length]=(char)NULL; - replace_newlines_with_spaces(font->FullName); + /* Full Font name */ + if( platform == 1 && nameid == 4 ) + { + free(font->FullName); + font->FullName = (char*)calloc(sizeof(char),length+1); + strncpy(font->FullName,(const char*)strings+offset,length); + font->FullName[length]=(char)NULL; + replace_newlines_with_spaces(font->FullName); #ifdef DEBUG_TRUETYPE - debug("font->FullName=\"%s\"",font->FullName); + debug("font->FullName=\"%s\"",font->FullName); #endif - continue; - } + continue; + } - /* Version string */ - if( platform == 1 && nameid == 5 ) - { - free(font->Version); - font->Version = (char*)calloc(sizeof(char),length+1); - strncpy(font->Version,(const char*)strings+offset,length); - font->Version[length]=(char)NULL; - replace_newlines_with_spaces(font->Version); + /* Version string */ + if( platform == 1 && nameid == 5 ) + { + free(font->Version); + font->Version = (char*)calloc(sizeof(char),length+1); + strncpy(font->Version,(const char*)strings+offset,length); + font->Version[length]=(char)NULL; + replace_newlines_with_spaces(font->Version); #ifdef DEBUG_TRUETYPE - debug("font->Version=\"%s\"",font->Version); + debug("font->Version=\"%s\"",font->Version); #endif - continue; - } + continue; + } - /* PostScript name */ - if( platform == 1 && nameid == 6 ) - { - free(font->PostName); - font->PostName = (char*)calloc(sizeof(char),length+1); - strncpy(font->PostName,(const char*)strings+offset,length); - font->PostName[length]=(char)NULL; - replace_newlines_with_spaces(font->PostName); + /* PostScript name */ + if( platform == 1 && nameid == 6 ) + { + free(font->PostName); + font->PostName = (char*)calloc(sizeof(char),length+1); + strncpy(font->PostName,(const char*)strings+offset,length); + font->PostName[length]=(char)NULL; + replace_newlines_with_spaces(font->PostName); #ifdef DEBUG_TRUETYPE - debug("font->PostName=\"%s\"",font->PostName); + debug("font->PostName=\"%s\"",font->PostName); #endif - continue; - } + continue; + } - /* Trademark string */ - if( platform == 1 && nameid == 7 ) - { - font->Trademark = (char*)calloc(sizeof(char),length+1); - strncpy(font->Trademark,(const char*)strings+offset,length); - font->Trademark[length]=(char)NULL; - replace_newlines_with_spaces(font->Trademark); + /* Trademark string */ + if( platform == 1 && nameid == 7 ) + { + font->Trademark = (char*)calloc(sizeof(char),length+1); + strncpy(font->Trademark,(const char*)strings+offset,length); + font->Trademark[length]=(char)NULL; + replace_newlines_with_spaces(font->Trademark); #ifdef DEBUG_TRUETYPE - debug("font->Trademark=\"%s\"",font->Trademark); + debug("font->Trademark=\"%s\"",font->Trademark); #endif - continue; - } + continue; + } - } + } } catch (TTException& ) { free(table_ptr); throw; @@ -346,17 +346,17 @@ ** font manufacturer's revision number for the font. */ if( font->target_type == PS_TYPE_42 ) - { - stream.printf("%%!PS-TrueTypeFont-%d.%d-%d.%d\n", - font->TTVersion.whole, font->TTVersion.fraction, - font->MfrRevision.whole, font->MfrRevision.fraction); - } + { + stream.printf("%%!PS-TrueTypeFont-%d.%d-%d.%d\n", + font->TTVersion.whole, font->TTVersion.fraction, + font->MfrRevision.whole, font->MfrRevision.fraction); + } /* If it is not a Type 42 font, we will use a different format. */ else - { - stream.putline("%!PS-Adobe-3.0 Resource-Font"); - } /* See RBIIp 641 */ + { + stream.putline("%!PS-Adobe-3.0 Resource-Font"); + } /* See RBIIp 641 */ /* We will make the title the name of the font. */ stream.printf("%%%%Title: %s\n",font->FullName); @@ -367,46 +367,46 @@ /* We created this file. */ if( font->target_type == PS_TYPE_42 ) - stream.putline("%%Creator: Converted from TrueType to type 42 by PPR"); + stream.putline("%%Creator: Converted from TrueType to type 42 by PPR"); else - stream.putline("%%Creator: Converted from TrueType by PPR"); + stream.putline("%%Creator: Converted from TrueType by PPR"); /* If VM usage information is available, print it. */ if( font->target_type == PS_TYPE_42 ) - { - VMMin = (int)getULONG( font->post_table + 16 ); - VMMax = (int)getULONG( font->post_table + 20 ); - if( VMMin > 0 && VMMax > 0 ) - stream.printf("%%%%VMUsage: %d %d\n",VMMin,VMMax); - } + { + VMMin = (int)getULONG( font->post_table + 16 ); + VMMax = (int)getULONG( font->post_table + 20 ); + if( VMMin > 0 && VMMax > 0 ) + stream.printf("%%%%VMUsage: %d %d\n",VMMin,VMMax); + } /* Start the dictionary which will eventually */ /* become the font. */ if( font->target_type != PS_TYPE_3 ) - { - stream.putline("15 dict begin"); - } + { + stream.putline("15 dict begin"); + } else - { - stream.putline("25 dict begin"); + { + stream.putline("25 dict begin"); - /* Type 3 fonts will need some subroutines here. */ - stream.putline("/_d{bind def}bind def"); - stream.putline("/_m{moveto}_d"); - stream.putline("/_l{lineto}_d"); - stream.putline("/_cl{closepath eofill}_d"); - stream.putline("/_c{curveto}_d"); - stream.putline("/_sc{7 -1 roll{setcachedevice}{pop pop pop pop pop pop}ifelse}_d"); - stream.putline("/_e{exec}_d"); - } + /* Type 3 fonts will need some subroutines here. */ + stream.putline("/_d{bind def}bind def"); + stream.putline("/_m{moveto}_d"); + stream.putline("/_l{lineto}_d"); + stream.putline("/_cl{closepath eofill}_d"); + stream.putline("/_c{curveto}_d"); + stream.putline("/_sc{7 -1 roll{setcachedevice}{pop pop pop pop pop pop}ifelse}_d"); + stream.putline("/_e{exec}_d"); + } stream.printf("/FontName /%s def\n",font->PostName); stream.putline("/PaintType 0 def"); if(font->target_type == PS_TYPE_42) - stream.putline("/FontMatrix[1 0 0 1 0 0]def"); + stream.putline("/FontMatrix[1 0 0 1 0 0]def"); else - stream.putline("/FontMatrix[.001 0 0 .001 0 0]def"); + stream.putline("/FontMatrix[.001 0 0 .001 0 0]def"); stream.printf("/FontBBox[%d %d %d %d]def\n",font->llx,font->lly,font->urx,font->ury); stream.printf("/FontType %d def\n", font->target_type ); @@ -414,11 +414,25 @@ /*------------------------------------------------------------- ** Define the encoding array for this font. -** It seems best to just use "Standard". +** Since we don't really want to deal with converting all of +** the possible font encodings in the wild to a standard PS +** one, we just explicitly create one for each font. -------------------------------------------------------------*/ -void ttfont_encoding(TTStreamWriter& stream) +void ttfont_encoding(TTStreamWriter& stream, struct TTFONT *font, std::vector<int>& glyph_ids, font_type_enum target_type) { - stream.putline("/Encoding StandardEncoding def"); + if (target_type == PS_TYPE_3) { + stream.printf("/Encoding [ "); + + for (std::vector<int>::const_iterator i = glyph_ids.begin(); + i != glyph_ids.end(); ++i) { + const char* name = ttfont_CharStrings_getname(font, *i); + stream.printf("/%s ", name); + } + + stream.printf("] def\n"); + } else { + stream.putline("/Encoding StandardEncoding def"); + } } /* end of ttfont_encoding() */ /*----------------------------------------------------------- @@ -439,13 +453,13 @@ stream.printf("/FullName (%s) def\n",font->FullName); if( font->Copyright != (char*)NULL || font->Trademark != (char*)NULL ) - { - stream.printf("/Notice (%s", - font->Copyright != (char*)NULL ? font->Copyright : ""); - stream.printf("%s%s) def\n", - font->Trademark != (char*)NULL ? " " : "", - font->Trademark != (char*)NULL ? font->Trademark : ""); - } + { + stream.printf("/Notice (%s", + font->Copyright != (char*)NULL ? font->Copyright : ""); + stream.printf("%s%s) def\n", + font->Trademark != (char*)NULL ? " " : "", + font->Trademark != (char*)NULL ? font->Trademark : ""); + } /* This information is not quite correct. */ stream.printf("/Weight (%s) def\n",font->Style); @@ -494,12 +508,12 @@ static const char hexdigits[]="0123456789ABCDEF"; if(!in_string) - { - stream.put_char('<'); - string_len=0; - line_len++; - in_string=TRUE; - } + { + stream.put_char('<'); + string_len=0; + line_len++; + in_string=TRUE; + } stream.put_char( hexdigits[ n / 16 ] ); stream.put_char( hexdigits[ n % 16 ] ); @@ -507,10 +521,10 @@ line_len+=2; if(line_len > 70) - { - stream.put_char('\n'); - line_len=0; - } + { + stream.put_char('\n'); + line_len=0; + } } /* end of sfnts_pputBYTE() */ @@ -553,17 +567,17 @@ void sfnts_end_string(TTStreamWriter& stream) { if(in_string) - { - string_len=0; /* fool sfnts_pputBYTE() */ + { + string_len=0; /* fool sfnts_pputBYTE() */ - #ifdef DEBUG_TRUETYPE_INLINE - puts("\n% dummy byte:\n"); - #endif + #ifdef DEBUG_TRUETYPE_INLINE + puts("\n% dummy byte:\n"); + #endif - sfnts_pputBYTE(stream, 0); /* extra byte for pre-2013 compatibility */ - stream.put_char('>'); - line_len++; - } + sfnts_pputBYTE(stream, 0); /* extra byte for pre-2013 compatibility */ + stream.put_char('>'); + line_len++; + } in_string=FALSE; } /* end of sfnts_end_string() */ @@ -589,7 +603,7 @@ ULONG off; ULONG length; int c; - ULONG total=0; /* running total of bytes written to table */ + ULONG total=0; /* running total of bytes written to table */ int x; #ifdef DEBUG_TRUETYPE @@ -604,58 +618,58 @@ /* Copy the glyphs one by one */ for(x=0; x < font->numGlyphs; x++) - { - /* Read the glyph offset from the index-to-location table. */ - if(font->indexToLocFormat == 0) - { - off = getUSHORT( font->loca_table + (x * 2) ); - off *= 2; - length = getUSHORT( font->loca_table + ((x+1) * 2) ); - length *= 2; - length -= off; - } - else - { - off = getULONG( font->loca_table + (x * 4) ); - length = getULONG( font->loca_table + ((x+1) * 4) ); - length -= off; - } + { + /* Read the glyph offset from the index-to-location table. */ + if(font->indexToLocFormat == 0) + { + off = getUSHORT( font->loca_table + (x * 2) ); + off *= 2; + length = getUSHORT( font->loca_table + ((x+1) * 2) ); + length *= 2; + length -= off; + } + else + { + off = getULONG( font->loca_table + (x * 4) ); + length = getULONG( font->loca_table + ((x+1) * 4) ); + length -= off; + } - #ifdef DEBUG_TRUETYPE - debug("glyph length=%d",(int)length); - #endif + #ifdef DEBUG_TRUETYPE + debug("glyph length=%d",(int)length); + #endif - /* Start new string if necessary. */ - sfnts_new_table( stream, (int)length ); + /* Start new string if necessary. */ + sfnts_new_table( stream, (int)length ); - /* - ** Make sure the glyph is padded out to a - ** two byte boundary. - */ - if( length % 2 ) - throw TTException("TrueType font contains a 'glyf' table without 2 byte padding"); + /* + ** Make sure the glyph is padded out to a + ** two byte boundary. + */ + if( length % 2 ) + throw TTException("TrueType font contains a 'glyf' table without 2 byte padding"); - /* Copy the bytes of the glyph. */ - while( length-- ) - { - if( (c = fgetc(font->file)) == EOF ) - throw TTException("TrueType font may be corrupt (reason 6)"); + /* Copy the bytes of the glyph. */ + while( length-- ) + { + if( (c = fgetc(font->file)) == EOF ) + throw TTException("TrueType font may be corrupt (reason 6)"); - sfnts_pputBYTE(stream, c); - total++; /* add to running total */ - } + sfnts_pputBYTE(stream, c); + total++; /* add to running total */ + } - } + } free(font->loca_table); font->loca_table = NULL; /* Pad out to full length from table directory */ while( total < correct_total_length ) - { - sfnts_pputBYTE(stream, 0); - total++; - } + { + sfnts_pputBYTE(stream, 0); + total++; + } } /* end of sfnts_glyf_table() */ @@ -667,32 +681,32 @@ */ void ttfont_sfnts(TTStreamWriter& stream, struct TTFONT *font) { - static const char *table_names[] = /* The names of all tables */ - { /* which it is worth while */ - "cvt ", /* to include in a Type 42 */ - "fpgm", /* PostScript font. */ - "glyf", - "head", - "hhea", - "hmtx", - "loca", - "maxp", - "prep" - } ; + static const char *table_names[] = /* The names of all tables */ + { /* which it is worth while */ + "cvt ", /* to include in a Type 42 */ + "fpgm", /* PostScript font. */ + "glyf", + "head", + "hhea", + "hmtx", + "loca", + "maxp", + "prep" + } ; - struct { /* The location of each of */ - ULONG oldoffset; /* the above tables. */ - ULONG newoffset; - ULONG length; - ULONG checksum; - } tables[9]; + struct { /* The location of each of */ + ULONG oldoffset; /* the above tables. */ + ULONG newoffset; + ULONG length; + ULONG checksum; + } tables[9]; - BYTE *ptr; /* A pointer into the origional table directory. */ - ULONG x,y; /* General use loop countes. */ - int c; /* Input character. */ + BYTE *ptr; /* A pointer into the origional table directory. */ + ULONG x,y; /* General use loop countes. */ + int c; /* Input character. */ int diff; ULONG nextoffset; - int count; /* How many `important' tables did we find? */ + int count; /* How many `important' tables did we find? */ ptr = font->offset_table + 12; nextoffset=0; @@ -703,32 +717,32 @@ ** statistics in tables[]. */ for(x=0; x < 9; x++ ) - { - do { - diff = strncmp( (char*)ptr, table_names[x], 4 ); + { + do { + diff = strncmp( (char*)ptr, table_names[x], 4 ); - if( diff > 0 ) /* If we are past it. */ - { - tables[x].length = 0; - diff = 0; - } - else if( diff < 0 ) /* If we haven't hit it yet. */ - { - ptr += 16; - } - else if( diff == 0 ) /* Here it is! */ - { - tables[x].newoffset = nextoffset; - tables[x].checksum = getULONG( ptr + 4 ); - tables[x].oldoffset = getULONG( ptr + 8 ); - tables[x].length = getULONG( ptr + 12 ); - nextoffset += ( ((tables[x].length + 3) / 4) * 4 ); - count++; - ptr += 16; - } - } while(diff != 0); + if( diff > 0 ) /* If we are past it. */ + { + tables[x].length = 0; + diff = 0; + } + else if( diff < 0 ) /* If we haven't hit it yet. */ + { + ptr += 16; + } + else if( diff == 0 ) /* Here it is! */ + { + tables[x].newoffset = nextoffset; + tables[x].checksum = getULONG( ptr + 4 ); + tables[x].oldoffset = getULONG( ptr + 8 ); + tables[x].length = getULONG( ptr + 12 ); + nextoffset += ( ((tables[x].length + 3) / 4) * 4 ); + count++; + ptr += 16; + } + } while(diff != 0); - } /* end of for loop which passes over the table directory */ + } /* end of for loop which passes over the table directory */ /* Begin the sfnts array. */ sfnts_start(stream); @@ -737,95 +751,95 @@ /* Start by copying the TrueType version number. */ ptr = font->offset_table; for(x=0; x < 4; x++) - { - sfnts_pputBYTE( stream, *(ptr++) ); - } + { + sfnts_pputBYTE( stream, *(ptr++) ); + } /* Now, generate those silly numTables numbers. */ - sfnts_pputUSHORT(stream, count); /* number of tables */ + sfnts_pputUSHORT(stream, count); /* number of tables */ if( count == 9 ) - { - sfnts_pputUSHORT(stream, 7); /* searchRange */ - sfnts_pputUSHORT(stream, 3); /* entrySelector */ - sfnts_pputUSHORT(stream, 81); /* rangeShift */ - } + { + sfnts_pputUSHORT(stream, 7); /* searchRange */ + sfnts_pputUSHORT(stream, 3); /* entrySelector */ + sfnts_pputUSHORT(stream, 81); /* rangeShift */ + } #ifdef DEBUG_TRUETYPE else - { - debug("only %d tables selected",count); - } + { + debug("only %d tables selected",count); + } #endif /* Now, emmit the table directory. */ for(x=0; x < 9; x++) - { - if( tables[x].length == 0 ) /* Skip missing tables */ - continue; + { + if( tables[x].length == 0 ) /* Skip missing tables */ + continue; - /* Name */ - sfnts_pputBYTE( stream, table_names[x][0] ); - sfnts_pputBYTE( stream, table_names[x][1] ); - sfnts_pputBYTE( stream, table_names[x][2] ); - sfnts_pputBYTE( stream, table_names[x][3] ); + /* Name */ + sfnts_pputBYTE( stream, table_names[x][0] ); + sfnts_pputBYTE( stream, table_names[x][1] ); + sfnts_pputBYTE( stream, table_names[x][2] ); + sfnts_pputBYTE( stream, table_names[x][3] ); - /* Checksum */ - sfnts_pputULONG( stream, tables[x].checksum ); + /* Checksum */ + sfnts_pputULONG( stream, tables[x].checksum ); - /* Offset */ - sfnts_pputULONG( stream, tables[x].newoffset + 12 + (count * 16) ); + /* Offset */ + sfnts_pputULONG( stream, tables[x].newoffset + 12 + (count * 16) ); - /* Length */ - sfnts_pputULONG( stream, tables[x].length ); - } + /* Length */ + sfnts_pputULONG( stream, tables[x].length ); + } /* Now, send the tables */ for(x=0; x < 9; x++) - { - if( tables[x].length == 0 ) /* skip tables that aren't there */ - continue; + { + if( tables[x].length == 0 ) /* skip tables that aren't there */ + continue; - #ifdef DEBUG_TRUETYPE - debug("emmiting table '%s'",table_names[x]); - #endif + #ifdef DEBUG_TRUETYPE + debug("emmiting table '%s'",table_names[x]); + #endif - /* 'glyf' table gets special treatment */ - if( strcmp(table_names[x],"glyf")==0 ) - { - sfnts_glyf_table(stream,font,tables[x].oldoffset,tables[x].length); - } - else /* Other tables may not exceed */ - { /* 65535 bytes in length. */ - if( tables[x].length > 65535 ) - throw TTException("TrueType font has a table which is too long"); + /* 'glyf' table gets special treatment */ + if( strcmp(table_names[x],"glyf")==0 ) + { + sfnts_glyf_table(stream,font,tables[x].oldoffset,tables[x].length); + } + else /* Other tables may not exceed */ + { /* 65535 bytes in length. */ + if( tables[x].length > 65535 ) + throw TTException("TrueType font has a table which is too long"); - /* Start new string if necessary. */ - sfnts_new_table(stream, tables[x].length); + /* Start new string if necessary. */ + sfnts_new_table(stream, tables[x].length); - /* Seek to proper position in the file. */ - fseek( font->file, tables[x].oldoffset, SEEK_SET ); + /* Seek to proper position in the file. */ + fseek( font->file, tables[x].oldoffset, SEEK_SET ); - /* Copy the bytes of the table. */ - for( y=0; y < tables[x].length; y++ ) - { - if( (c = fgetc(font->file)) == EOF ) - throw TTException("TrueType font may be corrupt (reason 7)"); + /* Copy the bytes of the table. */ + for( y=0; y < tables[x].length; y++ ) + { + if( (c = fgetc(font->file)) == EOF ) + throw TTException("TrueType font may be corrupt (reason 7)"); - sfnts_pputBYTE(stream, c); - } - } + sfnts_pputBYTE(stream, c); + } + } - /* Padd it out to a four byte boundary. */ - y=tables[x].length; - while( (y % 4) != 0 ) - { - sfnts_pputBYTE(stream, 0); - y++; - #ifdef DEBUG_TRUETYPE_INLINE - puts("\n% pad byte:\n"); - #endif - } + /* Padd it out to a four byte boundary. */ + y=tables[x].length; + while( (y % 4) != 0 ) + { + sfnts_pputBYTE(stream, 0); + y++; + #ifdef DEBUG_TRUETYPE_INLINE + puts("\n% pad byte:\n"); + #endif + } - } /* End of loop for all tables */ + } /* End of loop for all tables */ /* Close the array. */ sfnts_end_string(stream); @@ -893,32 +907,32 @@ GlyphIndex = (int)getUSHORT( font->post_table + 34 + (charindex * 2) ); - if( GlyphIndex <= 257 ) /* If a standard Apple name, */ - { - return Apple_CharStrings[GlyphIndex]; - } - else /* Otherwise, use one */ - { /* of the pascal strings. */ - GlyphIndex -= 258; + if( GlyphIndex <= 257 ) /* If a standard Apple name, */ + { + return Apple_CharStrings[GlyphIndex]; + } + else /* Otherwise, use one */ + { /* of the pascal strings. */ + GlyphIndex -= 258; - /* Set pointer to start of Pascal strings. */ - ptr = (char*)(font->post_table + 34 + (font->numGlyphs * 2)); + /* Set pointer to start of Pascal strings. */ + ptr = (char*)(font->post_table + 34 + (font->numGlyphs * 2)); - len = (ULONG)*(ptr++); /* Step thru the strings */ - while(GlyphIndex--) /* until we get to the one */ - { /* that we want. */ - ptr += len; - len = (ULONG)*(ptr++); - } + len = (ULONG)*(ptr++); /* Step thru the strings */ + while(GlyphIndex--) /* until we get to the one */ + { /* that we want. */ + ptr += len; + len = (ULONG)*(ptr++); + } - if( len >= sizeof(temp) ) - throw TTException("TrueType font file contains a very long PostScript name"); + if( len >= sizeof(temp) ) + throw TTException("TrueType font file contains a very long PostScript name"); - strncpy(temp,ptr,len); /* Copy the pascal string into */ - temp[len]=(char)NULL; /* a buffer and make it ASCIIz. */ + strncpy(temp,ptr,len); /* Copy the pascal string into */ + temp[len]=(char)NULL; /* a buffer and make it ASCIIz. */ - return temp; - } + return temp; + } } /* end of ttfont_CharStrings_getname() */ /* @@ -932,28 +946,28 @@ post_format = getFixed( font->post_table ); if( post_format.whole != 2 || post_format.fraction != 0 ) - throw TTException("TrueType fontdoes not have a format 2.0 'post' table"); + throw TTException("TrueType fontdoes not have a format 2.0 'post' table"); /* Emmit the start of the PostScript code to define the dictionary. */ stream.printf("/CharStrings %d dict dup begin\n", glyph_ids.size()); /* Emmit one key-value pair for each glyph. */ for(std::vector<int>::const_iterator i = glyph_ids.begin(); - i != glyph_ids.end(); ++i) - { - if(font->target_type == PS_TYPE_42) /* type 42 */ - { - stream.printf("/%s %d def\n",ttfont_CharStrings_getname(font, *i), *i); - } - else /* type 3 */ - { - stream.printf("/%s{",ttfont_CharStrings_getname(font, *i)); + i != glyph_ids.end(); ++i) + { + if(font->target_type == PS_TYPE_42) /* type 42 */ + { + stream.printf("/%s %d def\n",ttfont_CharStrings_getname(font, *i), *i); + } + else /* type 3 */ + { + stream.printf("/%s{",ttfont_CharStrings_getname(font, *i)); - tt_type3_charproc(stream, font, *i); + tt_type3_charproc(stream, font, *i); - stream.putline("}_d"); /* "} bind def" */ - } - } + stream.putline("}_d"); /* "} bind def" */ + } + } stream.putline("end readonly def"); } /* end of ttfont_CharStrings() */ @@ -967,27 +981,27 @@ /* If we are generating a type 3 font, we need to provide */ /* a BuildGlyph and BuildChar proceedures. */ if( font->target_type == PS_TYPE_3 ) - { - stream.put_char('\n'); + { + stream.put_char('\n'); - stream.putline("/BuildGlyph"); - stream.putline(" {exch begin"); /* start font dictionary */ - stream.putline(" CharStrings exch"); - stream.putline(" 2 copy known not{pop /.notdef}if"); - stream.putline(" true 3 1 roll get exec"); - stream.putline(" end}_d"); + stream.putline("/BuildGlyph"); + stream.putline(" {exch begin"); /* start font dictionary */ + stream.putline(" CharStrings exch"); + stream.putline(" 2 copy known not{pop /.notdef}if"); + stream.putline(" true 3 1 roll get exec"); + stream.putline(" end}_d"); - stream.put_char('\n'); + stream.put_char('\n'); - /* This proceedure is for compatiblity with */ - /* level 1 interpreters. */ - stream.putline("/BuildChar {"); - stream.putline(" 1 index /Encoding get exch get"); - stream.putline(" 1 index /BuildGlyph get exec"); - stream.putline("}_d"); + /* This proceedure is for compatiblity with */ + /* level 1 interpreters. */ + stream.putline("/BuildChar {"); + stream.putline(" 1 index /Encoding get exch get"); + stream.putline(" 1 index /BuildGlyph get exec"); + stream.putline("}_d"); - stream.put_char('\n'); - } + stream.put_char('\n'); + } /* If we are generating a type 42 font, we need to check to see */ /* if this PostScript interpreter understands type 42 fonts. If */ @@ -997,90 +1011,90 @@ /* generated by a Macintosh. That is where the TrueType interpreter */ /* setup instructions and part of BuildGlyph came from. */ else if( font->target_type == PS_TYPE_42 ) - { - stream.put_char('\n'); + { + stream.put_char('\n'); - /* If we have no "resourcestatus" command, or FontType 42 */ - /* is unknown, leave "true" on the stack. */ - stream.putline("systemdict/resourcestatus known"); - stream.putline(" {42 /FontType resourcestatus"); - stream.putline(" {pop pop false}{true}ifelse}"); - stream.putline(" {true}ifelse"); + /* If we have no "resourcestatus" command, or FontType 42 */ + /* is unknown, leave "true" on the stack. */ + stream.putline("systemdict/resourcestatus known"); + stream.putline(" {42 /FontType resourcestatus"); + stream.putline(" {pop pop false}{true}ifelse}"); + stream.putline(" {true}ifelse"); - /* If true, execute code to produce an error message if */ - /* we can't find Apple's TrueDict in VM. */ - stream.putline("{/TrueDict where{pop}{(%%[ Error: no TrueType rasterizer ]%%)= flush}ifelse"); + /* If true, execute code to produce an error message if */ + /* we can't find Apple's TrueDict in VM. */ + stream.putline("{/TrueDict where{pop}{(%%[ Error: no TrueType rasterizer ]%%)= flush}ifelse"); - /* Since we are expected to use Apple's TrueDict TrueType */ - /* reasterizer, change the font type to 3. */ - stream.putline("/FontType 3 def"); + /* Since we are expected to use Apple's TrueDict TrueType */ + /* reasterizer, change the font type to 3. */ + stream.putline("/FontType 3 def"); - /* Define a string to hold the state of the Apple */ - /* TrueType interpreter. */ - stream.putline(" /TrueState 271 string def"); + /* Define a string to hold the state of the Apple */ + /* TrueType interpreter. */ + stream.putline(" /TrueState 271 string def"); - /* It looks like we get information about the resolution */ - /* of the printer and store it in the TrueState string. */ - stream.putline(" TrueDict begin sfnts save"); - stream.putline(" 72 0 matrix defaultmatrix dtransform dup"); - stream.putline(" mul exch dup mul add sqrt cvi 0 72 matrix"); - stream.putline(" defaultmatrix dtransform dup mul exch dup"); - stream.putline(" mul add sqrt cvi 3 -1 roll restore"); - stream.putline(" TrueState initer end"); + /* It looks like we get information about the resolution */ + /* of the printer and store it in the TrueState string. */ + stream.putline(" TrueDict begin sfnts save"); + stream.putline(" 72 0 matrix defaultmatrix dtransform dup"); + stream.putline(" mul exch dup mul add sqrt cvi 0 72 matrix"); + stream.putline(" defaultmatrix dtransform dup mul exch dup"); + stream.putline(" mul add sqrt cvi 3 -1 roll restore"); + stream.putline(" TrueState initer end"); - /* This BuildGlyph procedure will look the name up in the */ - /* CharStrings array, and then check to see if what it gets */ - /* is a procedure. If it is, it executes it, otherwise, it */ - /* lets the TrueType rasterizer loose on it. */ + /* This BuildGlyph procedure will look the name up in the */ + /* CharStrings array, and then check to see if what it gets */ + /* is a procedure. If it is, it executes it, otherwise, it */ + /* lets the TrueType rasterizer loose on it. */ - /* When this proceedure is executed the stack contains */ - /* the font dictionary and the character name. We */ - /* exchange arguments and move the dictionary to the */ - /* dictionary stack. */ - stream.putline(" /BuildGlyph{exch begin"); - /* stack: charname */ + /* When this proceedure is executed the stack contains */ + /* the font dictionary and the character name. We */ + /* exchange arguments and move the dictionary to the */ + /* dictionary stack. */ + stream.putline(" /BuildGlyph{exch begin"); + /* stack: charname */ - /* Put two copies of CharStrings on the stack and consume */ - /* one testing to see if the charname is defined in it, */ - /* leave the answer on the stack. */ - stream.putline(" CharStrings dup 2 index known"); - /* stack: charname CharStrings bool */ + /* Put two copies of CharStrings on the stack and consume */ + /* one testing to see if the charname is defined in it, */ + /* leave the answer on the stack. */ + stream.putline(" CharStrings dup 2 index known"); + /* stack: charname CharStrings bool */ - /* Exchange the CharStrings dictionary and the charname, */ - /* but if the answer was false, replace the character name */ - /* with ".notdef". */ - stream.putline(" {exch}{exch pop /.notdef}ifelse"); - /* stack: CharStrings charname */ + /* Exchange the CharStrings dictionary and the charname, */ + /* but if the answer was false, replace the character name */ + /* with ".notdef". */ + stream.putline(" {exch}{exch pop /.notdef}ifelse"); + /* stack: CharStrings charname */ - /* Get the value from the CharStrings dictionary and see */ - /* if it is executable. */ - stream.putline(" get dup xcheck"); - /* stack: CharStrings_entry */ + /* Get the value from the CharStrings dictionary and see */ + /* if it is executable. */ + stream.putline(" get dup xcheck"); + /* stack: CharStrings_entry */ - /* If is a proceedure. Execute according to RBIIp 277-278. */ - stream.putline(" {currentdict systemdict begin begin exec end end}"); + /* If is a proceedure. Execute according to RBIIp 277-278. */ + stream.putline(" {currentdict systemdict begin begin exec end end}"); - /* Is a TrueType character index, let the rasterizer at it. */ - stream.putline(" {TrueDict begin /bander load cvlit exch TrueState render end}"); + /* Is a TrueType character index, let the rasterizer at it. */ + stream.putline(" {TrueDict begin /bander load cvlit exch TrueState render end}"); - stream.putline(" ifelse"); + stream.putline(" ifelse"); - /* Pop the font's dictionary off the stack. */ - stream.putline(" end}bind def"); + /* Pop the font's dictionary off the stack. */ + stream.putline(" end}bind def"); - /* This is the level 1 compatibility BuildChar procedure. */ - /* See RBIIp 281. */ - stream.putline(" /BuildChar{"); - stream.putline(" 1 index /Encoding get exch get"); - stream.putline(" 1 index /BuildGlyph get exec"); - stream.putline(" }bind def"); + /* This is the level 1 compatibility BuildChar procedure. */ + /* See RBIIp 281. */ + stream.putline(" /BuildChar{"); + stream.putline(" 1 index /Encoding get exch get"); + stream.putline(" 1 index /BuildGlyph get exec"); + stream.putline(" }bind def"); - /* Here we close the condition which is true */ - /* if the printer has no built-in TrueType */ - /* rasterizer. */ - stream.putline("}if"); - stream.put_char('\n'); - } /* end of if Type 42 not understood. */ + /* Here we close the condition which is true */ + /* if the printer has no built-in TrueType */ + /* rasterizer. */ + stream.putline("}if"); + stream.put_char('\n'); + } /* end of if Type 42 not understood. */ stream.putline("FontName currentdict end definefont pop"); /* stream.putline("%%EOF"); */ @@ -1102,7 +1116,7 @@ /* Open the font file */ if( (font.file = fopen(filename,"rb")) == (FILE*)NULL ) - throw TTException("Failed to open TrueType font"); + throw TTException("Failed to open TrueType font"); /* Allocate space for the unvarying part of the offset table. */ assert(font.offset_table == NULL); @@ -1110,7 +1124,7 @@ /* Read the first part of the offset table. */ if( fread( font.offset_table, sizeof(BYTE), 12, font.file ) != 12 ) - throw TTException("TrueType font may be corrupt (reason 1)"); + throw TTException("TrueType font may be corrupt (reason 1)"); /* Determine how many directory entries there are. */ font.numTables = getUSHORT( font.offset_table + 4 ); @@ -1123,7 +1137,7 @@ /* Read the rest of the table directory. */ if( fread( font.offset_table + 12, sizeof(BYTE), (font.numTables*16), font.file ) != (font.numTables*16) ) - throw TTException("TrueType font may be corrupt (reason 2)"); + throw TTException("TrueType font may be corrupt (reason 2)"); /* Extract information from the "Offset" table. */ font.TTVersion = getFixed( font.offset_table ); @@ -1131,21 +1145,21 @@ /* Load the "head" table and extract information from it. */ ptr = GetTable(&font, "head"); try { - font.MfrRevision = getFixed( ptr + 4 ); /* font revision number */ + font.MfrRevision = getFixed( ptr + 4 ); /* font revision number */ font.unitsPerEm = getUSHORT( ptr + 18 ); font.HUPM = font.unitsPerEm / 2; #ifdef DEBUG_TRUETYPE debug("unitsPerEm=%d",(int)font.unitsPerEm); #endif - font.llx = topost2( getFWord( ptr + 36 ) ); /* bounding box info */ + font.llx = topost2( getFWord( ptr + 36 ) ); /* bounding box info */ font.lly = topost2( getFWord( ptr + 38 ) ); font.urx = topost2( getFWord( ptr + 40 ) ); font.ury = topost2( getFWord( ptr + 42 ) ); - font.indexToLocFormat = getSHORT( ptr + 50 ); /* size of 'loca' data */ + font.indexToLocFormat = getSHORT( ptr + 50 ); /* size of 'loca' data */ if(font.indexToLocFormat != 0 && font.indexToLocFormat != 1) - throw TTException("TrueType font is unusable because indexToLocFormat != 0"); + throw TTException("TrueType font is unusable because indexToLocFormat != 0"); if( getSHORT(ptr+52) != 0 ) - throw TTException("TrueType font is unusable because glyphDataFormat != 0"); + throw TTException("TrueType font is unusable because glyphDataFormat != 0"); } catch (TTException& ) { free(ptr); throw; @@ -1164,34 +1178,34 @@ /* have the 'loca' and 'glyf' tables arround while */ /* we are generating the CharStrings. */ if(font.target_type == PS_TYPE_3 || font.target_type == PDF_TYPE_3) - { - BYTE *ptr; /* We need only one value */ - ptr = GetTable(&font, "hhea"); - font.numberOfHMetrics = getUSHORT(ptr + 34); - free(ptr); + { + BYTE *ptr; /* We need only one value */ + ptr = GetTable(&font, "hhea"); + font.numberOfHMetrics = getUSHORT(ptr + 34); + free(ptr); - assert(font.loca_table == NULL); - font.loca_table = GetTable(&font,"loca"); - assert(font.glyf_table == NULL); - font.glyf_table = GetTable(&font,"glyf"); - assert(font.hmtx_table == NULL); - font.hmtx_table = GetTable(&font,"hmtx"); + assert(font.loca_table == NULL); + font.loca_table = GetTable(&font,"loca"); + assert(font.glyf_table == NULL); + font.glyf_table = GetTable(&font,"glyf"); + assert(font.hmtx_table == NULL); + font.hmtx_table = GetTable(&font,"hmtx"); } if (glyph_ids.size() == 0) { - glyph_ids.clear(); - glyph_ids.reserve(font.numGlyphs); - for (int x = 0; x < font.numGlyphs; ++x) { - glyph_ids.push_back(x); - } + glyph_ids.clear(); + glyph_ids.reserve(font.numGlyphs); + for (int x = 0; x < font.numGlyphs; ++x) { + glyph_ids.push_back(x); + } } else if (font.target_type == PS_TYPE_3) { - ttfont_add_glyph_dependencies(&font, glyph_ids); + ttfont_add_glyph_dependencies(&font, glyph_ids); } } /* end of insert_ttfont() */ void insert_ttfont(const char *filename, TTStreamWriter& stream, - font_type_enum target_type, std::vector<int>& glyph_ids) + font_type_enum target_type, std::vector<int>& glyph_ids) { struct TTFONT font; @@ -1201,7 +1215,7 @@ ttfont_header(stream, &font); /* Define the encoding. */ - ttfont_encoding(stream); + ttfont_encoding(stream, &font, glyph_ids, target_type); /* Insert FontInfo dictionary. */ ttfont_FontInfo(stream, &font); @@ -1224,10 +1238,10 @@ public: void write(const char* a) { - oss << a; + oss << a; } std::string str() { - return oss.str(); + return oss.str(); } }; @@ -1237,11 +1251,11 @@ read_font(filename, PDF_TYPE_3, glyph_ids, font); for (std::vector<int>::const_iterator i = glyph_ids.begin(); - i != glyph_ids.end(); ++i) { - StringStreamWriter writer; - tt_type3_charproc(writer, &font, *i); - const char* name = ttfont_CharStrings_getname(&font, *i); - dict.add_pair(name, writer.str().c_str()); + i != glyph_ids.end(); ++i) { + StringStreamWriter writer; + tt_type3_charproc(writer, &font, *i); + const char* name = ttfont_CharStrings_getname(&font, *i); + dict.add_pair(name, writer.str().c_str()); } } @@ -1263,7 +1277,7 @@ TTFONT::~TTFONT() { if (file) - fclose(file); + fclose(file); free(PostName); free(FullName); free(FamilyName); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jd...@us...> - 2010-02-08 17:51:02
|
Revision: 8121 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8121&view=rev Author: jdh2358 Date: 2010-02-08 17:50:27 +0000 (Mon, 08 Feb 2010) Log Message: ----------- added Ariels csd patch for proper scaling at the dc component Modified Paths: -------------- branches/v0_99_maint/doc/faq/installing_faq.rst branches/v0_99_maint/doc/glossary/index.rst branches/v0_99_maint/doc/users/installing.rst branches/v0_99_maint/lib/matplotlib/mlab.py Modified: branches/v0_99_maint/doc/faq/installing_faq.rst =================================================================== --- branches/v0_99_maint/doc/faq/installing_faq.rst 2010-02-08 17:11:38 UTC (rev 8120) +++ branches/v0_99_maint/doc/faq/installing_faq.rst 2010-02-08 17:50:27 UTC (rev 8121) @@ -146,11 +146,11 @@ others in web application servers to dynamically serve up graphs. To support all of these use cases, matplotlib can target different -outputs, and each of these capabililities is called a backend (the +outputs, and each of these capabililities is called a backend; the "frontend" is the user facing code, ie the plotting code, whereas the "backend" does all the dirty work behind the scenes to make the figure. There are two types of backends: user interface backends (for -use in pygtk, wxpython, tkinter, qt or fltk) and hardcopy backends to +use in pygtk, wxpython, tkinter, qt, macosx, or fltk) and hardcopy backends to make image files (PNG, SVG, PDF, PS). There are a two primary ways to configure your backend. One is to set @@ -183,10 +183,10 @@ renderer for user interfaces is ``Agg`` which uses the `antigrain <http://antigrain.html>`_ C++ library to make a raster (pixel) image of the figure. All of the user interfaces can be used with agg -rendering, eg ``WXAgg``, ``GTKAgg``, ``QTAgg``, ``TkAgg``. In -addition, some of the user interfaces support other rendering engines. -For example, with GTK, you can also select GDK rendering (backend -``GTK``) or Cairo rendering (backend ``GTKCairo``). +rendering, eg ``WXAgg``, ``GTKAgg``, ``QTAgg``, ``TkAgg``, +``CocoaAgg``. In addition, some of the user interfaces support other +rendering engines. For example, with GTK, you can also select GDK +rendering (backend ``GTK``) or Cairo rendering (backend ``GTKCairo``). For the rendering engines, one can also distinguish between `vector <http://en.wikipedia.org/wiki/Vector_graphics>`_ or `raster @@ -238,6 +238,7 @@ QtAgg Agg rendering to a :term:`Qt` canvas (requires PyQt_) Qt4Agg Agg rendering to a :term:`Qt4` canvas (requires PyQt4_) FLTKAgg Agg rendering to a :term:`FLTK` canvas (requires pyFLTK_) +macosx Cocoa rendering in OSX windows ============ ================================================================ .. _`Anti-Grain Geometry`: http://www.antigrain.com/ Modified: branches/v0_99_maint/doc/glossary/index.rst =================================================================== --- branches/v0_99_maint/doc/glossary/index.rst 2010-02-08 17:11:38 UTC (rev 8120) +++ branches/v0_99_maint/doc/glossary/index.rst 2010-02-08 17:50:27 UTC (rev 8121) @@ -14,6 +14,11 @@ Cairo The `Cairo graphics <http://cairographics.org>`_ engine + + dateutil + The `dateutil <http://labix.org/python-dateutil>`_ library + provides extensions to the standard datetime module + EPS Encapsulated Postscript (`EPS <http://en.wikipedia.org/wiki/Encapsulated_PostScript>`_) @@ -86,6 +91,14 @@ language widely used for scripting, application development, web application servers, scientific computing and more. + + pytz + `pytz <http://pytz.sourceforge.net/>`_ provides the Olson tz + database in Python. it allows accurate and cross platform + timezone calculations and solves the issue of ambiguous times at + the end of daylight savings + + Qt `Qt <http://trolltech.com/products/qt/>`__ is a cross-platform application framework for desktop and embedded development. Modified: branches/v0_99_maint/doc/users/installing.rst =================================================================== --- branches/v0_99_maint/doc/users/installing.rst 2010-02-08 17:11:38 UTC (rev 8120) +++ branches/v0_99_maint/doc/users/installing.rst 2010-02-08 17:50:27 UTC (rev 8121) @@ -44,11 +44,30 @@ matplotlib requires numpy version 1.1 or later. Although it is not a requirement to use matplotlib, we strongly encourage you to install `ipython <http://ipython.scipy.org/dist>`_, which is an interactive -shell for python that is matplotlib aware. Once you have ipython, -numpy and matplotlib installed, in ipython's "pylab" mode you have a -matlab-like environment that automatically handles most of the -configuration details for you, so you can get up and running quickly:: +shell for python that is matplotlib aware. +Next we need to get matplotlib installed. We provide prebuilt +binaries for OS X and Windows on the matplotlib `download +<http://sourceforge.net/projects/matplotlib/files/>`_ page. Click on +the latest release of the "matplotlib" package, choose your python +version (2.5 or 2.6) and your platform (macosx or win32) and you +should be good to go. If you have any problems, please check the +:ref:`installing-faq`, google around a little bit, and post a question +the `mailing list +<http://sourceforge.net/project/showfiles.php?group_id=80706>`_. If +you are on debian/unbuntu linux, it suffices to do:: + + > sudo apt-get install python-matplotlib + +Instructions for installing our OSX binaries are found in the FAQ +:ref:`install_osx_binaries`. + + +Once you have ipython, numpy and matplotlib installed, in ipython's +"pylab" mode you have a matlab-like environment that automatically +handles most of the configuration details for you, so you can get up +and running quickly:: + johnh@flag:~> ipython -pylab Python 2.4.5 (#4, Apr 12 2008, 09:09:16) IPython 0.9.0 -- An enhanced Interactive Python. @@ -60,20 +79,6 @@ In [2]: hist(x, 100) -And a *voila*, a figure pops up. But we are putting the cart ahead of -the horse -- first we need to get matplotlib installed. We provide -prebuilt binaries for OS X and Windows on the matplotlib `download -<http://sourceforge.net/projects/matplotlib/files/>`_ page. Click on -the latest release of the "matplotlib" package, choose your python -version (2.4 or 2.5) and your platform (macosx or win32) and you -should be good to go. If you have any problems, please check the -:ref:`installing-faq`, google around a little bit, and post a question -the `mailing list -<http://sourceforge.net/project/showfiles.php?group_id=80706>`_. - -Instructions for installing our OSX binaries are found in the FAQ -ref:`install_osx_binaries`. - Note that when testing matplotlib installations from the interactive python console, there are some issues relating to user interface toolkits and interactive settings that are discussed in @@ -85,9 +90,9 @@ ====================== If you are interested perhaps in contributing to matplotlib -development, or just like to build everything yourself, it is not -difficult to build matplotlib from source. Grab the latest *tar.gz* -release file from `sourceforge +development, running the latest greatest code, or just like to +build everything yourself, it is not difficult to build matplotlib +from source. Grab the latest *tar.gz* release file from `sourceforge <http://sourceforge.net/project/showfiles.php?group_id=80706>`_, or if you want to develop matplotlib or just need the latest bugfixed version, grab the latest svn version :ref:`install-svn`. @@ -173,17 +178,17 @@ agg template source statically, so it will not affect anything on your system outside of matplotlib. -pytz 2007g or later +:term:`pytz` 2007g or later timezone handling for python datetime objects. By default, matplotlib will install pytz if it isn't already installed on your - system. To override the default, use setup.cfg to force or + system. To override the default, use :file:`setup.cfg to force or prevent installation of pytz. -dateutil 1.1 or later - extensions to python datetime handling. By - default, matplotlib will install dateutil if it isn't already - installed on your system. To override the default, use setup.cfg - to force or prevent installation of dateutil. +:term:`dateutil` 1.1 or later + provides extensions to python datetime handling. By default, matplotlib + will install dateutil if it isn't already installed on your + system. To override the default, use :file:`setup.cfg` to force + or prevent installation of dateutil. Modified: branches/v0_99_maint/lib/matplotlib/mlab.py =================================================================== --- branches/v0_99_maint/lib/matplotlib/mlab.py 2010-02-08 17:11:38 UTC (rev 8120) +++ branches/v0_99_maint/lib/matplotlib/mlab.py 2010-02-08 17:50:27 UTC (rev 8121) @@ -273,10 +273,18 @@ Pxy[:,i] = np.conjugate(fx[:numFreqs]) * fy[:numFreqs] # Scale the spectrum by the norm of the window to compensate for - # windowing loss; see Bendat & Piersol Sec 11.5.2. Also include - # scaling factors for one-sided densities and dividing by the sampling - # frequency, if desired. - Pxy *= scaling_factor / (np.abs(windowVals)**2).sum() + # windowing loss; see Bendat & Piersol Sec 11.5.2. + Pxy *= 1 / (np.abs(windowVals)**2).sum() + + # Also include scaling factors for one-sided densities and dividing by the + # sampling frequency, if desired. Scale everything, except the DC component + # and the NFFT/2 component: + Pxy[1:-1] *= scaling_factor + + #But do scale those components by Fs, if required + if scale_by_freq: + Pxy[[0,-1]] /= Fs + t = 1./Fs * (ind + NFFT / 2.) freqs = float(Fs) / pad_to * np.arange(numFreqs) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lee...@us...> - 2010-02-08 17:11:44
|
Revision: 8120 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8120&view=rev Author: leejjoon Date: 2010-02-08 17:11:38 +0000 (Mon, 08 Feb 2010) Log Message: ----------- update examples/api/demo_affine_image.py Modified Paths: -------------- trunk/matplotlib/examples/api/demo_affine_image.py Modified: trunk/matplotlib/examples/api/demo_affine_image.py =================================================================== --- trunk/matplotlib/examples/api/demo_affine_image.py 2010-02-08 16:54:31 UTC (rev 8119) +++ trunk/matplotlib/examples/api/demo_affine_image.py 2010-02-08 17:11:38 UTC (rev 8120) @@ -30,24 +30,37 @@ if 1: - ax = plt.subplot(111) + + # image rotation + + ax1 = plt.subplot(121) Z = get_image() - im = imshow_affine(ax, Z, interpolation='nearest', cmap=cm.jet, - origin='lower', - extent=[-2, 4, -3, 2], clip_on=True) + im1 = imshow_affine(ax1, Z, interpolation='nearest', cmap=cm.jet, + origin='lower', + extent=[-2, 4, -3, 2], clip_on=True) - trans_data2 = mtransforms.Affine2D().rotate_deg(30) + ax.transData - im.set_transform(trans_data2) + trans_data2 = mtransforms.Affine2D().rotate_deg(30) + ax1.transData + im1.set_transform(trans_data2) # display intended extent of the image - x1, x2, y1, y2 = im.get_extent() + x1, x2, y1, y2 = im1.get_extent() x3, y3 = x2, y1 - ax.plot([x1, x2, x2, x1, x1], [y1, y1, y2, y2, y1], "r--", lw=3, - transform=trans_data2) + ax1.plot([x1, x2, x2, x1, x1], [y1, y1, y2, y2, y1], "r--", lw=3, + transform=trans_data2) - ax.set_xlim(-3, 5) - ax.set_ylim(-4, 4) + ax1.set_xlim(-3, 5) + ax1.set_ylim(-4, 4) + + # image skew + + ax2 = plt.subplot(122) + im2 = ax2.imshow(Z, interpolation='nearest', cmap=cm.jet, + origin='lower', + extent=[-2, 4, -3, 2], clip_on=True) + im2._image_skew_coordinate = (3, -2) + + plt.show() #plt.savefig("demo_affine_image") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lee...@us...> - 2010-02-08 16:54:37
|
Revision: 8119 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8119&view=rev Author: leejjoon Date: 2010-02-08 16:54:31 +0000 (Mon, 08 Feb 2010) Log Message: ----------- issue a warning when _image_skew_coordinate is set for backends that do not support an affine transform of images Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/image.py Modified: trunk/matplotlib/lib/matplotlib/image.py =================================================================== --- trunk/matplotlib/lib/matplotlib/image.py 2010-02-08 16:54:26 UTC (rev 8118) +++ trunk/matplotlib/lib/matplotlib/image.py 2010-02-08 16:54:31 UTC (rev 8119) @@ -305,6 +305,9 @@ if self._check_unsampled_image(renderer): self._draw_unsampled_image(renderer, gc) else: + if self._image_skew_coordinate is not None: + warnings.warn("Image will not be shown correctly with this backend.") + im = self.make_image(renderer.get_image_magnification()) if im is None: return This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lee...@us...> - 2010-02-08 16:54:32
|
Revision: 8118 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8118&view=rev Author: leejjoon Date: 2010-02-08 16:54:26 +0000 (Mon, 08 Feb 2010) Log Message: ----------- RendererAgg.draw_image supports affine transform Modified Paths: -------------- trunk/matplotlib/examples/api/demo_affine_image.py trunk/matplotlib/lib/matplotlib/backends/backend_agg.py trunk/matplotlib/src/_backend_agg.cpp Modified: trunk/matplotlib/examples/api/demo_affine_image.py =================================================================== --- trunk/matplotlib/examples/api/demo_affine_image.py 2010-02-08 16:00:23 UTC (rev 8117) +++ trunk/matplotlib/examples/api/demo_affine_image.py 2010-02-08 16:54:26 UTC (rev 8118) @@ -3,7 +3,7 @@ """ For the backends that supports draw_image with optional affine -transform (e.g., ps backend), the image of the output should +transform (e.g., agg, ps backend), the image of the output should have its boundary matches the red rectangles. """ @@ -33,7 +33,8 @@ ax = plt.subplot(111) Z = get_image() im = imshow_affine(ax, Z, interpolation='nearest', cmap=cm.jet, - origin='lower', extent=[-2, 4, -3, 2]) + origin='lower', + extent=[-2, 4, -3, 2], clip_on=True) trans_data2 = mtransforms.Affine2D().rotate_deg(30) + ax.transData im.set_transform(trans_data2) @@ -48,4 +49,5 @@ ax.set_xlim(-3, 5) ax.set_ylim(-4, 4) - plt.savefig("demo_affine_image") + plt.show() + #plt.savefig("demo_affine_image") Modified: trunk/matplotlib/lib/matplotlib/backends/backend_agg.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2010-02-08 16:00:23 UTC (rev 8117) +++ trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2010-02-08 16:54:26 UTC (rev 8118) @@ -261,6 +261,12 @@ # with the Agg backend return True + def option_scale_image(self): + """ + agg backend support arbitrary scaling of image. + """ + return True + def restore_region(self, region, bbox=None, xy=None): """ restore the saved region. if bbox (instance of BboxBase, or Modified: trunk/matplotlib/src/_backend_agg.cpp =================================================================== --- trunk/matplotlib/src/_backend_agg.cpp 2010-02-08 16:00:23 UTC (rev 8117) +++ trunk/matplotlib/src/_backend_agg.cpp 2010-02-08 16:54:26 UTC (rev 8118) @@ -814,55 +814,99 @@ RendererAgg::draw_image(const Py::Tuple& args) { _VERBOSE("RendererAgg::draw_image"); - args.verify_length(4); + args.verify_length(4, 7); // 7 if affine matrix if given GCAgg gc(args[0], dpi); - double x = mpl_round(Py::Float(args[1])); - double y = mpl_round(Py::Float(args[2])); Image *image = static_cast<Image*>(args[3].ptr()); bool has_clippath = false; + agg::trans_affine affine_trans; + bool has_affine = false; + double x, y, w, h; + + if (args.size() == 7) { + has_affine = true; + x = Py::Float(args[1]); + y = Py::Float(args[2]); + w = Py::Float(args[4]); + h = Py::Float(args[5]); + affine_trans = py_to_agg_transformation_matrix(args[6].ptr()); + } else { + x = mpl_round(Py::Float(args[1])); + y = mpl_round(Py::Float(args[2])); + } + + theRasterizer.reset_clipping(); rendererBase.reset_clipping(true); + set_clipbox(gc.cliprect, theRasterizer); has_clippath = render_clippath(gc.clippath, gc.clippath_trans); Py::Tuple empty; image->flipud_out(empty); pixfmt pixf(*(image->rbufOut)); - if (has_clippath) { + if (has_affine | has_clippath) { agg::trans_affine mtx; - mtx *= agg::trans_affine_translation((int)x, (int)(height-(y+image->rowsOut))); + agg::path_storage rect; - agg::path_storage rect; + if (has_affine) { + mtx *= agg::trans_affine_scaling(1, -1); + mtx *= agg::trans_affine_translation(0, image->rowsOut); + mtx *= agg::trans_affine_scaling(w/(image->colsOut), h/(image->rowsOut)); + mtx *= agg::trans_affine_translation(x, y); + mtx *= affine_trans; + mtx *= agg::trans_affine_scaling(1.0, -1.0); + mtx *= agg::trans_affine_translation(0.0, (double) height); + } else { + mtx *= agg::trans_affine_translation((int)x, (int)(height-(y+image->rowsOut))); + } + rect.move_to(0, 0); rect.line_to(image->colsOut, 0); rect.line_to(image->colsOut, image->rowsOut); rect.line_to(0, image->rowsOut); rect.line_to(0, 0); + agg::conv_transform<agg::path_storage> rect2(rect, mtx); agg::trans_affine inv_mtx(mtx); inv_mtx.invert(); + typedef agg::span_allocator<agg::rgba8> color_span_alloc_type; - typedef agg::pixfmt_amask_adaptor<pixfmt, alpha_mask_type> pixfmt_amask_type; - typedef agg::renderer_base<pixfmt_amask_type> amask_ren_type; typedef agg::image_accessor_clip<agg::pixfmt_rgba32> image_accessor_type; typedef agg::span_interpolator_linear<> interpolator_type; typedef agg::span_image_filter_rgba_nn<image_accessor_type, interpolator_type> image_span_gen_type; - typedef agg::renderer_scanline_aa<amask_ren_type, color_span_alloc_type, image_span_gen_type> renderer_type; + color_span_alloc_type sa; image_accessor_type ia(pixf, agg::rgba8(0, 0, 0, 0)); interpolator_type interpolator(inv_mtx); image_span_gen_type image_span_generator(ia, interpolator); - pixfmt_amask_type pfa(pixFmt, alphaMask); - amask_ren_type r(pfa); - renderer_type ri(r, sa, image_span_generator); - theRasterizer.add_path(rect2); - agg::render_scanlines(theRasterizer, slineP8, ri); + + if (has_clippath) { + typedef agg::pixfmt_amask_adaptor<pixfmt, alpha_mask_type> pixfmt_amask_type; + typedef agg::renderer_base<pixfmt_amask_type> amask_ren_type; + typedef agg::renderer_scanline_aa<amask_ren_type, color_span_alloc_type, image_span_gen_type> renderer_type_alpha; + + pixfmt_amask_type pfa(pixFmt, alphaMask); + amask_ren_type r(pfa); + renderer_type_alpha ri(r, sa, image_span_generator); + + theRasterizer.add_path(rect2); + agg::render_scanlines(theRasterizer, slineP8, ri); + } else { + typedef agg::renderer_base<pixfmt> ren_type; + typedef agg::renderer_scanline_aa<ren_type, color_span_alloc_type, image_span_gen_type> renderer_type; + ren_type r(pixFmt); + renderer_type ri(r, sa, image_span_generator); + + theRasterizer.add_path(rect2); + agg::render_scanlines(theRasterizer, slineP8, ri); + } + } else { set_clipbox(gc.cliprect, rendererBase); rendererBase.blend_from(pixf, 0, (int)x, (int)(height-(y+image->rowsOut))); @@ -873,6 +917,9 @@ return Py::Object(); } + + + template<class path_t> void RendererAgg::_draw_path(path_t& path, bool has_clippath, const facepair_t& face, const GCAgg& gc) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2010-02-08 16:00:31
|
Revision: 8117 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8117&view=rev Author: mdboom Date: 2010-02-08 16:00:23 +0000 (Mon, 08 Feb 2010) Log Message: ----------- Merged revisions 8092,8116 via svnmerge from https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_99_maint ........ r8092 | leejjoon | 2010-01-18 19:26:16 -0500 (Mon, 18 Jan 2010) | 1 line update annotate documentation to explain *annotation_clip* parameter ........ r8116 | mdboom | 2010-02-08 10:57:45 -0500 (Mon, 08 Feb 2010) | 1 line Fix for libpng-1.4 compatibility ........ Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/text.py trunk/matplotlib/src/_png.cpp Property Changed: ---------------- trunk/matplotlib/ trunk/matplotlib/doc/pyplots/README trunk/matplotlib/doc/sphinxext/gen_gallery.py trunk/matplotlib/doc/sphinxext/gen_rst.py trunk/matplotlib/examples/misc/multiprocess.py trunk/matplotlib/examples/mplot3d/contour3d_demo.py trunk/matplotlib/examples/mplot3d/contourf3d_demo.py trunk/matplotlib/examples/mplot3d/polys3d_demo.py trunk/matplotlib/examples/mplot3d/scatter3d_demo.py trunk/matplotlib/examples/mplot3d/surface3d_demo.py trunk/matplotlib/examples/mplot3d/wire3d_demo.py trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_spines/spines_axes_positions.png Property changes on: trunk/matplotlib ___________________________________________________________________ Modified: svnmerge-integrated - /branches/mathtex:1-7263 /branches/v0_99_maint:1-8070 + /branches/mathtex:1-7263 /branches/v0_99_maint:1-8116 Modified: svn:mergeinfo - /branches/v0_91_maint:5753-5771 /branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070 + /branches/v0_91_maint:5753-5771 /branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 Property changes on: trunk/matplotlib/doc/pyplots/README ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/pyplots/README:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070 + /branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/pyplots/README:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771 /branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070 + /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771 /branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771 /branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070 + /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771 /branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 Property changes on: trunk/matplotlib/examples/misc/multiprocess.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/misc/log.py:5753-5771 /branches/v0_98_5_maint/examples/misc/log.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070 + /branches/v0_91_maint/examples/misc/log.py:5753-5771 /branches/v0_98_5_maint/examples/misc/log.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 Property changes on: trunk/matplotlib/examples/mplot3d/contour3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contour.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070 + /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contour.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 Property changes on: trunk/matplotlib/examples/mplot3d/contourf3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contourf.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070 + /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contourf.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 Property changes on: trunk/matplotlib/examples/mplot3d/polys3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/polys.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070 + /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/polys.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 Property changes on: trunk/matplotlib/examples/mplot3d/scatter3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/scatter.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070 + /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/scatter.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 Property changes on: trunk/matplotlib/examples/mplot3d/surface3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/surface.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070 + /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/surface.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 Property changes on: trunk/matplotlib/examples/mplot3d/wire3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/wire.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070 + /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/wire.py:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080 /branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771 /branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070 + /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771 /branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771 /branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070 + /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771 /branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771 /branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070 + /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771 /branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584,7616-7618,7633,7638,7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 Property changes on: trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_spines/spines_axes_positions.png ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_99_maint/lib/matplotlib/tests/baseline_images/test_spines/spines_axes_positions.png:7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070 + /branches/v0_99_maint/lib/matplotlib/tests/baseline_images/test_spines/spines_axes_positions.png:7703,7727-7734,7740-7741,7745,7751,7756,7762,7770,7772,7774,7776-7778,7780,7784,7788,7790,7792,7794,7796,7800,7803,7808,7822,7827,7834,7837,7844,7846-7847,7849,7858,7864,7866-7867,7874,7884,7896,7901-7903,7916,7919,7924,7928,7944,7952,7970,7972,7981,7983,7989-7991,7998,8001,8003,8016-8057,8068,8070,8092-8116 Modified: trunk/matplotlib/lib/matplotlib/text.py =================================================================== --- trunk/matplotlib/lib/matplotlib/text.py 2010-02-08 15:57:45 UTC (rev 8116) +++ trunk/matplotlib/lib/matplotlib/text.py 2010-02-08 16:00:23 UTC (rev 8117) @@ -1668,6 +1668,14 @@ # 5 points below the top border xy=(10,-5), xycoords='axes points' + + The *annotation_clip* attribute contols the visibility of the + annotation when it goes outside the axes area. If True, the + annotation will only be drawn when the *xy* is inside the + axes. If False, the annotation will always be drawn regardless + of its position. The default is *None*, which behave as True + only if *xycoords* is"data". + Additional kwargs are Text properties: %(Text)s Modified: trunk/matplotlib/src/_png.cpp =================================================================== --- trunk/matplotlib/src/_png.cpp 2010-02-08 15:57:45 UTC (rev 8116) +++ trunk/matplotlib/src/_png.cpp 2010-02-08 16:00:23 UTC (rev 8117) @@ -336,7 +336,11 @@ //free the png memory png_read_end(png_ptr, info_ptr); +#ifndef png_infopp_NULL + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); +#else png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL); +#endif if (close_file) { fclose(fp); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2010-02-08 15:57:52
|
Revision: 8116 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8116&view=rev Author: mdboom Date: 2010-02-08 15:57:45 +0000 (Mon, 08 Feb 2010) Log Message: ----------- Fix for libpng-1.4 compatibility Modified Paths: -------------- branches/v0_99_maint/src/_png.cpp Modified: branches/v0_99_maint/src/_png.cpp =================================================================== --- branches/v0_99_maint/src/_png.cpp 2010-02-06 23:54:14 UTC (rev 8115) +++ branches/v0_99_maint/src/_png.cpp 2010-02-08 15:57:45 UTC (rev 8116) @@ -130,12 +130,12 @@ png_init_io(png_ptr, fp); } else { png_set_write_fn(png_ptr, (void*)py_fileobj.ptr(), - &write_png_data, &flush_png_data); + &write_png_data, &flush_png_data); } png_set_IHDR(png_ptr, info_ptr, - width, height, 8, - PNG_COLOR_TYPE_RGB_ALPHA, PNG_INTERLACE_NONE, - PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); + width, height, 8, + PNG_COLOR_TYPE_RGB_ALPHA, PNG_INTERLACE_NONE, + PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); // Save the dpi of the image in the file if (args.size() == 5) { @@ -181,7 +181,7 @@ args.verify_length(1); std::string fname = Py::String(args[0]); - png_byte header[8]; // 8 is the maximum size that can be checked + png_byte header[8]; // 8 is the maximum size that can be checked FILE *fp = fopen(fname.c_str(), "rb"); if (!fp) @@ -272,25 +272,29 @@ for (png_uint_32 y = 0; y < height; y++) { png_byte* row = row_pointers[y]; - for (png_uint_32 x = 0; x < width; x++) { - size_t offset = y*A->strides[0] + x*A->strides[1]; - if (bit_depth == 16) { - png_uint_16* ptr = &reinterpret_cast<png_uint_16*> (row)[x * dimensions[2]]; + for (png_uint_32 x = 0; x < width; x++) { + size_t offset = y*A->strides[0] + x*A->strides[1]; + if (bit_depth == 16) { + png_uint_16* ptr = &reinterpret_cast<png_uint_16*> (row)[x * dimensions[2]]; for (png_uint_32 p = 0; p < (png_uint_32)dimensions[2]; p++) - *(float*)(A->data + offset + p*A->strides[2]) = (float)(ptr[p]) / max_value; - } else { - png_byte* ptr = &(row[x * dimensions[2]]); - for (png_uint_32 p = 0; p < (png_uint_32)dimensions[2]; p++) - { - *(float*)(A->data + offset + p*A->strides[2]) = (float)(ptr[p]) / max_value; - } - } + *(float*)(A->data + offset + p*A->strides[2]) = (float)(ptr[p]) / max_value; + } else { + png_byte* ptr = &(row[x * dimensions[2]]); + for (png_uint_32 p = 0; p < (png_uint_32)dimensions[2]; p++) + { + *(float*)(A->data + offset + p*A->strides[2]) = (float)(ptr[p]) / max_value; + } + } } } //free the png memory png_read_end(png_ptr, info_ptr); +#ifndef png_infopp_NULL + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); +#else png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL); +#endif fclose(fp); for (row = 0; row < height; row++) delete [] row_pointers[row]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ef...@us...> - 2010-02-06 23:54:21
|
Revision: 8115 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8115&view=rev Author: efiring Date: 2010-02-06 23:54:14 +0000 (Sat, 06 Feb 2010) Log Message: ----------- Added gnu0 platform to setupext.py (Benjamin Drung) Modified Paths: -------------- trunk/matplotlib/CHANGELOG trunk/matplotlib/setupext.py Modified: trunk/matplotlib/CHANGELOG =================================================================== --- trunk/matplotlib/CHANGELOG 2010-02-06 23:52:34 UTC (rev 8114) +++ trunk/matplotlib/CHANGELOG 2010-02-06 23:54:14 UTC (rev 8115) @@ -1,3 +1,7 @@ +2010-02-06 Added setup.cfg "basedirlist" option to override setting + in setupext.py "basedir" dictionary; added "gnu0" + platform requested by Benjamin Drung. - EF + 2010-02-06 Added 'xy' scaling option to EllipseCollection. - EF 2010-02-03 Made plot_directive use a custom PlotWarning category, so that Modified: trunk/matplotlib/setupext.py =================================================================== --- trunk/matplotlib/setupext.py 2010-02-06 23:52:34 UTC (rev 8114) +++ trunk/matplotlib/setupext.py 2010-02-06 23:54:14 UTC (rev 8115) @@ -1,8 +1,10 @@ """ Some helper functions for building the C extensions -you may need to edit basedir to point to the default location of your -required libs, eg, png, z, freetype +You may need to use the "basedirlist" option in setup.cfg to point +to the location of your required libs, eg, png, z, freetype, +overriding the settings hard-coded in the "basedir" directory +below. DARWIN @@ -71,6 +73,7 @@ 'gnukfreebsd6' : ['/usr/local', '/usr'], 'gnukfreebsd7' : ['/usr/local', '/usr'], 'gnukfreebsd8' : ['/usr/local', '/usr'], + 'gnu0' : ['/usr'], 'aix5' : ['/usr/local'], } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lee...@us...> - 2010-02-06 23:52:40
|
Revision: 8114 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8114&view=rev Author: leejjoon Date: 2010-02-06 23:52:34 +0000 (Sat, 06 Feb 2010) Log Message: ----------- add Colorbar.set_ticks and Colorbar.set_ticklabels Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/colorbar.py Modified: trunk/matplotlib/lib/matplotlib/colorbar.py =================================================================== --- trunk/matplotlib/lib/matplotlib/colorbar.py 2010-02-06 23:44:28 UTC (rev 8113) +++ trunk/matplotlib/lib/matplotlib/colorbar.py 2010-02-06 23:52:34 UTC (rev 8114) @@ -18,6 +18,7 @@ is a thin wrapper over :meth:`~matplotlib.figure.Figure.colorbar`. ''' +import warnings import numpy as np import matplotlib as mpl @@ -207,6 +208,7 @@ filled=True, ): self.ax = ax + self._patch_ax() if cmap is None: cmap = cm.get_cmap() if norm is None: norm = colors.Normalize() self.alpha = alpha @@ -239,6 +241,13 @@ # The rest is in a method so we can recalculate when clim changes. self.draw_all() + def _patch_ax(self): + def _warn(*args, **kw): + warnings.warn("Use the colorbar set_ticks() method instead.") + + self.ax.set_xticks = _warn + self.ax.set_yticks = _warn + def draw_all(self): ''' Calculate any free parameters based on the current cmap and norm, @@ -253,6 +262,50 @@ self._add_solids(X, Y, C) self._set_label() + def update_ticks(self): + """ + Force the update of the ticks and ticklabels. This must be + called whenever the tick locator and/or tick formatter changes. + """ + ax = self.ax + ticks, ticklabels, offset_string = self._ticker() + if self.orientation == 'vertical': + ax.xaxis.set_ticks([]) + ax.yaxis.set_label_position('right') + ax.yaxis.set_ticks_position('right') + ax.yaxis.set_ticks(ticks) + ax.set_yticklabels(ticklabels) + ax.yaxis.get_major_formatter().set_offset_string(offset_string) + + else: + ax.yaxis.set_ticks([]) + ax.xaxis.set_label_position('bottom') + ax.xaxis.set_ticks(ticks) + ax.set_xticklabels(ticklabels) + ax.xaxis.get_major_formatter().set_offset_string(offset_string) + + def set_ticks(self, ticks, update_ticks=True): + """ + set tick locations. Tick locations are updated immediately unless update_ticks is + *False*. To manually update the ticks, call *update_ticks* method explicitly. + """ + self.locator = ticker.FixedLocator(ticks, nbins=len(ticks)) + if update_ticks: + self.update_ticks() + + def set_ticklabels(self, ticklabels, update_ticks=True): + """ + set tick labels. Tick labels are updated immediately unless update_ticks is + *False*. To manually update the ticks, call *update_ticks* method explicitly. + """ + if isinstance(self.locator, ticker.FixedLocator): + self.formatter = ticker.FixedFormatter(ticklabels) + if update_ticks: + self.update_ticks() + else: + warnings.warn("set_ticks() must have been called.") + + def _config_axes(self, X, Y): ''' Make an axes patch and outline. @@ -275,22 +328,10 @@ linewidth=0.01, zorder=-1) ax.add_artist(self.patch) - ticks, ticklabels, offset_string = self._ticker() - if self.orientation == 'vertical': - ax.set_xticks([]) - ax.yaxis.set_label_position('right') - ax.yaxis.set_ticks_position('right') - ax.set_yticks(ticks) - ax.set_yticklabels(ticklabels) - ax.yaxis.get_major_formatter().set_offset_string(offset_string) - else: - ax.set_yticks([]) - ax.xaxis.set_label_position('bottom') - ax.set_xticks(ticks) - ax.set_xticklabels(ticklabels) - ax.xaxis.get_major_formatter().set_offset_string(offset_string) + self.update_ticks() + def _set_label(self): if self.orientation == 'vertical': self.ax.set_ylabel(self._label, **self._labelkw) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |