From: <evi...@us...> - 2009-07-23 21:32:28
|
Revision: 7289 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7289&view=rev Author: evilguru Date: 2009-07-23 21:32:21 +0000 (Thu, 23 Jul 2009) Log Message: ----------- Use svn:external to pull-in mathtex. Modified Paths: -------------- branches/mathtex/lib/matplotlib/sphinxext/mathmpl.py Added Paths: ----------- branches/mathtex/lib/mathtex/ Property Changed: ---------------- branches/mathtex/ Property changes on: branches/mathtex ___________________________________________________________________ Added: svn:externals + lib/mathtex http://mathtex.googlecode.com/svn/trunk/ Modified: branches/mathtex/lib/matplotlib/sphinxext/mathmpl.py =================================================================== --- branches/mathtex/lib/matplotlib/sphinxext/mathmpl.py 2009-07-23 18:25:39 UTC (rev 7288) +++ branches/mathtex/lib/matplotlib/sphinxext/mathmpl.py 2009-07-23 21:32:21 UTC (rev 7289) @@ -9,10 +9,7 @@ from docutils.parsers.rst import directives import warnings -from matplotlib import rcParams -from matplotlib.mathtext import MathTextParser -rcParams['mathtext.fontset'] = 'cm' -mathtext_parser = MathTextParser("Bitmap") +from mathtex.mathtex_main import Mathtex # Define LaTeX math node: class latex_math(nodes.General, nodes.Element): @@ -44,21 +41,18 @@ # This uses mathtext to render the expression def latex2png(latex, filename, fontset='cm'): latex = "$%s$" % latex - orig_fontset = rcParams['mathtext.fontset'] - rcParams['mathtext.fontset'] = fontset - if os.path.exists(filename): - depth = mathtext_parser.get_depth(latex, dpi=100) - else: + + m = Mathtex(latex, 'bakoma') + + if not os.path.exists(filename): try: - depth = mathtext_parser.to_png(filename, latex, dpi=100) + m.save(filename) except: warnings.warn("Could not render math expression %s" % latex, Warning) - depth = 0 - rcParams['mathtext.fontset'] = orig_fontset sys.stdout.write("#") sys.stdout.flush() - return depth + return m.depth # LaTeX to HTML translation stuff: def latex2html(node, source): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <evi...@us...> - 2009-07-29 17:14:20
|
Revision: 7306 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7306&view=rev Author: evilguru Date: 2009-07-29 17:14:05 +0000 (Wed, 29 Jul 2009) Log Message: ----------- Update the mathtex branch so that it is up-to-date with trunk. Modified Paths: -------------- branches/mathtex/CHANGELOG branches/mathtex/boilerplate.py branches/mathtex/examples/pylab_examples/axes_zoom_effect.py branches/mathtex/examples/pylab_examples/findobj_demo.py branches/mathtex/examples/pylab_examples/griddata_demo.py branches/mathtex/examples/pylab_examples/hatch_demo.py branches/mathtex/lib/matplotlib/axes.py branches/mathtex/lib/matplotlib/backends/backend_pdf.py branches/mathtex/lib/matplotlib/backends/backend_svg.py branches/mathtex/lib/matplotlib/collections.py branches/mathtex/lib/matplotlib/delaunay/VoronoiDiagramGenerator.cpp branches/mathtex/lib/matplotlib/delaunay/__init__.py branches/mathtex/lib/matplotlib/delaunay/_delaunay.cpp branches/mathtex/lib/matplotlib/delaunay/triangulate.py branches/mathtex/lib/matplotlib/mlab.py branches/mathtex/lib/matplotlib/pyplot.py branches/mathtex/lib/matplotlib/quiver.py branches/mathtex/lib/mpl_toolkits/axes_grid/axislines.py branches/mathtex/lib/mpl_toolkits/mplot3d/art3d.py branches/mathtex/lib/mpl_toolkits/mplot3d/axes3d.py branches/mathtex/src/_backend_agg.cpp Added Paths: ----------- branches/mathtex/examples/api/radar_chart.py branches/mathtex/examples/mplot3d/hist3d_demo.py branches/mathtex/examples/pylab_examples/legend_translucent.py Removed Paths: ------------- branches/mathtex/src/agg.cxx branches/mathtex/src/swig_runtime.h Property Changed: ---------------- branches/mathtex/ branches/mathtex/doc/pyplots/README branches/mathtex/doc/sphinxext/gen_gallery.py branches/mathtex/doc/sphinxext/gen_rst.py branches/mathtex/examples/misc/multiprocess.py branches/mathtex/examples/mplot3d/contour3d_demo.py branches/mathtex/examples/mplot3d/contourf3d_demo.py branches/mathtex/examples/mplot3d/polys3d_demo.py branches/mathtex/examples/mplot3d/scatter3d_demo.py branches/mathtex/examples/mplot3d/surface3d_demo.py branches/mathtex/examples/mplot3d/wire3d_demo.py branches/mathtex/lib/matplotlib/sphinxext/mathmpl.py branches/mathtex/lib/matplotlib/sphinxext/only_directives.py branches/mathtex/lib/matplotlib/sphinxext/plot_directive.py Property changes on: branches/mathtex ___________________________________________________________________ Modified: svnmerge-integrated - /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7253 /trunk/matplotlib:1-7262 + /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7253 /trunk/matplotlib:1-7305 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_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 /trunk/matplotlib:7265-7303 Modified: branches/mathtex/CHANGELOG =================================================================== --- branches/mathtex/CHANGELOG 2009-07-29 16:58:13 UTC (rev 7305) +++ branches/mathtex/CHANGELOG 2009-07-29 17:14:05 UTC (rev 7306) @@ -1,3 +1,26 @@ +2009-07-28 Quiver speed improved, thanks to tip by Ray Speth. -EF + +2009-07-27 Simplify argument handling code for plot method. -EF + +2009-07-25 Allow "plot(1, 2, 'r*')" to work. - EF + +2009-07-22 Added an 'interp' keyword to griddata so the faster linear + interpolation method can be chosen. Default is 'nn', so + default behavior (using natural neighbor method) is unchanged (JSW) + +2009-07-22 Improved boilerplate.py so that it generates the correct + signatures for pyplot functions. - JKS + +2009-07-19 Fixed the docstring of Axes.step to reflect the correct + meaning of the kwargs "pre" and "post" - See SF bug + https://sourceforge.net/tracker/index.php?func=detail&aid=2823304&group_id=80706&atid=560720 + - JDH + +2009-07-18 Fix support for hatches without color fills to pdf and svg + backends. Add an example of that to hatch_demo.py. - JKS + +2009-07-17 Removed fossils from swig version of agg backend. - EF + 2009-07-14 initial submission of the annotation guide. -JJL 2009-07-14 axes_grid : minor improvements in anchored_artists and @@ -3,5 +26,5 @@ inset_locator. -JJL -2009-07-14 Fix a few bugs in ConnectionStyle algorithms. Add +2009-07-14 Fix a few bugs in ConnectionStyle algorithms. Add ConnectionPatch class. -JJL Modified: branches/mathtex/boilerplate.py =================================================================== --- branches/mathtex/boilerplate.py 2009-07-29 16:58:13 UTC (rev 7305) +++ branches/mathtex/boilerplate.py 2009-07-29 17:14:05 UTC (rev 7306) @@ -1,47 +1,50 @@ -# wrap the plot commands defined in axes. The code generated by this +# Wrap the plot commands defined in axes. The code generated by this # file is pasted into pylab.py. We did try to do this the smart way, # with callable functions and new.function, but could never get the # docstrings right for python2.2. See # http://groups.google.com/group/comp.lang.python/browse_frm/thread/dcd63ec13096a0f6/1b14640f3a4ad3dc?#1b14640f3a4ad3dc +# For some later history, see +# http://thread.gmane.org/gmane.comp.python.matplotlib.devel/7068 +import inspect +import random +import re +import sys +import types -# note we check for __doc__ is not None since py2exe optimize removes -# the docstrings +# import the local copy of matplotlib, not the installed one +sys.path.insert(0, './lib') +from matplotlib.axes import Axes +from matplotlib.cbook import dedent _fmtplot = """\ # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost -def %(func)s(*args, **kwargs): +def %(func)s(%(argspec)s): + %(docstring)s + %(ax)s = gca() # allow callers to override the hold state by passing hold=True|False - b = ishold() - h = kwargs.pop('hold', None) - if h is not None: - hold(h) + %(washold)s = %(ax)s.ishold() + %(sethold)s + if hold is not None: + %(ax)s.hold(hold) try: - ret = gca().%(func)s(*args, **kwargs) + %(ret)s = %(ax)s.%(func)s(%(call)s) draw_if_interactive() - except: - hold(b) - raise + finally: + %(ax)s.hold(%(washold)s) %(mappable)s - hold(b) - return ret -if Axes.%(func)s.__doc__ is not None: - %(func)s.__doc__ = dedent(Axes.%(func)s.__doc__) + \"\"\" - -Additional kwargs: hold = [True|False] overrides default hold state\"\"\" + return %(ret)s """ _fmtmisc = """\ # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost -def %(func)s(*args, **kwargs): - - ret = gca().%(func)s(*args, **kwargs) +def %(func)s(%(argspec)s): + %(docstring)s + %(ret)s = gca().%(func)s(%(call)s) draw_if_interactive() - return ret -if Axes.%(func)s.__doc__ is not None: - %(func)s.__doc__ = dedent(Axes.%(func)s.__doc__) + return %(ret)s """ # these methods are all simple wrappers of Axes methods by the same @@ -101,33 +104,113 @@ ) cmappable = { - 'contour' : 'if ret._A is not None: gci._current = ret', - 'contourf': 'if ret._A is not None: gci._current = ret', - 'hexbin' : 'gci._current = ret[0]', - 'scatter' : 'gci._current = ret', - 'pcolor' : 'gci._current = ret', - 'pcolormesh' : 'gci._current = ret', - 'imshow' : 'gci._current = ret', - 'spy' : 'gci._current = ret', - 'quiver' : 'gci._current = ret', - 'specgram' : 'gci._current = ret[-1]', + 'contour' : 'if %(ret)s._A is not None: gci._current = %(ret)s', + 'contourf': 'if %(ret)s._A is not None: gci._current = %(ret)s', + 'hexbin' : 'gci._current = %(ret)s', + 'scatter' : 'gci._current = %(ret)s', + 'pcolor' : 'gci._current = %(ret)s', + 'pcolormesh' : 'gci._current = %(ret)s', + 'imshow' : 'gci._current = %(ret)s', + 'spy' : 'gci._current = %(ret)s', + 'quiver' : 'gci._current = %(ret)s', + 'specgram' : 'gci._current = %(ret)s[-1]', } +def format_value(value): + """ + Format function default values as needed for inspect.formatargspec. + The interesting part is a hard-coded list of functions used + as defaults in pyplot methods. + """ + if isinstance(value, types.FunctionType): + if value.func_name in ('detrend_none', 'window_hanning'): + return '=mlab.' + value.func_name + if value.func_name == 'mean': + return '=np.' + value.func_name + raise ValueError, ('default value %s unknown to boilerplate.formatvalue' + % value) + return '='+repr(value) -for func in _plotcommands: - if func in cmappable: - mappable = cmappable[func] - else: - mappable = '' - print _fmtplot%locals() +def remove_final_whitespace(string): + """ + Return a copy of *string* with final whitespace removed from each line. + """ + return '\n'.join(x.rstrip() for x in string.split('\n')) +def make_docstring(cmd, mention_hold): + func = getattr(Axes, cmd) + docstring = inspect.getdoc(func) + if docstring is None: + return "" + escaped = re.sub(r'\\', r'\\\\', docstring) + if mention_hold: + escaped += ''' -for func in _misccommands: - print _fmtmisc%locals() +Additional kwargs: hold = [True|False] overrides default hold state +''' + return '"""'+escaped+'"""' +for fmt,cmdlist in (_fmtplot,_plotcommands),(_fmtmisc,_misccommands): + for func in cmdlist: + # For some commands, an additional line is needed to set the + # color map + if func in cmappable: + mappable = cmappable[func] % locals() + else: + mappable = '' + # Format docstring + docstring = make_docstring(func, fmt is _fmtplot) + # Get argspec of wrapped function + args, varargs, varkw, defaults = inspect.getargspec(getattr(Axes, func)) + args.pop(0) # remove 'self' argument + if defaults is None: + defaults = () + + # How to call the wrapped function + call = map(str, args) + if varargs is not None: + call.append('*'+varargs) + if varkw is not None: + call.append('**'+varkw) + call = ', '.join(call) + + # Add a hold keyword argument if needed (fmt is _fmtplot) and + # possible (if *args is used, we can't just add a hold + # argument in front of it since it would gobble one of the + # arguments the user means to pass via *args) + if varargs: + sethold = "hold = %(varkw)s.pop('hold', None)" % locals() + elif fmt is _fmtplot: + args.append('hold') + defaults = defaults + (None,) + sethold = '' + + # Now we can build the argspec for defining the wrapper + argspec = inspect.formatargspec(args, varargs, varkw, defaults, + formatvalue=format_value) + argspec = argspec[1:-1] # remove parens + + # A gensym-like facility in case some function takes an + # argument named washold, ax, or ret + washold,ret,ax = 'washold', 'ret', 'ax' + bad = set(args) | set((varargs, varkw)) + while washold in bad or ret in bad or ax in bad: + washold = 'washold' + str(random.randrange(10**12)) + ret = 'ret' + str(random.randrange(10**12)) + ax = 'ax' + str(random.randrange(10**12)) + + # Since we can't avoid using some function names, + # bail out if they are used as argument names + for reserved in ('gca', 'gci', 'draw_if_interactive'): + if reserved in bad: + raise ValueError, \ + 'Axes method %s has kwarg named %s' % (func, reserved) + + print remove_final_whitespace(fmt%locals()) + # define the colormap functions _fmtcmap = """\ # This function was autogenerated by boilerplate.py. Do not edit as Property changes on: branches/mathtex/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_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 /trunk/matplotlib/doc/pyplots/README:7265-7303 Property changes on: branches/mathtex/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_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 /trunk/matplotlib/doc/sphinxext/gen_gallery.py:7265-7303 Property changes on: branches/mathtex/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_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 /trunk/matplotlib/doc/sphinxext/gen_rst.py:7265-7303 Copied: branches/mathtex/examples/api/radar_chart.py (from rev 7303, trunk/matplotlib/examples/api/radar_chart.py) =================================================================== --- branches/mathtex/examples/api/radar_chart.py (rev 0) +++ branches/mathtex/examples/api/radar_chart.py 2009-07-29 17:14:05 UTC (rev 7306) @@ -0,0 +1,144 @@ +import numpy as np + +import matplotlib.pyplot as plt +from matplotlib.projections.polar import PolarAxes +from matplotlib.projections import register_projection + +def radar_factory(num_vars, frame='circle'): + """Create a radar chart with `num_vars` axes.""" + # calculate evenly-spaced axis angles + theta = 2*np.pi * np.linspace(0, 1-1./num_vars, num_vars) + # rotate theta such that the first axis is at the top + theta += np.pi/2 + + def draw_poly_frame(self, x0, y0, r): + # TODO: use transforms to convert (x, y) to (r, theta) + verts = [(r*np.cos(t) + x0, r*np.sin(t) + y0) for t in theta] + return plt.Polygon(verts, closed=True, edgecolor='k') + + def draw_circle_frame(self, x0, y0, r): + return plt.Circle((x0, y0), r) + + frame_dict = {'polygon': draw_poly_frame, 'circle': draw_circle_frame} + if frame not in frame_dict: + raise ValueError, 'unknown value for `frame`: %s' % frame + + class RadarAxes(PolarAxes): + """Class for creating a radar chart (a.k.a. a spider or star chart) + + http://en.wikipedia.org/wiki/Radar_chart + """ + name = 'radar' + # use 1 line segment to connect specified points + RESOLUTION = 1 + # define draw_frame method + draw_frame = frame_dict[frame] + + def fill(self, *args, **kwargs): + """Override fill so that line is closed by default""" + closed = kwargs.pop('closed', True) + return super(RadarAxes, self).fill(closed=closed, *args, **kwargs) + + def plot(self, *args, **kwargs): + """Override plot so that line is closed by default""" + lines = super(RadarAxes, self).plot(*args, **kwargs) + for line in lines: + self._close_line(line) + + def _close_line(self, line): + x, y = line.get_data() + # FIXME: markers at x[0], y[0] get doubled-up + if x[0] != x[-1]: + x = np.concatenate((x, [x[0]])) + y = np.concatenate((y, [y[0]])) + line.set_data(x, y) + + def set_varlabels(self, labels): + self.set_thetagrids(theta * 180/np.pi, labels) + + def _gen_axes_patch(self): + x0, y0 = (0.5, 0.5) + r = 0.5 + return self.draw_frame(x0, y0, r) + + register_projection(RadarAxes) + return theta + + +if __name__ == '__main__': + #The following data is from the Denver Aerosol Sources and Health study. + #See doi:10.1016/j.atmosenv.2008.12.017 + # + #The data are pollution source profile estimates for five modeled pollution + #sources (e.g., cars, wood-burning, etc) that emit 7-9 chemical species. + #The radar charts are experimented with here to see if we can nicely + #visualize how the modeled source profiles change across four scenarios: + # 1) No gas-phase species present, just seven particulate counts on + # Sulfate + # Nitrate + # Elemental Carbon (EC) + # Organic Carbon fraction 1 (OC) + # Organic Carbon fraction 2 (OC2) + # Organic Carbon fraction 3 (OC3) + # Pyrolized Organic Carbon (OP) + # 2)Inclusion of gas-phase specie carbon monoxide (CO) + # 3)Inclusion of gas-phase specie ozone (O3). + # 4)Inclusion of both gas-phase speciesis present... + N = 9 + theta = radar_factory(N) + spoke_labels = ['Sulfate', 'Nitrate', 'EC', 'OC1', 'OC2', 'OC3', 'OP', 'CO', + 'O3'] + f1_base = [0.88, 0.01, 0.03, 0.03, 0.00, 0.06, 0.01, 0.00, 0.00] + f1_CO = [0.88, 0.02, 0.02, 0.02, 0.00, 0.05, 0.00, 0.05, 0.00] + f1_O3 = [0.89, 0.01, 0.07, 0.00, 0.00, 0.05, 0.00, 0.00, 0.03] + f1_both = [0.87, 0.01, 0.08, 0.00, 0.00, 0.04, 0.00, 0.00, 0.01] + + f2_base = [0.07, 0.95, 0.04, 0.05, 0.00, 0.02, 0.01, 0.00, 0.00] + f2_CO = [0.08, 0.94, 0.04, 0.02, 0.00, 0.01, 0.12, 0.04, 0.00] + f2_O3 = [0.07, 0.95, 0.05, 0.04, 0.00, 0.02, 0.12, 0.00, 0.00] + f2_both = [0.09, 0.95, 0.02, 0.03, 0.00, 0.01, 0.13, 0.06, 0.00] + + f3_base = [0.01, 0.02, 0.85, 0.19, 0.05, 0.10, 0.00, 0.00, 0.00] + f3_CO = [0.01, 0.01, 0.79, 0.10, 0.00, 0.05, 0.00, 0.31, 0.00] + f3_O3 = [0.01, 0.02, 0.86, 0.27, 0.16, 0.19, 0.00, 0.00, 0.00] + f3_both = [0.01, 0.02, 0.71, 0.24, 0.13, 0.16, 0.00, 0.50, 0.00] + + f4_base = [0.02, 0.01, 0.07, 0.01, 0.21, 0.12, 0.98, 0.00, 0.00] + f4_CO = [0.00, 0.02, 0.03, 0.38, 0.31, 0.31, 0.00, 0.59, 0.00] + f4_O3 = [0.01, 0.03, 0.00, 0.32, 0.29, 0.27, 0.00, 0.00, 0.95] + f4_both = [0.01, 0.03, 0.00, 0.28, 0.24, 0.23, 0.00, 0.44, 0.88] + + f5_base = [0.01, 0.01, 0.02, 0.71, 0.74, 0.70, 0.00, 0.00, 0.00] + f5_CO = [0.02, 0.02, 0.11, 0.47, 0.69, 0.58, 0.88, 0.00, 0.00] + f5_O3 = [0.02, 0.00, 0.03, 0.37, 0.56, 0.47, 0.87, 0.00, 0.00] + f5_both = [0.02, 0.00, 0.18, 0.45, 0.64, 0.55, 0.86, 0.00, 0.16] + + fig = plt.figure(figsize=(9,9)) + # adjust spacing around the subplots + fig.subplots_adjust(wspace=0.25, hspace=0.20, top=0.85, bottom=0.05) + title_list = ['Basecase', 'With CO', 'With O3', 'CO & O3'] + data = {'Basecase': [f1_base, f2_base, f3_base, f4_base, f5_base], + 'With CO': [f1_CO, f2_CO, f3_CO, f4_CO, f5_CO], + 'With O3': [f1_O3, f2_O3, f3_O3, f4_O3, f5_O3], + 'CO & O3': [f1_both, f2_both, f3_both, f4_both, f5_both]} + colors = ['b', 'r', 'g', 'm', 'y'] + # chemicals range from 0 to 1 + radial_grid = [0.2, 0.4, 0.6, 0.8] + # If you don't care about the order, you can loop over data_dict.items() + for n, title in enumerate(title_list): + ax = fig.add_subplot(2, 2, n+1, projection='radar') + plt.rgrids(radial_grid) + ax.set_title(title, weight='bold', size='medium', position=(0.5, 1.1), + horizontalalignment='center', verticalalignment='center') + for d, color in zip(data[title], colors): + ax.plot(theta, d, color=color) + ax.fill(theta, d, facecolor=color, alpha=0.25) + ax.set_varlabels(spoke_labels) + # add legend relative to top-left plot + plt.subplot(2,2,1) + labels = ('Factor 1', 'Factor 2', 'Factor 3', 'Factor 4', 'Factor 5') + legend = plt.legend(labels, loc=(0.9, .95), labelspacing=0.1) + plt.setp(legend.get_texts(), fontsize='small') + plt.figtext(0.5, 0.965, '5-Factor Solution Profiles Across Four Scenarios', + ha='center', color='black', weight='bold', size='large') + plt.show() Property changes on: branches/mathtex/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_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 /trunk/matplotlib/examples/misc/multiprocess.py:7265-7303 Property changes on: branches/mathtex/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_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 /trunk/matplotlib/examples/mplot3d/contour3d_demo.py:7265-7303 Property changes on: branches/mathtex/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_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 /trunk/matplotlib/examples/mplot3d/contourf3d_demo.py:7265-7303 Copied: branches/mathtex/examples/mplot3d/hist3d_demo.py (from rev 7303, trunk/matplotlib/examples/mplot3d/hist3d_demo.py) =================================================================== --- branches/mathtex/examples/mplot3d/hist3d_demo.py (rev 0) +++ branches/mathtex/examples/mplot3d/hist3d_demo.py 2009-07-29 17:14:05 UTC (rev 7306) @@ -0,0 +1,27 @@ +from mpl_toolkits.mplot3d import Axes3D +from matplotlib.collections import PolyCollection +from matplotlib.colors import colorConverter +import pylab +import random +import numpy as np + +fig = pylab.figure() +ax = Axes3D(fig) +x = np.random.rand(100) * 4 +y = np.random.rand(100) * 4 +hist, xedges, yedges = np.histogram2d(x, y, bins=4) + +elements = (len(xedges) - 1) * (len(yedges) - 1) +xpos, ypos = np.meshgrid( + [xedges[i] + 0.25 for i in range(len(xedges) - 1)], + [yedges[i] + 0.25 for i in range(len(yedges) - 1)]) +xpos = xpos.flatten() +ypos = ypos.flatten() +zpos = [0] * elements +dx = [0.5] * elements +dy = [0.5] * elements +dz = hist.flatten() +ax.bar3d(xpos, ypos, zpos, dx, dy, dz, color='b') + +pylab.show() + Property changes on: branches/mathtex/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_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 /trunk/matplotlib/examples/mplot3d/polys3d_demo.py:7265-7303 Property changes on: branches/mathtex/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_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,7... [truncated message content] |
From: <evi...@us...> - 2009-07-29 21:29:05
|
Revision: 7307 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7307&view=rev Author: evilguru Date: 2009-07-29 21:28:50 +0000 (Wed, 29 Jul 2009) Log Message: ----------- Add first attempt at getting matplotlib to install mathtex. Modified Paths: -------------- branches/mathtex/setup.py branches/mathtex/setupext.py Modified: branches/mathtex/setup.py =================================================================== --- branches/mathtex/setup.py 2009-07-29 17:14:05 UTC (rev 7306) +++ branches/mathtex/setup.py 2009-07-29 21:28:50 UTC (rev 7307) @@ -42,7 +42,8 @@ check_for_qt, check_for_qt4, check_for_cairo, \ check_provide_pytz, check_provide_dateutil,\ check_for_dvipng, check_for_ghostscript, check_for_latex, \ - check_for_pdftops, check_for_datetime, options, build_png + check_for_pdftops, check_for_datetime, options, build_png, \ + check_provide_mathtex, build_mathtex #import distutils.sysconfig # jdh @@ -128,6 +129,9 @@ if has_libpng and options['build_agg'] or options['build_image']: build_png(ext_modules, packages) +if has_libpng and options['provide_mathtex'] and check_provide_mathtex(): + build_mathtex(ext_modules, packages, package_data) + if options['build_windowing'] and sys.platform=='win32': build_windowing(ext_modules, packages) Modified: branches/mathtex/setupext.py =================================================================== --- branches/mathtex/setupext.py 2009-07-29 17:14:05 UTC (rev 7306) +++ branches/mathtex/setupext.py 2009-07-29 21:28:50 UTC (rev 7307) @@ -98,6 +98,7 @@ 'verbose': False, 'provide_pytz': 'auto', 'provide_dateutil': 'auto', + 'provide_mathtex' : 'auto', 'build_agg': True, 'build_gtk': 'auto', 'build_gtkagg': 'auto', @@ -126,6 +127,10 @@ "dateutil") except: options['provide_dateutil'] = 'auto' + try: options['provide_mathtex'] = config.getboolean("provide_packages", + "mathtex") + except: options['provide_mathtex'] = 'auto' + try: options['build_gtk'] = config.getboolean("gui_support", "gtk") except: options['build_gtk'] = 'auto' @@ -386,6 +391,14 @@ print_status("datetime", "present, version unknown") return True +def check_provide_mathtex(): + try: + import mathtex + except ImportError: + print_status("mathtex", "matplotlib will provide") + return True + return False + def check_provide_pytz(hasdatetime=True): if hasdatetime and (options['provide_pytz'] is True): print_status("pytz", "matplotlib will provide") @@ -545,7 +558,7 @@ else: add_base_flags(module) module.libraries.append('z') - + # put this last for library link order module.libraries.extend(std_libs) @@ -1092,6 +1105,11 @@ ext_modules.append(module) BUILT_FT2FONT = True +def build_mathtex(ext_modules, packages, package_data): + packages.append('mathtex/mathtex') + packages.append('mathtex/mathtex.backends') + package_data['mathtex'] = ['lib/mathtex/data/fonts/*.ttf'] + def build_ttconv(ext_modules, packages): global BUILT_TTCONV if BUILT_TTCONV: return # only build it if you you haven't already This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <evi...@us...> - 2009-07-30 21:50:20
|
Revision: 7310 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7310&view=rev Author: evilguru Date: 2009-07-30 21:50:10 +0000 (Thu, 30 Jul 2009) Log Message: ----------- Revert r7307 to the mathtex branch after a dicussion on the mailing list. Modified Paths: -------------- branches/mathtex/setup.py branches/mathtex/setupext.py Modified: branches/mathtex/setup.py =================================================================== --- branches/mathtex/setup.py 2009-07-30 19:32:15 UTC (rev 7309) +++ branches/mathtex/setup.py 2009-07-30 21:50:10 UTC (rev 7310) @@ -42,8 +42,7 @@ check_for_qt, check_for_qt4, check_for_cairo, \ check_provide_pytz, check_provide_dateutil,\ check_for_dvipng, check_for_ghostscript, check_for_latex, \ - check_for_pdftops, check_for_datetime, options, build_png, \ - check_provide_mathtex, build_mathtex + check_for_pdftops, check_for_datetime, options, build_png #import distutils.sysconfig # jdh @@ -129,9 +128,6 @@ if has_libpng and options['build_agg'] or options['build_image']: build_png(ext_modules, packages) -if has_libpng and options['provide_mathtex'] and check_provide_mathtex(): - build_mathtex(ext_modules, packages, package_data) - if options['build_windowing'] and sys.platform=='win32': build_windowing(ext_modules, packages) Modified: branches/mathtex/setupext.py =================================================================== --- branches/mathtex/setupext.py 2009-07-30 19:32:15 UTC (rev 7309) +++ branches/mathtex/setupext.py 2009-07-30 21:50:10 UTC (rev 7310) @@ -98,7 +98,6 @@ 'verbose': False, 'provide_pytz': 'auto', 'provide_dateutil': 'auto', - 'provide_mathtex' : 'auto', 'build_agg': True, 'build_gtk': 'auto', 'build_gtkagg': 'auto', @@ -127,10 +126,6 @@ "dateutil") except: options['provide_dateutil'] = 'auto' - try: options['provide_mathtex'] = config.getboolean("provide_packages", - "mathtex") - except: options['provide_mathtex'] = 'auto' - try: options['build_gtk'] = config.getboolean("gui_support", "gtk") except: options['build_gtk'] = 'auto' @@ -391,14 +386,6 @@ print_status("datetime", "present, version unknown") return True -def check_provide_mathtex(): - try: - import mathtex - except ImportError: - print_status("mathtex", "matplotlib will provide") - return True - return False - def check_provide_pytz(hasdatetime=True): if hasdatetime and (options['provide_pytz'] is True): print_status("pytz", "matplotlib will provide") @@ -558,7 +545,7 @@ else: add_base_flags(module) module.libraries.append('z') - + # put this last for library link order module.libraries.extend(std_libs) @@ -1105,11 +1092,6 @@ ext_modules.append(module) BUILT_FT2FONT = True -def build_mathtex(ext_modules, packages, package_data): - packages.append('mathtex/mathtex') - packages.append('mathtex/mathtex.backends') - package_data['mathtex'] = ['lib/mathtex/data/fonts/*.ttf'] - def build_ttconv(ext_modules, packages): global BUILT_TTCONV if BUILT_TTCONV: return # only build it if you you haven't already This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <evi...@us...> - 2009-08-03 16:32:49
|
Revision: 7333 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7333&view=rev Author: evilguru Date: 2009-08-03 16:32:38 +0000 (Mon, 03 Aug 2009) Log Message: ----------- Update the mathtex branch so that it includes the latest fixes from trunk. Modified Paths: -------------- branches/mathtex/CHANGELOG branches/mathtex/doc/_templates/indexsidebar.html branches/mathtex/doc/api/api_changes.rst branches/mathtex/doc/devel/coding_guide.rst branches/mathtex/doc/mpl_toolkits/mplot3d/api.rst branches/mathtex/doc/users/toolkits.rst branches/mathtex/examples/pylab_examples/custom_cmap.py branches/mathtex/examples/pylab_examples/log_demo.py branches/mathtex/examples/tests/backend_driver.py branches/mathtex/lib/matplotlib/__init__.py branches/mathtex/lib/matplotlib/_cm.py branches/mathtex/lib/matplotlib/axes.py branches/mathtex/lib/matplotlib/cm.py branches/mathtex/lib/matplotlib/figure.py branches/mathtex/lib/matplotlib/image.py branches/mathtex/lib/matplotlib/legend.py branches/mathtex/lib/matplotlib/offsetbox.py branches/mathtex/lib/matplotlib/projections/polar.py branches/mathtex/lib/matplotlib/pyplot.py Property Changed: ---------------- branches/mathtex/ branches/mathtex/doc/pyplots/README branches/mathtex/doc/sphinxext/gen_gallery.py branches/mathtex/doc/sphinxext/gen_rst.py branches/mathtex/examples/misc/multiprocess.py branches/mathtex/examples/mplot3d/contour3d_demo.py branches/mathtex/examples/mplot3d/contourf3d_demo.py branches/mathtex/examples/mplot3d/polys3d_demo.py branches/mathtex/examples/mplot3d/scatter3d_demo.py branches/mathtex/examples/mplot3d/surface3d_demo.py branches/mathtex/examples/mplot3d/wire3d_demo.py branches/mathtex/lib/matplotlib/sphinxext/mathmpl.py branches/mathtex/lib/matplotlib/sphinxext/only_directives.py branches/mathtex/lib/matplotlib/sphinxext/plot_directive.py Property changes on: branches/mathtex ___________________________________________________________________ Modified: svnmerge-integrated - /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7253 /trunk/matplotlib:1-7305 + /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7253 /trunk/matplotlib:1-7332 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 /trunk/matplotlib:7265-7303 + /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 /trunk/matplotlib:7265-7303,7308-7317,7321 Modified: branches/mathtex/CHANGELOG =================================================================== --- branches/mathtex/CHANGELOG 2009-08-03 12:21:30 UTC (rev 7332) +++ branches/mathtex/CHANGELOG 2009-08-03 16:32:38 UTC (rev 7333) @@ -1,3 +1,11 @@ +====================================================================== + +2009-07-31 Tagging 0.99.0.rc1 at 7314 - MGD + +2009-07-30 Add set_cmap and register_cmap, and improve get_cmap, + to provide convenient handling of user-generated + colormaps. Reorganized _cm and cm modules. - EF + 2009-07-28 Quiver speed improved, thanks to tip by Ray Speth. -EF 2009-07-27 Simplify argument handling code for plot method. -EF @@ -4417,4 +4425,3 @@ 2003-11-21 - make a dash-dot dict for the GC 2003-12-15 - fix install path bug -t Modified: branches/mathtex/doc/_templates/indexsidebar.html =================================================================== --- branches/mathtex/doc/_templates/indexsidebar.html 2009-08-03 12:21:30 UTC (rev 7332) +++ branches/mathtex/doc/_templates/indexsidebar.html 2009-08-03 16:32:38 UTC (rev 7333) @@ -1,19 +1,13 @@ <h3>News</h3> + <p>Please <a href="http://sourceforge.net/project/project_donations.php?group_id=80706">donate</a> to support matplotlib development.</p> + <p>Watch a <a href="http://videolectures.net/mloss08_hunter_mat">video lecture</a> about matplotlib presented at <a href="http://videolectures.net/mloss08_whistler">NIPS 08 Workshop</a> <i>Machine Learning Open Source Software</i></a>. </p> -<p>Nominate matplotlib for a community choice award by clicking the -image below -- suggested category "Best Project for Academia" for -software which "helps you hit the books, analyze global trends, or -just understand the world a little bit better than you did before": -<a href="http://sourceforge.net/community/cca09/nominate/?project_name=matplotlib&project_url=http://sourceforge.net/projects/matplotlib/"><img src="http://sourceforge.net/images/cca/cca_nominate.png" border="0"/></a> -</p> - - <h3>Download</h3> <p>Current version: <b>{{ version }}</b></p> Modified: branches/mathtex/doc/api/api_changes.rst =================================================================== --- branches/mathtex/doc/api/api_changes.rst 2009-08-03 12:21:30 UTC (rev 7332) +++ branches/mathtex/doc/api/api_changes.rst 2009-08-03 16:32:38 UTC (rev 7333) @@ -21,6 +21,11 @@ Changes beyond 0.98.x ===================== +* User-generated colormaps can now be added to the set recognized + by :func:`matplotlib.cm.get_cmap`. Colormaps can be made the + default and applied to the current image using + :func:`matplotlib.pyplot.set_cmap`. + * changed use_mrecords default to False in mlab.csv2rec since this is partially broken Modified: branches/mathtex/doc/devel/coding_guide.rst =================================================================== --- branches/mathtex/doc/devel/coding_guide.rst 2009-08-03 12:21:30 UTC (rev 7332) +++ branches/mathtex/doc/devel/coding_guide.rst 2009-08-03 16:32:38 UTC (rev 7333) @@ -27,12 +27,12 @@ Branch checkouts, eg the maintenance branch:: svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/\ - v0_91_maint mpl91 --username=youruser --password=yourpass + v0_99_maint mpl99 --username=youruser --password=yourpass -The current release of the trunk is in the 0.98.5 maintenance branch:: +The current release of the trunk is in the 0.99.x maintenance branch:: svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/\ - v0_98_5_maint mpl98.5 --username=youruser --password=yourpass + v0_99_maint mpl99 --username=youruser --password=yourpass Committing changes @@ -96,7 +96,7 @@ svnmerge.py merge -S BRANCHNAME Where BRANCHNAME is the name of the branch to merge *from*, - e.g. v0_98_5_maint. + e.g. v0_99_maint. If you wish to merge only specific revisions (in an unusual situation), do:: @@ -130,17 +130,17 @@ with this. * Creating a new branch from the trunk (if the release version is - 0.98.5 at revision 6573):: + 0.99 at revision 6573):: > svn copy \ - https://matplotlib.svn.sf.net/svnroot/matplotlib/trunk/matplotlib@6573 \ - https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_98_5_maint \ - -m "Creating maintenance branch for 0.98.5" + https://matplotlib.svn.sf.net/svnroot/matplotlib/trunk/matplotlib@7315 \ + https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_99_maint \ + -m "Creating maintenance branch for 0.99" * You can add a new branch for the trunk to "track" using "svnmerge.py init", e.g., from a working copy of the trunk:: - > svnmerge.py init https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_5_maint + > svnmerge.py init https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_99_maint property 'svnmerge-integrated' set on '.' After doing a "svn commit" on this, this merge tracking is available @@ -150,7 +150,7 @@ * Tracking can later be removed with the "svnmerge.py uninit" command, e.g.:: - > svnmerge.py -S v0_9_5_maint uninit + > svnmerge.py -S v0_99_maint uninit .. _using-git: Modified: branches/mathtex/doc/mpl_toolkits/mplot3d/api.rst =================================================================== --- branches/mathtex/doc/mpl_toolkits/mplot3d/api.rst 2009-08-03 12:21:30 UTC (rev 7332) +++ branches/mathtex/doc/mpl_toolkits/mplot3d/api.rst 2009-08-03 16:32:38 UTC (rev 7333) @@ -7,7 +7,6 @@ .. automodule:: mpl_toolkits.mplot3d.axes3d :members: - :exclude-members: contour3D, contourf3D, plot3D, scatter3D :show-inheritance: :mod:`mpl_toolkits.mplot3d.art3d` Property changes on: branches/mathtex/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 /trunk/matplotlib/doc/pyplots/README:7265-7303 + /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 /trunk/matplotlib/doc/pyplots/README:7265-7303,7308-7317,7321 Property changes on: branches/mathtex/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 /trunk/matplotlib/doc/sphinxext/gen_gallery.py:7265-7303 + /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 /trunk/matplotlib/doc/sphinxext/gen_gallery.py:7265-7303,7308-7317,7321 Property changes on: branches/mathtex/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 /trunk/matplotlib/doc/sphinxext/gen_rst.py:7265-7303 + /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 /trunk/matplotlib/doc/sphinxext/gen_rst.py:7265-7303,7308-7317,7321 Modified: branches/mathtex/doc/users/toolkits.rst =================================================================== --- branches/mathtex/doc/users/toolkits.rst 2009-08-03 12:21:30 UTC (rev 7332) +++ branches/mathtex/doc/users/toolkits.rst 2009-08-03 16:32:38 UTC (rev 7333) @@ -66,5 +66,5 @@ distributed with matplotlib source. .. image:: ../_static/demo_axes_grid.png - + See :ref:`toolkit_axesgrid-index` for documentations. Property changes on: branches/mathtex/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 /trunk/matplotlib/examples/misc/multiprocess.py:7265-7303 + /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 /trunk/matplotlib/examples/misc/multiprocess.py:7265-7303,7308-7317,7321 Property changes on: branches/mathtex/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 /trunk/matplotlib/examples/mplot3d/contour3d_demo.py:7265-7303 + /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 /trunk/matplotlib/examples/mplot3d/contour3d_demo.py:7265-7303,7308-7317,7321 Property changes on: branches/mathtex/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 /trunk/matplotlib/examples/mplot3d/contourf3d_demo.py:7265-7303 + /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 /trunk/matplotlib/examples/mplot3d/contourf3d_demo.py:7265-7303,7308-7317,7321 Property changes on: branches/mathtex/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 /trunk/matplotlib/examples/mplot3d/polys3d_demo.py:7265-7303 + /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 /trunk/matplotlib/examples/mplot3d/polys3d_demo.py:7265-7303,7308-7317,7321 Property changes on: branches/mathtex/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 /trunk/matplotlib/examples/mplot3d/scatter3d_demo.py:7265-7303 + /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 /trunk/matplotlib/examples/mplot3d/scatter3d_demo.py:7265-7303,7308-7317,7321 Property changes on: branches/mathtex/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 /trunk/matplotlib/examples/mplot3d/surface3d_demo.py:7265-7303 + /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 /trunk/matplotlib/examples/mplot3d/surface3d_demo.py:7265-7303,7308-7317,7321 Property changes on: branches/mathtex/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 /trunk/matplotlib/examples/mplot3d/wire3d_demo.py:7265-7303 + /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 /trunk/matplotlib/examples/mplot3d/wire3d_demo.py:7265-7303,7308-7317,7321 Modified: branches/mathtex/examples/pylab_examples/custom_cmap.py =================================================================== --- branches/mathtex/examples/pylab_examples/custom_cmap.py 2009-08-03 12:21:30 UTC (rev 7332) +++ branches/mathtex/examples/pylab_examples/custom_cmap.py 2009-08-03 16:32:38 UTC (rev 7333) @@ -103,11 +103,25 @@ (1.0, 0.0, 0.0)) } +# Now we will use this example to illustrate 3 ways of +# handling custom colormaps. +# First, the most direct and explicit: blue_red1 = LinearSegmentedColormap('BlueRed1', cdict1) + +# Second, create the map explicitly and register it. +# Like the first method, this method works with any kind +# of Colormap, not just +# a LinearSegmentedColormap: + blue_red2 = LinearSegmentedColormap('BlueRed2', cdict2) -blue_red3 = LinearSegmentedColormap('BlueRed3', cdict3) +plt.register_cmap(cmap=blue_red2) +# Third, for LinearSegmentedColormap only, +# leave everything to register_cmap: + +plt.register_cmap(name='BlueRed3', data=cdict3) # optional lut kwarg + x = np.arange(0, np.pi, 0.1) y = np.arange(0, 2*np.pi, 0.1) X, Y = np.meshgrid(x,y) @@ -121,13 +135,33 @@ plt.colorbar() plt.subplot(1,3,2) -plt.imshow(Z, interpolation='nearest', cmap=blue_red2) +cmap = plt.get_cmap('BlueRed2') +plt.imshow(Z, interpolation='nearest', cmap=cmap) plt.colorbar() +# Now we will set the third cmap as the default. One would +# not normally do this in the middle of a script like this; +# it is done here just to illustrate the method. + +plt.rcParams['image.cmap'] = 'BlueRed3' + +# Also see below for an alternative, particularly for +# interactive use. + plt.subplot(1,3,3) -plt.imshow(Z, interpolation='nearest', cmap=blue_red3) +plt.imshow(Z, interpolation='nearest') plt.colorbar() +# Or as yet another variation, we could replace the rcParams +# specification *before* the imshow with the following *after* +# imshow: +# +# plt.set_cmap('BlueRed3') +# +# This sets the new default *and* sets the colormap of the last +# image-like item plotted via pyplot, if any. + + plt.suptitle('Custom Blue-Red colormaps') plt.show() Modified: branches/mathtex/examples/pylab_examples/log_demo.py =================================================================== --- branches/mathtex/examples/pylab_examples/log_demo.py 2009-08-03 12:21:30 UTC (rev 7332) +++ branches/mathtex/examples/pylab_examples/log_demo.py 2009-08-03 16:32:38 UTC (rev 7333) @@ -19,7 +19,7 @@ # log x and y axis plt.subplot(223) -plt.loglog(t, 20*np.exp(-t/10.0), basex=4) +plt.loglog(t, 20*np.exp(-t/10.0), basex=2) plt.grid(True) plt.title('loglog base 4 on x') Modified: branches/mathtex/examples/tests/backend_driver.py =================================================================== --- branches/mathtex/examples/tests/backend_driver.py 2009-08-03 12:21:30 UTC (rev 7332) +++ branches/mathtex/examples/tests/backend_driver.py 2009-08-03 16:32:38 UTC (rev 7333) @@ -336,7 +336,6 @@ for fullpath in testcases: print ('\tdriving %-40s' % (fullpath)), sys.stdout.flush() - fpath, fname = os.path.split(fullpath) if fname in exclude: @@ -392,7 +391,8 @@ doc = __doc__.split('\n\n') op = OptionParser(description=doc[0].strip(), usage='%prog [options] [--] [backends and switches]', - epilog='\n'.join(doc[1:])) + #epilog='\n'.join(doc[1:]) # epilog not supported on my python2.4 machine: JDH + ) op.disable_interspersed_args() op.set_defaults(dirs='pylab,api,units,mplot3d', clean=False, coverage=False, valgrind=False) Modified: branches/mathtex/lib/matplotlib/__init__.py =================================================================== --- branches/mathtex/lib/matplotlib/__init__.py 2009-08-03 12:21:30 UTC (rev 7332) +++ branches/mathtex/lib/matplotlib/__init__.py 2009-08-03 16:32:38 UTC (rev 7333) @@ -89,7 +89,7 @@ """ from __future__ import generators -__version__ = '0.98.6svn' +__version__ = '0.99.0.rc1' __revision__ = '$Revision$' __date__ = '$Date$' Modified: branches/mathtex/lib/matplotlib/_cm.py =================================================================== --- branches/mathtex/lib/matplotlib/_cm.py 2009-08-03 12:21:30 UTC (rev 7332) +++ branches/mathtex/lib/matplotlib/_cm.py 2009-08-03 16:32:38 UTC (rev 7333) @@ -1,25 +1,15 @@ """ -Color data and pre-defined cmap objects. +Nothing here but dictionaries for generating LinearSegmentedColormaps, +and a dictionary of these dictionaries. -This is a helper for cm.py, originally part of that file. -Separating the data (this file) from cm.py makes both easier -to deal with. - -Objects visible in cm.py are the individual cmap objects ('autumn', -etc.) and a dictionary, 'datad', including all of these objects. """ -import matplotlib as mpl -import matplotlib.colors as colors -LUTSIZE = mpl.rcParams['image.lut'] - _binary_data = { 'red' : ((0., 1., 1.), (1., 0., 0.)), 'green': ((0., 1., 1.), (1., 0., 0.)), 'blue' : ((0., 1., 1.), (1., 0., 0.)) } - _bone_data = {'red': ((0., 0., 0.),(1.0, 1.0, 1.0)), 'green': ((0., 0., 0.),(1.0, 1.0, 1.0)), 'blue': ((0., 0., 0.),(1.0, 1.0, 1.0))} @@ -379,44 +369,6 @@ (1.0, 0.80, 0.80)]} -autumn = colors.LinearSegmentedColormap('autumn', _autumn_data, LUTSIZE) -bone = colors.LinearSegmentedColormap('bone ', _bone_data, LUTSIZE) -binary = colors.LinearSegmentedColormap('binary ', _binary_data, LUTSIZE) -cool = colors.LinearSegmentedColormap('cool', _cool_data, LUTSIZE) -copper = colors.LinearSegmentedColormap('copper', _copper_data, LUTSIZE) -flag = colors.LinearSegmentedColormap('flag', _flag_data, LUTSIZE) -gray = colors.LinearSegmentedColormap('gray', _gray_data, LUTSIZE) -hot = colors.LinearSegmentedColormap('hot', _hot_data, LUTSIZE) -hsv = colors.LinearSegmentedColormap('hsv', _hsv_data, LUTSIZE) -jet = colors.LinearSegmentedColormap('jet', _jet_data, LUTSIZE) -pink = colors.LinearSegmentedColormap('pink', _pink_data, LUTSIZE) -prism = colors.LinearSegmentedColormap('prism', _prism_data, LUTSIZE) -spring = colors.LinearSegmentedColormap('spring', _spring_data, LUTSIZE) -summer = colors.LinearSegmentedColormap('summer', _summer_data, LUTSIZE) -winter = colors.LinearSegmentedColormap('winter', _winter_data, LUTSIZE) -spectral = colors.LinearSegmentedColormap('spectral', _spectral_data, LUTSIZE) - - - -datad = { - 'autumn': _autumn_data, - 'bone': _bone_data, - 'binary': _binary_data, - 'cool': _cool_data, - 'copper': _copper_data, - 'flag': _flag_data, - 'gray' : _gray_data, - 'hot': _hot_data, - 'hsv': _hsv_data, - 'jet' : _jet_data, - 'pink': _pink_data, - 'prism': _prism_data, - 'spring': _spring_data, - 'summer': _summer_data, - 'winter': _winter_data, - 'spectral': _spectral_data - } - # 34 colormaps based on color specifications and designs # developed by Cynthia Brewer (http://colorbrewer.org). # The ColorBrewer palettes have been included under the terms @@ -5859,48 +5811,26 @@ 0.0078431377187371254, 0.0078431377187371254), (1.0, 0.0039215688593685627, 0.0039215688593685627)]} -Accent = colors.LinearSegmentedColormap('Accent', _Accent_data, LUTSIZE) -Blues = colors.LinearSegmentedColormap('Blues', _Blues_data, LUTSIZE) -BrBG = colors.LinearSegmentedColormap('BrBG', _BrBG_data, LUTSIZE) -BuGn = colors.LinearSegmentedColormap('BuGn', _BuGn_data, LUTSIZE) -BuPu = colors.LinearSegmentedColormap('BuPu', _BuPu_data, LUTSIZE) -Dark2 = colors.LinearSegmentedColormap('Dark2', _Dark2_data, LUTSIZE) -GnBu = colors.LinearSegmentedColormap('GnBu', _GnBu_data, LUTSIZE) -Greens = colors.LinearSegmentedColormap('Greens', _Greens_data, LUTSIZE) -Greys = colors.LinearSegmentedColormap('Greys', _Greys_data, LUTSIZE) -Oranges = colors.LinearSegmentedColormap('Oranges', _Oranges_data, LUTSIZE) -OrRd = colors.LinearSegmentedColormap('OrRd', _OrRd_data, LUTSIZE) -Paired = colors.LinearSegmentedColormap('Paired', _Paired_data, LUTSIZE) -Pastel1 = colors.LinearSegmentedColormap('Pastel1', _Pastel1_data, LUTSIZE) -Pastel2 = colors.LinearSegmentedColormap('Pastel2', _Pastel2_... [truncated message content] |
From: <md...@us...> - 2009-08-04 13:11:43
|
Revision: 7344 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7344&view=rev Author: mdboom Date: 2009-08-04 13:11:35 +0000 (Tue, 04 Aug 2009) Log Message: ----------- Build mathtex as part of matplotlib's build Modified Paths: -------------- branches/mathtex/setup.py branches/mathtex/setupext.py Modified: branches/mathtex/setup.py =================================================================== --- branches/mathtex/setup.py 2009-08-04 11:50:09 UTC (rev 7343) +++ branches/mathtex/setup.py 2009-08-04 13:11:35 UTC (rev 7344) @@ -42,7 +42,8 @@ check_for_qt, check_for_qt4, check_for_cairo, \ check_provide_pytz, check_provide_dateutil,\ check_for_dvipng, check_for_ghostscript, check_for_latex, \ - check_for_pdftops, check_for_datetime, options, build_png + check_for_pdftops, check_for_datetime, options, build_png, \ + check_for_mathtex #import distutils.sysconfig # jdh @@ -64,6 +65,7 @@ 'matplotlib.numerix.fft', ] +package_dir = {'': 'lib'} py_modules = ['pylab'] @@ -214,6 +216,11 @@ print 'adding pytz' if provide_dateutil: add_dateutil() +# Add installation of mathtex +if not check_for_mathtex(): + package_dir['mathtex'] = 'lib/mathtex/mathtex' + packages.append('mathtex') + print_raw("") print_raw("OPTIONAL USETEX DEPENDENCIES") check_for_dvipng() @@ -243,6 +250,7 @@ if options['verbose']: mod.extra_compile_args.append('-DVERBOSE') + print 'pymods', py_modules print 'packages', packages distrib = setup(name="matplotlib", @@ -262,7 +270,7 @@ platforms='any', py_modules = py_modules, ext_modules = ext_modules, - package_dir = {'': 'lib'}, + package_dir = package_dir, package_data = package_data, **additional_params ) Modified: branches/mathtex/setupext.py =================================================================== --- branches/mathtex/setupext.py 2009-08-04 11:50:09 UTC (rev 7343) +++ branches/mathtex/setupext.py 2009-08-04 13:11:35 UTC (rev 7344) @@ -106,7 +106,8 @@ 'build_macosx': 'auto', 'build_image': True, 'build_windowing': True, - 'backend': None} + 'backend': None, + 'provide_mathtex': True} # Based on the contents of setup.cfg, determine the build options if os.path.exists("setup.cfg"): @@ -144,6 +145,8 @@ try: options['backend'] = config.get("rc_options", "backend") except: pass + try: options['provide_mathtex'] = config.getboolean("provide_packages", "mathtex") + except: options['provide_mathtex'] = True if options['display_status']: def print_line(char='='): @@ -545,7 +548,7 @@ else: add_base_flags(module) module.libraries.append('z') - + # put this last for library link order module.libraries.extend(std_libs) @@ -1376,3 +1379,17 @@ BUILT_GDK = True +def check_for_mathtex(): + if options['provide_mathtex'] is True: + print_status("mathtex", "matplotlib will provide") + return False + try: + import mathtex + except ImportError: + print_status("mathtex", "no") + return False + else: + from mathtex import __version__ + print_status("mathtex", "present, version %s" % __version__) + return True + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <evi...@us...> - 2009-08-12 23:30:23
|
Revision: 7479 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7479&view=rev Author: evilguru Date: 2009-08-12 23:30:13 +0000 (Wed, 12 Aug 2009) Log Message: ----------- Backport recent changes in trunk to the mathtex branch. Modified Paths: -------------- branches/mathtex/CHANGELOG branches/mathtex/boilerplate.py branches/mathtex/doc/_templates/index.html branches/mathtex/doc/_templates/indexsidebar.html branches/mathtex/doc/api/api_changes.rst branches/mathtex/doc/api/spine_api.rst branches/mathtex/doc/devel/coding_guide.rst branches/mathtex/doc/faq/installing_faq.rst branches/mathtex/doc/pyplots/plotmap.py branches/mathtex/doc/users/annotations.rst branches/mathtex/doc/users/artists.rst branches/mathtex/doc/users/credits.rst branches/mathtex/doc/users/event_handling.rst branches/mathtex/doc/users/installing.rst branches/mathtex/doc/users/plotting.rst branches/mathtex/doc/users/pyplot_tutorial.rst branches/mathtex/doc/users/screenshots.rst branches/mathtex/doc/users/whats_new.rst branches/mathtex/examples/api/date_demo.py branches/mathtex/examples/api/date_index_formatter.py branches/mathtex/examples/api/watermark_image.py branches/mathtex/examples/axes_grid/demo_axes_divider.py branches/mathtex/examples/axes_grid/demo_axes_grid.py branches/mathtex/examples/axes_grid/inset_locator_demo2.py branches/mathtex/examples/axes_grid/simple_axesgrid2.py branches/mathtex/examples/axes_grid/simple_rgb.py branches/mathtex/examples/misc/rec_groupby_demo.py branches/mathtex/examples/misc/rec_join_demo.py branches/mathtex/examples/mplot3d/2dcollections3d_demo.py branches/mathtex/examples/mplot3d/bars3d_demo.py branches/mathtex/examples/mplot3d/contour3d_demo.py branches/mathtex/examples/mplot3d/contour3d_demo2.py branches/mathtex/examples/mplot3d/contourf3d_demo.py branches/mathtex/examples/mplot3d/hist3d_demo.py branches/mathtex/examples/mplot3d/lines3d_demo.py branches/mathtex/examples/mplot3d/polys3d_demo.py branches/mathtex/examples/mplot3d/scatter3d_demo.py branches/mathtex/examples/mplot3d/surface3d_demo.py branches/mathtex/examples/mplot3d/surface3d_demo2.py branches/mathtex/examples/mplot3d/text3d_demo.py branches/mathtex/examples/mplot3d/wire3d_demo.py branches/mathtex/examples/pylab_examples/centered_ticklabels.py branches/mathtex/examples/pylab_examples/contourf_demo.py branches/mathtex/examples/pylab_examples/data_helper.py branches/mathtex/examples/pylab_examples/date_index_formatter.py branches/mathtex/examples/pylab_examples/image_demo2.py branches/mathtex/examples/pylab_examples/image_demo3.py branches/mathtex/examples/pylab_examples/load_converter.py branches/mathtex/examples/pylab_examples/loadrec.py branches/mathtex/examples/pylab_examples/logo.py branches/mathtex/examples/pylab_examples/mri_demo.py branches/mathtex/examples/pylab_examples/mri_with_eeg.py branches/mathtex/examples/pylab_examples/plotfile_demo.py branches/mathtex/examples/pylab_examples/quadmesh_demo.py branches/mathtex/examples/pylab_examples/scatter_demo2.py branches/mathtex/examples/tests/backend_driver.py branches/mathtex/examples/user_interfaces/embedding_in_wx3.py branches/mathtex/examples/user_interfaces/rec_edit_gtk_custom.py branches/mathtex/examples/user_interfaces/rec_edit_gtk_simple.py branches/mathtex/lib/matplotlib/__init__.py branches/mathtex/lib/matplotlib/axes.py branches/mathtex/lib/matplotlib/backend_bases.py branches/mathtex/lib/matplotlib/backends/backend_agg.py branches/mathtex/lib/matplotlib/backends/backend_cairo.py branches/mathtex/lib/matplotlib/backends/backend_gdk.py branches/mathtex/lib/matplotlib/backends/backend_gtk.py branches/mathtex/lib/matplotlib/backends/backend_macosx.py branches/mathtex/lib/matplotlib/backends/backend_mixed.py branches/mathtex/lib/matplotlib/backends/backend_pdf.py branches/mathtex/lib/matplotlib/backends/backend_ps.py branches/mathtex/lib/matplotlib/backends/backend_svg.py branches/mathtex/lib/matplotlib/backends/backend_template.py branches/mathtex/lib/matplotlib/backends/backend_wx.py branches/mathtex/lib/matplotlib/bezier.py branches/mathtex/lib/matplotlib/cbook.py branches/mathtex/lib/matplotlib/collections.py branches/mathtex/lib/matplotlib/colors.py branches/mathtex/lib/matplotlib/contour.py branches/mathtex/lib/matplotlib/figure.py branches/mathtex/lib/matplotlib/font_manager.py branches/mathtex/lib/matplotlib/image.py branches/mathtex/lib/matplotlib/legend.py branches/mathtex/lib/matplotlib/mlab.py branches/mathtex/lib/matplotlib/offsetbox.py branches/mathtex/lib/matplotlib/patches.py branches/mathtex/lib/matplotlib/path.py branches/mathtex/lib/matplotlib/pylab.py branches/mathtex/lib/matplotlib/pyplot.py branches/mathtex/lib/matplotlib/texmanager.py branches/mathtex/lib/matplotlib/text.py branches/mathtex/lib/mpl_toolkits/axes_grid/anchored_artists.py branches/mathtex/lib/mpl_toolkits/axes_grid/angle_helper.py branches/mathtex/lib/mpl_toolkits/axes_grid/axes_divider.py branches/mathtex/lib/mpl_toolkits/mplot3d/art3d.py branches/mathtex/lib/mpl_toolkits/mplot3d/axes3d.py branches/mathtex/lib/mpl_toolkits/mplot3d/axis3d.py branches/mathtex/lib/mpl_toolkits/mplot3d/proj3d.py branches/mathtex/release/osx/Makefile branches/mathtex/release/osx/README.txt branches/mathtex/release/win32/Makefile branches/mathtex/setupext.py branches/mathtex/src/_backend_agg.cpp branches/mathtex/src/_backend_agg.h branches/mathtex/src/_macosx.m branches/mathtex/src/cntr.c Removed Paths: ------------- branches/mathtex/examples/axes_grid/demo_image.py branches/mathtex/examples/data/ branches/mathtex/lib/matplotlib/mpl-data/example/ Property Changed: ---------------- branches/mathtex/ branches/mathtex/doc/pyplots/README branches/mathtex/doc/sphinxext/gen_gallery.py branches/mathtex/doc/sphinxext/gen_rst.py branches/mathtex/examples/misc/multiprocess.py branches/mathtex/examples/mplot3d/contour3d_demo.py branches/mathtex/examples/mplot3d/contourf3d_demo.py branches/mathtex/examples/mplot3d/polys3d_demo.py branches/mathtex/examples/mplot3d/scatter3d_demo.py branches/mathtex/examples/mplot3d/surface3d_demo.py branches/mathtex/examples/mplot3d/wire3d_demo.py branches/mathtex/lib/matplotlib/sphinxext/mathmpl.py branches/mathtex/lib/matplotlib/sphinxext/only_directives.py branches/mathtex/lib/matplotlib/sphinxext/plot_directive.py Property changes on: branches/mathtex ___________________________________________________________________ Modified: svnmerge-integrated - /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7253 /trunk/matplotlib:1-7332 + /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7253 /trunk/matplotlib:1-7478 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 /trunk/matplotlib:7265-7303,7308-7317,7321 + /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 /trunk/matplotlib:7265-7303,7308-7317,7321,7339-7478 Modified: branches/mathtex/CHANGELOG =================================================================== --- branches/mathtex/CHANGELOG 2009-08-12 19:17:09 UTC (rev 7478) +++ branches/mathtex/CHANGELOG 2009-08-12 23:30:13 UTC (rev 7479) @@ -1,5 +1,98 @@ -====================================================================== +2009-08-09 AnnotationBbox added. Similar to Annotation, but works with + OffsetBox instead of Text. See the example + demo_annotation_box.py. -JJL +2009-08-07 BboxImage implemented. Two examples, demo_bboximage.py and + demo_ribbon_box.py added. - JJL + +2009-08-07 In an effort to simplify the backend API, all clipping rectangles + and paths are now passed in using GraphicsContext objects, even + on collections and images. Therefore: + + draw_path_collection(self, master_transform, cliprect, clippath, + clippath_trans, paths, all_transforms, offsets, + offsetTrans, facecolors, edgecolors, linewidths, + linestyles, antialiaseds, urls) + + becomes: + + draw_path_collection(self, gc, master_transform, paths, all_transforms, + offsets, offsetTrans, facecolors, edgecolors, + linewidths, linestyles, antialiaseds, urls) + + + + draw_quad_mesh(self, master_transform, cliprect, clippath, + clippath_trans, meshWidth, meshHeight, coordinates, + offsets, offsetTrans, facecolors, antialiased, + showedges) + + becomes: + + draw_quad_mesh(self, gc, master_transform, meshWidth, meshHeight, + coordinates, offsets, offsetTrans, facecolors, + antialiased, showedges) + + + + draw_image(self, x, y, im, bbox, clippath=None, clippath_trans=None) + + becomes: + + draw_image(self, gc, x, y, im) + + - MGD + +2009-08-06 Tagging the 0.99.0 release at svn r7397 - JDH + + * fixed an alpha colormapping bug posted on sf 2832575 + + * fix typo in axes_divider.py. use nanmin, nanmax in angle_helper.py + (patch by Christoph Gohlke) + + * remove dup gui event in enter/leave events in gtk + + * lots of fixes for os x binaries (Thanks Russell Owen) + + * attach gtk events to mpl events -- fixes sf bug 2816580 + + * applied sf patch 2815064 (middle button events for wx) and + patch 2818092 (resize events for wx) + + * fixed boilerplate.py so it doesn't break the ReST docs. + + * removed a couple of cases of mlab.load + + * fixed rec2csv win32 file handle bug from sf patch 2831018 + + * added two examples from Josh Hemann: examples/pylab_examples/barchart_demo2.py + and examples/pylab_examples/boxplot_demo2.py + + * handled sf bugs 2831556 and 2830525; better bar error messages and + backend driver configs + + * added miktex win32 patch from sf patch 2820194 + + * apply sf patches 2830233 and 2823885 for osx setup and 64 bit; thanks Michiel + +2009-08-04 Made cbook.get_sample_data make use of the ETag and Last-Modified + headers of mod_dav_svn. - JKS + +2009-08-03 Add PathCollection; modify contourf to use complex + paths instead of simple paths with cuts. - EF + + +2009-08-03 Fixed boilerplate.py so it doesn't break the ReST docs. - JKS + +2009-08-03 pylab no longer provides a load and save function. These + are available in matplotlib.mlab, or you can use + numpy.loadtxt and numpy.savetxt for text files, or np.save + and np.load for binary numpy arrays. - JDH + +2009-07-31 Added cbook.get_sample_data for urllib enabled fetching and + cacheing of data needed for examples. See + examples/misc/sample_data_demo.py - JDH + 2009-07-31 Tagging 0.99.0.rc1 at 7314 - MGD 2009-07-30 Add set_cmap and register_cmap, and improve get_cmap, Modified: branches/mathtex/boilerplate.py =================================================================== --- branches/mathtex/boilerplate.py 2009-08-12 19:17:09 UTC (rev 7478) +++ branches/mathtex/boilerplate.py 2009-08-12 23:30:13 UTC (rev 7479) @@ -21,7 +21,6 @@ # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def %(func)s(%(argspec)s): - %(docstring)s %(ax)s = gca() # allow callers to override the hold state by passing hold=True|False %(washold)s = %(ax)s.ishold() @@ -35,16 +34,19 @@ %(ax)s.hold(%(washold)s) %(mappable)s return %(ret)s +if Axes.%(func)s.__doc__ is not None: + %(func)s.__doc__ = dedent(Axes.%(func)s.__doc__) + __docstring_addendum """ _fmtmisc = """\ # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def %(func)s(%(argspec)s): - %(docstring)s %(ret)s = gca().%(func)s(%(call)s) draw_if_interactive() return %(ret)s +if Axes.%(func)s.__doc__ is not None: + %(func)s.__doc__ = dedent(Axes.%(func)s.__doc__) """ # these methods are all simple wrappers of Axes methods by the same @@ -138,19 +140,6 @@ """ return '\n'.join(x.rstrip() for x in string.split('\n')) -def make_docstring(cmd, mention_hold): - func = getattr(Axes, cmd) - docstring = inspect.getdoc(func) - if docstring is None: - return "" - escaped = re.sub(r'\\', r'\\\\', docstring) - if mention_hold: - escaped += ''' - -Additional kwargs: hold = [True|False] overrides default hold state -''' - return '"""'+escaped+'"""' - for fmt,cmdlist in (_fmtplot,_plotcommands),(_fmtmisc,_misccommands): for func in cmdlist: # For some commands, an additional line is needed to set the @@ -160,9 +149,6 @@ else: mappable = '' - # Format docstring - docstring = make_docstring(func, fmt is _fmtplot) - # Get argspec of wrapped function args, varargs, varkw, defaults = inspect.getargspec(getattr(Axes, func)) args.pop(0) # remove 'self' argument Modified: branches/mathtex/doc/_templates/index.html =================================================================== --- branches/mathtex/doc/_templates/index.html 2009-08-12 19:17:09 UTC (rev 7478) +++ branches/mathtex/doc/_templates/index.html 2009-08-12 23:30:13 UTC (rev 7479) @@ -1,9 +1,9 @@ {% extends "layout.html" %} {% set title = 'matplotlib: python plotting' %} - + {% block body %} - <h1>Welcome</h1> + <h1>intro</h1> <p>matplotlib is a python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and @@ -41,7 +41,7 @@ <a href="http://scipy.org/Numpy_Example_List_With_Doc">numpy</a> and <a href="api/mlab_api.html">matplotlib.mlab</a>.</p> - <h3>Plotting commands</h3> <br/> + <h3>plotting commands</h3> <br/> <table border="1" cellpadding="3" cellspacing="2"> Modified: branches/mathtex/doc/_templates/indexsidebar.html =================================================================== --- branches/mathtex/doc/_templates/indexsidebar.html 2009-08-12 19:17:09 UTC (rev 7478) +++ branches/mathtex/doc/_templates/indexsidebar.html 2009-08-12 23:30:13 UTC (rev 7479) @@ -3,37 +3,33 @@ <p>Please <a href="http://sourceforge.net/project/project_donations.php?group_id=80706">donate</a> to support matplotlib development.</p> + +<p>matplotlib 0.99 is available for <a href="http://sourceforge.net/projects/matplotlib">download</a>. See <a href="{{ pathto('users/whats_new') }}">what's new</a> and tips on <a href="{{ +pathto('users/installing') }}">installing</a> +</p> - <p>Watch a <a href="http://videolectures.net/mloss08_hunter_mat">video lecture</a> about matplotlib presented at <a href="http://videolectures.net/mloss08_whistler">NIPS 08 Workshop</a> <i>Machine Learning Open Source Software</i></a>. </p> -<h3>Download</h3> -<p>Current version: <b>{{ version }}</b></p> - - -<p>Download matplotlib from the -sourceforge <a href="http://sourceforge.net/projects/matplotlib">project</a> -page (but first take a look at the <a href="{{ -pathto('users/installing') }}">installing</a> page). Here's a summary -of <a href="{{ pathto('users/whats_new') }}">what's new</a>. </p> - <p>There are several matplotlib addon <a href="{{ pathto('users/toolkits') }}">toolkits</a>, including the projection and mapping toolkit -<a href="http://matplotlib.sf.net/basemap/doc/html">basemap</a>.</p> +<a href="http://matplotlib.sf.net/basemap/doc/html">basemap</a>, 3d plotting with <a href="{{ +pathto('mpl_toolkits/mplot3d/index') }}">mplot3d</a>, wild and wonderful axes and axis helpers in <a href="{{ +pathto('mpl_toolkits/axes_grid/index') }}">axes_grid</a> and more. + </p> <h3>Need help?</h3> -<p>Check the <a href="{{ pathto('users/index') }}">user</a> guide, +<p>Check the <a href="{{ pathto('users/index') }}">user guide</a>, the <a href="{{ pathto('faq/index') }}">faq</a>, the <a href="{{ pathto('api/index') }}">api</a> docs, <a href="http://www.nabble.com/matplotlib---users-f2906.html">archives</a>, and join the matplotlib mailing <a href="http://sourceforge.net/mail/?group_id=80706">lists</a>. The <a href="{{ pathto('search') }}">search</a> tool searches all of -the documentation, including full text search of almost 300 complete +the documentation, including full text search of over 350 complete examples which exercise almost every corner of matplotlib.</p> <p>You can file bugs, patches and feature requests on the Modified: branches/mathtex/doc/api/api_changes.rst =================================================================== --- branches/mathtex/doc/api/api_changes.rst 2009-08-12 19:17:09 UTC (rev 7478) +++ branches/mathtex/doc/api/api_changes.rst 2009-08-12 23:30:13 UTC (rev 7479) @@ -18,9 +18,51 @@ .. _configobj: http://www.voidspace.org.uk/python/configobj.html .. _`enthought.traits`: http://code.enthought.com/projects/traits -Changes beyond 0.98.x +Changes beyond 0.99.x ===================== +In an effort to simplify the backend API, all clipping rectangles +and paths are now passed in using GraphicsContext objects, even +on collections and images. Therefore:: + + draw_path_collection(self, master_transform, cliprect, clippath, + clippath_trans, paths, all_transforms, offsets, + offsetTrans, facecolors, edgecolors, linewidths, + linestyles, antialiaseds, urls) + + # is now + + draw_path_collection(self, gc, master_transform, paths, all_transforms, + offsets, offsetTrans, facecolors, edgecolors, + linewidths, linestyles, antialiaseds, urls) + + + draw_quad_mesh(self, master_transform, cliprect, clippath, + clippath_trans, meshWidth, meshHeight, coordinates, + offsets, offsetTrans, facecolors, antialiased, + showedges) + + # is now + + draw_quad_mesh(self, gc, master_transform, meshWidth, meshHeight, + coordinates, offsets, offsetTrans, facecolors, + antialiased, showedges) + + + draw_image(self, x, y, im, bbox, clippath=None, clippath_trans=None) + + # is now + + draw_image(self, gc, x, y, im) + +Changes in 0.99 +====================== + +* pylab no longer provides a load and save function. These are + available in matplotlib.mlab, or you can use numpy.loadtxt and + numpy.savetxt for text files, or np.save and np.load for binary + numpy arrays. + * User-generated colormaps can now be added to the set recognized by :func:`matplotlib.cm.get_cmap`. Colormaps can be made the default and applied to the current image using Modified: branches/mathtex/doc/api/spine_api.rst =================================================================== --- branches/mathtex/doc/api/spine_api.rst 2009-08-12 19:17:09 UTC (rev 7478) +++ branches/mathtex/doc/api/spine_api.rst 2009-08-12 23:30:13 UTC (rev 7479) @@ -4,7 +4,7 @@ :mod:`matplotlib.spine` -====================== +======================== .. automodule:: matplotlib.spine :members: Modified: branches/mathtex/doc/devel/coding_guide.rst =================================================================== --- branches/mathtex/doc/devel/coding_guide.rst 2009-08-12 19:17:09 UTC (rev 7478) +++ branches/mathtex/doc/devel/coding_guide.rst 2009-08-12 23:30:13 UTC (rev 7479) @@ -563,6 +563,45 @@ .. _license-discussion: + +Writing examples +================ + +We have hundreds of examples in subdirectories of +file:`matplotlib/examples` in the trunk, and these are automatically +generated when the website it built to show up both in the `examples +<http://matplotlib.sourceforge.net/examples/index.html>`_ and `gallery +<http://matplotlib.sourceforge.net/gallery.html>`_ sections of the +website. Many people find these examples from the website, and do not +have ready access to the file:`examples` directory in which they +reside. Thus any example data that is required for the example should +be provided through the sample_data svn directory, which can then be +accessed using :func:`matplotlib.cbook.get_sample_data`. First get a +copy of the repository and svn add your data:: + + svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/sample_data + cp ~/path/to/mydata.dat sample_data/ + cd sample_data + svn add mydata.dat + svn commit -m 'added my data' + +and then in your example code you can load it into a file handle with:: + + import matplotlib.cbook as cbook + fh = cbook.get_sample_data('mydata.dat') + +The file will be fetched from the svn repo using urllib and updated +when the revision number changes. + + +If you prefer just to get the full path to the file instead of an file +object:: + + import matplotlib.cbook as cbook + datafile = cbook.get_sample_data('mydata.dat', asfileobj=False) + print 'datafile', datafile + + Licenses ======== @@ -630,3 +669,4 @@ extensions for scientific computing: ipython, numpy, scipy, the enthought tool suite and python itself are all distributed under BSD compatible licenses. +> \ No newline at end of file Modified: branches/mathtex/doc/faq/installing_faq.rst =================================================================== --- branches/mathtex/doc/faq/installing_faq.rst 2009-08-12 19:17:09 UTC (rev 7478) +++ branches/mathtex/doc/faq/installing_faq.rst 2009-08-12 23:30:13 UTC (rev 7479) @@ -287,11 +287,64 @@ <http://www.python.org/download/>`_. +.. _install_osx_binaries: + +Installing OSX binaries +----------------------- + +If you want to install matplotlib from one of the binary installers we +build, you have two choices: a dmg installer, which is a typical +Installer.app, or an binary OSX egg, which you can install via +setuptools easy_install. + +The mkpg installer will have a "dmg" extension, and will have a name +like :file:`matplotlib-0.99.0-py2.5-macosx10.5.dmg` depending on the +python, matplotlib, and OSX versions. Save this file and double +click it, which will open up a folder with a file in it that has the +mpkg extension. Double click this to run the Installer.app, which +will prompt you for a password if you need system wide installation +privileges, and install to a directory like +:file:`/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages`, +again depedending on your python version. This directory should be in +your python path, so you can test your installation with:: + + > python -c 'import matplotlib; print matplotlib.__version__, matplotlib.__file__' + +If you get an error like:: + + Traceback (most recent call last): + File "<string>", line 1, in <module> + ImportError: No module named matplotlib + +then you will need to set your PYTHONPATH, eg:: + + export PYTHONPATH=/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages:$PYTHONPATH + +See also :ref:`environment-variables`. + .. _easy-install-osx-egg: -easy_install from egg? +easy_install from egg ------------------------------ +You can also us the eggs we build for OSX (see the `installation +instructions +<http://pypi.python.org/pypi/setuptools#cygwin-mac-os-x-linux-other>`_ +for easy_install if you do not have it on your system already). You +can try:: + + > easy_install matplotlib + +which should grab the latest egg from the sourceforge site, but the +naming conventions for OSX eggs appear to be broken (see below) so +there is no guarantee the right egg will be found. We recommend you +download the latest egg from our `download site +<http://sourceforge.net/projects/matplotlib/files/>`_ directly to your +harddrive, and manually install it with + + > easy_install --install-dir=~/dev/lib/python2.5/site-packages/ matplotlib-0.99.0.rc1-py2.5-macosx-10.5-i386.egg + + Some users have reported problems with the egg for 0.98 from the matplotlib download site, with ``easy_install``, getting an error:: Property changes on: branches/mathtex/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 /trunk/matplotlib/doc/pyplots/README:7265-7303,7308-7317,7321 + /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 /trunk/matplotlib/doc/pyplots/README:7265-7303,7308-7317,7321,7339-7478 Modified: branches/mathtex/doc/pyplots/plotmap.py =================================================================== --- branches/mathtex/doc/pyplots/plotmap.py 2009-08-12 19:17:09 UTC (rev 7478) +++ branches/mathtex/doc/pyplots/plotmap.py 2009-08-12 23:30:13 UTC (rev 7479) @@ -5,7 +5,9 @@ # the data is interpolated to the native projection grid. import os from mpl_toolkits.basemap import Basemap, shiftgrid -from pylab import title, colorbar, show, axes, cm, load, arange, figure, \ +import numpy as np + +from pylab import title, colorbar, show, axes, cm, arange, figure, \ text # read in topo data (on a regular lat/lon grid) @@ -15,9 +17,9 @@ if not os.path.exists(datadir): raise SystemExit('You need to download the data with svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/htdocs/screenshots/data/" and set the datadir variable in %s'%__file__) -topoin = load(os.path.join(datadir, 'etopo20data.gz')) -lons = load(os.path.join(datadir, 'etopo20lons.gz')) -lats = load(os.path.join(datadir, 'etopo20lats.gz')) +topoin = np.loadtxt(os.path.join(datadir, 'etopo20data.gz')) +lons = np.loadtxt(os.path.join(datadir, 'etopo20lons.gz')) +lats = np.loadtxt(os.path.join(datadir, 'etopo20lats.gz')) # shift data so lons go from -180 to 180 instead of 20 to 380. topoin,lons = shiftgrid(180.,topoin,lons,start=False) Property changes on: branches/mathtex/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 /trunk/matplotlib/doc/sphinxext/gen_gallery.py:7265-7303,7308-7317,7321 + /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 /trunk/matplotlib/doc/sphinxext/gen_gallery.py:7265-7303,7308-7317,7321,7339-7478 Property changes on: branches/mathtex/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 /trunk/matplotlib/doc/sphinxext/gen_rst.py:7265-7303,7308-7317,7321 + /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,6... [truncated message content] |
From: <md...@us...> - 2009-09-09 14:47:23
|
Revision: 7724 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7724&view=rev Author: mdboom Date: 2009-09-09 14:47:09 +0000 (Wed, 09 Sep 2009) Log Message: ----------- Merged revisions 7483,7485,7487-7488,7491-7497,7503-7505,7507-7508,7510-7513,7515-7516,7518,7520,7524-7527,7531-7532,7534-7535,7537-7540,7542-7551,7568,7570,7578-7581,7585-7587,7590-7597,7599,7601-7606,7608-7615,7619-7625,7627-7632,7634-7637,7641-7702,7704-7706,7710-7716,7718-7723 via svnmerge from https://matplotlib.svn.sf.net/svnroot/matplotlib/trunk/matplotlib Modified Paths: -------------- branches/mathtex/CHANGELOG branches/mathtex/CXX/IndirectPythonInterface.hxx branches/mathtex/Makefile branches/mathtex/agg24/include/agg_basics.h branches/mathtex/boilerplate.py branches/mathtex/doc/_templates/indexsidebar.html branches/mathtex/doc/_templates/layout.html branches/mathtex/doc/api/index_backend_api.rst branches/mathtex/doc/devel/coding_guide.rst branches/mathtex/doc/devel/documenting_mpl.rst branches/mathtex/doc/devel/release_guide.rst branches/mathtex/doc/faq/howto_faq.rst branches/mathtex/doc/faq/installing_faq.rst branches/mathtex/doc/sphinxext/gen_gallery.py branches/mathtex/doc/sphinxext/gen_rst.py branches/mathtex/doc/users/artists.rst branches/mathtex/doc/users/event_handling.rst branches/mathtex/doc/users/index.rst branches/mathtex/doc/users/index_text.rst branches/mathtex/doc/users/installing.rst branches/mathtex/doc/users/license.rst branches/mathtex/doc/users/navigation_toolbar.rst branches/mathtex/doc/users/shell.rst branches/mathtex/doc/users/whats_new.rst branches/mathtex/examples/event_handling/pipong.py branches/mathtex/examples/event_handling/pong_gtk.py branches/mathtex/examples/event_handling/pong_qt.py branches/mathtex/examples/event_handling/viewlims.py branches/mathtex/examples/pylab_examples/barb_demo.py branches/mathtex/examples/pylab_examples/multi_image.py branches/mathtex/examples/pylab_examples/shading_example.py branches/mathtex/examples/units/annotate_with_units.py branches/mathtex/examples/units/bar_demo2.py branches/mathtex/examples/units/radian_demo.py branches/mathtex/lib/matplotlib/__init__.py branches/mathtex/lib/matplotlib/_cm.py branches/mathtex/lib/matplotlib/artist.py branches/mathtex/lib/matplotlib/axes.py branches/mathtex/lib/matplotlib/axis.py branches/mathtex/lib/matplotlib/backend_bases.py branches/mathtex/lib/matplotlib/backends/backend_agg.py branches/mathtex/lib/matplotlib/backends/backend_emf.py branches/mathtex/lib/matplotlib/backends/backend_macosx.py branches/mathtex/lib/matplotlib/backends/backend_mixed.py branches/mathtex/lib/matplotlib/backends/backend_pdf.py branches/mathtex/lib/matplotlib/backends/backend_ps.py branches/mathtex/lib/matplotlib/backends/backend_svg.py branches/mathtex/lib/matplotlib/bezier.py branches/mathtex/lib/matplotlib/blocking_input.py branches/mathtex/lib/matplotlib/cbook.py branches/mathtex/lib/matplotlib/cm.py branches/mathtex/lib/matplotlib/collections.py branches/mathtex/lib/matplotlib/colorbar.py branches/mathtex/lib/matplotlib/colors.py branches/mathtex/lib/matplotlib/config/mplconfig.py branches/mathtex/lib/matplotlib/config/rcsetup.py branches/mathtex/lib/matplotlib/dates.py branches/mathtex/lib/matplotlib/figure.py branches/mathtex/lib/matplotlib/image.py branches/mathtex/lib/matplotlib/legend.py branches/mathtex/lib/matplotlib/lines.py branches/mathtex/lib/matplotlib/mlab.py branches/mathtex/lib/matplotlib/offsetbox.py branches/mathtex/lib/matplotlib/patches.py branches/mathtex/lib/matplotlib/projections/geo.py branches/mathtex/lib/matplotlib/projections/polar.py branches/mathtex/lib/matplotlib/pyplot.py branches/mathtex/lib/matplotlib/quiver.py branches/mathtex/lib/matplotlib/rcsetup.py branches/mathtex/lib/matplotlib/scale.py branches/mathtex/lib/matplotlib/spines.py branches/mathtex/lib/matplotlib/table.py branches/mathtex/lib/matplotlib/text.py branches/mathtex/lib/matplotlib/ticker.py branches/mathtex/lib/matplotlib/transforms.py branches/mathtex/lib/matplotlib/units.py branches/mathtex/lib/mpl_toolkits/axes_grid/axislines.py branches/mathtex/lib/mpl_toolkits/axes_grid/inset_locator.py branches/mathtex/matplotlibrc.template branches/mathtex/release/osx/Makefile branches/mathtex/setup.py branches/mathtex/setupegg.py branches/mathtex/setupext.py branches/mathtex/src/_backend_agg.cpp branches/mathtex/src/_backend_agg.h branches/mathtex/src/_macosx.m branches/mathtex/src/ft2font.cpp branches/mathtex/src/ft2font.h branches/mathtex/test/README.txt branches/mathtex/test/matplotlibrc Added Paths: ----------- branches/mathtex/examples/axes_grid/demo_axisline_style.py branches/mathtex/examples/event_handling/looking_glass.py branches/mathtex/examples/event_handling/resample.py branches/mathtex/examples/pylab_examples/demo_agg_filter.py branches/mathtex/lib/matplotlib/testing/ branches/mathtex/lib/matplotlib/testing/jpl_units/ branches/mathtex/lib/matplotlib/tests/ branches/mathtex/lib/matplotlib/tests/baseline_images/ branches/mathtex/lib/matplotlib/tests/baseline_images/test_axes/ branches/mathtex/lib/matplotlib/tests/baseline_images/test_dates/ branches/mathtex/lib/matplotlib/tests/baseline_images/test_image/ branches/mathtex/lib/matplotlib/tests/baseline_images/test_spines/ Removed Paths: ------------- branches/mathtex/bootstrap.py branches/mathtex/buildout.cfg branches/mathtex/doc/users/annotations.rst branches/mathtex/doc/users/plotting/annotation.rst branches/mathtex/doc/users/plotting/legend.rst branches/mathtex/lib/matplotlib/testing/jpl_units/ branches/mathtex/lib/matplotlib/tests/baseline_images/ branches/mathtex/lib/matplotlib/tests/baseline_images/test_axes/ branches/mathtex/lib/matplotlib/tests/baseline_images/test_dates/ branches/mathtex/lib/matplotlib/tests/baseline_images/test_image/ branches/mathtex/lib/matplotlib/tests/baseline_images/test_spines/ branches/mathtex/test/consolidate_diff_images.sh branches/mathtex/test/mplTest/ branches/mathtex/test/run-mpl-test.py branches/mathtex/test/test_artists/ branches/mathtex/test/test_backends/ branches/mathtex/test/test_basemap/ branches/mathtex/test/test_cxx/ branches/mathtex/test/test_mathtext/ branches/mathtex/test/test_matplotlib/ branches/mathtex/test/test_numerix/ branches/mathtex/test/test_plots/ branches/mathtex/test/test_pylab/ branches/mathtex/test/test_transforms/ Property Changed: ---------------- branches/mathtex/ branches/mathtex/doc/pyplots/README branches/mathtex/doc/sphinxext/gen_gallery.py branches/mathtex/doc/sphinxext/gen_rst.py branches/mathtex/examples/misc/multiprocess.py branches/mathtex/examples/mplot3d/contour3d_demo.py branches/mathtex/examples/mplot3d/contourf3d_demo.py branches/mathtex/examples/mplot3d/polys3d_demo.py branches/mathtex/examples/mplot3d/scatter3d_demo.py branches/mathtex/examples/mplot3d/surface3d_demo.py branches/mathtex/examples/mplot3d/wire3d_demo.py branches/mathtex/lib/matplotlib/sphinxext/mathmpl.py branches/mathtex/lib/matplotlib/sphinxext/only_directives.py branches/mathtex/lib/matplotlib/sphinxext/plot_directive.py Property changes on: branches/mathtex ___________________________________________________________________ Modified: svnmerge-integrated - /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7253 /trunk/matplotlib:1-7478 + /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7253 /trunk/matplotlib:1-7723 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 /trunk/matplotlib:7265-7303,7308-7317,7321,7339-7478 + /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 /trunk/matplotlib:7265-7303,7308-7317,7321,7339-7478,7483-7723 Modified: branches/mathtex/CHANGELOG =================================================================== --- branches/mathtex/CHANGELOG 2009-09-08 18:16:38 UTC (rev 7723) +++ branches/mathtex/CHANGELOG 2009-09-09 14:47:09 UTC (rev 7724) @@ -1,3 +1,28 @@ +2009-09-07 AxesGrid : implemented axisline style. + Added a demo examples/axes_grid/demo_axisline_style.py- JJL + +2009-09-04 Make the textpath class as a separate moduel + (textpath.py). Add support for mathtext and tex.- JJL + +2009-09-01 Added support for Gouraud interpolated triangles. + pcolormesh now accepts shading='gouraud' as an option. - MGD + +2009-08-29 Added matplotlib.testing package, which contains a Nose + plugin and a decorator that lets tests be marked as + KnownFailures - ADS + +2009-08-20 Added scaled dict to AutoDateFormatter for customized + scales - JDH + +2009-08-15 Pyplot interface: the current image is now tracked at the + figure and axes level, addressing tracker item 1656374. - EF + +2009-08-15 Docstrings are now manipulated with decorators defined + in a new module, docstring.py, thanks to Jason Coombs. - EF + +2009-08-14 Add support for image filtering for agg back end. See the example + demo_agg_filter.py. -JJL + 2009-08-09 AnnotationBbox added. Similar to Annotation, but works with OffsetBox instead of Text. See the example demo_annotation_box.py. -JJL Modified: branches/mathtex/CXX/IndirectPythonInterface.hxx =================================================================== --- branches/mathtex/CXX/IndirectPythonInterface.hxx 2009-09-08 18:16:38 UTC (rev 7723) +++ branches/mathtex/CXX/IndirectPythonInterface.hxx 2009-09-09 14:47:09 UTC (rev 7724) @@ -193,6 +193,6 @@ void _XDECREF( PyObject *op ); char *__Py_PackageContext(); -}; +} #endif // __CXX_INDIRECT_PYTHON_INTERFACE__HXX__ Modified: branches/mathtex/Makefile =================================================================== --- branches/mathtex/Makefile 2009-09-08 18:16:38 UTC (rev 7723) +++ branches/mathtex/Makefile 2009-09-09 14:47:09 UTC (rev 7724) @@ -28,10 +28,13 @@ tar cvfz pyback.tar.gz *.py lib src examples/*.py unit/*.py -build_osx105: +_build_osx105: CFLAGS="-Os -arch i386 -arch ppc" LDFLAGS="-Os -arch i386 -arch ppc" python setup.py build +build_osx105: + echo "Use 'make -f fetch deps mpl_install instead'" + jdh_doc_snapshot: svn up;\ python setup.py install --prefix=~/dev;\ Modified: branches/mathtex/agg24/include/agg_basics.h =================================================================== --- branches/mathtex/agg24/include/agg_basics.h 2009-09-08 18:16:38 UTC (rev 7723) +++ branches/mathtex/agg24/include/agg_basics.h 2009-09-09 14:47:09 UTC (rev 7724) @@ -2,8 +2,8 @@ // Anti-Grain Geometry - Version 2.4 // Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com) // -// Permission to copy, use, modify, sell and distribute this software -// is granted provided this copyright notice appears in all copies. +// Permission to copy, use, modify, sell and distribute this software +// is granted provided this copyright notice appears in all copies. // This software is provided "as is" without express or implied // warranty, and with no claim as to its suitability for any purpose. // @@ -25,12 +25,12 @@ #else namespace agg { - // The policy of all AGG containers and memory allocation strategy + // The policy of all AGG containers and memory allocation strategy // in general is that no allocated data requires explicit construction. // It means that the allocator can be really simple; you can even - // replace new/delete to malloc/free. The constructors and destructors - // won't be called in this case, however everything will remain working. - // The second argument of deallocate() is the size of the allocated + // replace new/delete to malloc/free. The constructors and destructors + // won't be called in this case, however everything will remain working. + // The second argument of deallocate() is the size of the allocated // block. You can use this information if you wish. //------------------------------------------------------------pod_allocator template<class T> struct pod_allocator @@ -40,8 +40,8 @@ }; // Single object allocator. It's also can be replaced with your custom - // allocator. The difference is that it can only allocate a single - // object and the constructor and destructor must be called. + // allocator. The difference is that it can only allocate a single + // object and the constructor and destructor must be called. // In AGG there is no need to allocate an array of objects with // calling their constructors (only single ones). So that, if you // replace these new/delete to malloc/free make sure that the in-place @@ -213,23 +213,23 @@ enum cover_scale_e { cover_shift = 8, //----cover_shift - cover_size = 1 << cover_shift, //----cover_size - cover_mask = cover_size - 1, //----cover_mask - cover_none = 0, //----cover_none - cover_full = cover_mask //----cover_full + cover_size = 1 << cover_shift, //----cover_size + cover_mask = cover_size - 1, //----cover_mask + cover_none = 0, //----cover_none + cover_full = cover_mask //----cover_full }; //----------------------------------------------------poly_subpixel_scale_e - // These constants determine the subpixel accuracy, to be more precise, - // the number of bits of the fractional part of the coordinates. + // These constants determine the subpixel accuracy, to be more precise, + // the number of bits of the fractional part of the coordinates. // The possible coordinate capacity in bits can be calculated by formula: // sizeof(int) * 8 - poly_subpixel_shift, i.e, for 32-bit integers and // 8-bits fractional part the capacity is 24 bits. enum poly_subpixel_scale_e { poly_subpixel_shift = 8, //----poly_subpixel_shift - poly_subpixel_scale = 1<<poly_subpixel_shift, //----poly_subpixel_scale - poly_subpixel_mask = poly_subpixel_scale-1, //----poly_subpixel_mask + poly_subpixel_scale = 1<<poly_subpixel_shift, //----poly_subpixel_scale + poly_subpixel_mask = poly_subpixel_scale-1 //----poly_subpixel_mask }; //----------------------------------------------------------filling_rule_e @@ -253,7 +253,7 @@ { return rad * 180.0 / pi; } - + //----------------------------------------------------------------rect_base template<class T> struct rect_base { @@ -265,9 +265,9 @@ rect_base(T x1_, T y1_, T x2_, T y2_) : x1(x1_), y1(y1_), x2(x2_), y2(y2_) {} - void init(T x1_, T y1_, T x2_, T y2_) + void init(T x1_, T y1_, T x2_, T y2_) { - x1 = x1_; y1 = y1_; x2 = x2_; y2 = y2_; + x1 = x1_; y1 = y1_; x2 = x2_; y2 = y2_; } const self_type& normalize() @@ -299,17 +299,17 @@ }; //-----------------------------------------------------intersect_rectangles - template<class Rect> + template<class Rect> inline Rect intersect_rectangles(const Rect& r1, const Rect& r2) { Rect r = r1; - // First process x2,y2 because the other order - // results in Internal Compiler Error under - // Microsoft Visual C++ .NET 2003 69462-335-0000007-18038 in + // First process x2,y2 because the other order + // results in Internal Compiler Error under + // Microsoft Visual C++ .NET 2003 69462-335-0000007-18038 in // case of "Maximize Speed" optimization option. //----------------- - if(r.x2 > r2.x2) r.x2 = r2.x2; + if(r.x2 > r2.x2) r.x2 = r2.x2; if(r.y2 > r2.y2) r.y2 = r2.y2; if(r.x1 < r2.x1) r.x1 = r2.x1; if(r.y1 < r2.y1) r.y1 = r2.y1; @@ -318,7 +318,7 @@ //---------------------------------------------------------unite_rectangles - template<class Rect> + template<class Rect> inline Rect unite_rectangles(const Rect& r1, const Rect& r2) { Rect r = r1; @@ -336,26 +336,26 @@ //---------------------------------------------------------path_commands_e enum path_commands_e { - path_cmd_stop = 0, //----path_cmd_stop - path_cmd_move_to = 1, //----path_cmd_move_to - path_cmd_line_to = 2, //----path_cmd_line_to - path_cmd_curve3 = 3, //----path_cmd_curve3 - path_cmd_curve4 = 4, //----path_cmd_curve4 + path_cmd_stop = 0, //----path_cmd_stop + path_cmd_move_to = 1, //----path_cmd_move_to + path_cmd_line_to = 2, //----path_cmd_line_to + path_cmd_curve3 = 3, //----path_cmd_curve3 + path_cmd_curve4 = 4, //----path_cmd_curve4 path_cmd_curveN = 5, //----path_cmd_curveN path_cmd_catrom = 6, //----path_cmd_catrom path_cmd_ubspline = 7, //----path_cmd_ubspline path_cmd_end_poly = 0x0F, //----path_cmd_end_poly - path_cmd_mask = 0x0F //----path_cmd_mask + path_cmd_mask = 0x0F //----path_cmd_mask }; //------------------------------------------------------------path_flags_e enum path_flags_e { - path_flags_none = 0, //----path_flags_none - path_flags_ccw = 0x10, //----path_flags_ccw - path_flags_cw = 0x20, //----path_flags_cw + path_flags_none = 0, //----path_flags_none + path_flags_ccw = 0x10, //----path_flags_ccw + path_flags_cw = 0x20, //----path_flags_cw path_flags_close = 0x40, //----path_flags_close - path_flags_mask = 0xF0 //----path_flags_mask + path_flags_mask = 0xF0 //----path_flags_mask }; //---------------------------------------------------------------is_vertex @@ -372,7 +372,7 @@ //-----------------------------------------------------------------is_stop inline bool is_stop(unsigned c) - { + { return c == path_cmd_stop; } @@ -416,7 +416,7 @@ inline bool is_close(unsigned c) { return (c & ~(path_flags_cw | path_flags_ccw)) == - (path_cmd_end_poly | path_flags_close); + (path_cmd_end_poly | path_flags_close); } //------------------------------------------------------------is_next_poly @@ -440,19 +440,19 @@ //-------------------------------------------------------------is_oriented inline bool is_oriented(unsigned c) { - return (c & (path_flags_cw | path_flags_ccw)) != 0; + return (c & (path_flags_cw | path_flags_ccw)) != 0; } //---------------------------------------------------------------is_closed inline bool is_closed(unsigned c) { - return (c & path_flags_close) != 0; + return (c & path_flags_close) != 0; } //----------------------------------------------------------get_close_flag inline unsigned get_close_flag(unsigned c) { - return c & path_flags_close; + return c & path_flags_close; } //-------------------------------------------------------clear_orientation @@ -513,7 +513,7 @@ int x1, x2; const T* ptr; const_row_info() {} - const_row_info(int x1_, int x2_, const T* ptr_) : + const_row_info(int x1_, int x2_, const T* ptr_) : x1(x1_), x2(x2_), ptr(ptr_) {} }; Modified: branches/mathtex/boilerplate.py =================================================================== --- branches/mathtex/boilerplate.py 2009-09-08 18:16:38 UTC (rev 7723) +++ branches/mathtex/boilerplate.py 2009-09-09 14:47:09 UTC (rev 7724) @@ -1,5 +1,5 @@ # Wrap the plot commands defined in axes. The code generated by this -# file is pasted into pylab.py. We did try to do this the smart way, +# file is pasted into pyplot.py. We did try to do this the smart way, # with callable functions and new.function, but could never get the # docstrings right for python2.2. See # http://groups.google.com/group/comp.lang.python/browse_frm/thread/dcd63ec13096a0f6/1b14640f3a4ad3dc?#1b14640f3a4ad3dc @@ -13,13 +13,14 @@ import types # import the local copy of matplotlib, not the installed one -sys.path.insert(0, './lib') +#sys.path.insert(0, './lib') from matplotlib.axes import Axes from matplotlib.cbook import dedent _fmtplot = """\ # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost +@autogen_docstring(Axes.%(func)s) def %(func)s(%(argspec)s): %(ax)s = gca() # allow callers to override the hold state by passing hold=True|False @@ -34,19 +35,16 @@ %(ax)s.hold(%(washold)s) %(mappable)s return %(ret)s -if Axes.%(func)s.__doc__ is not None: - %(func)s.__doc__ = dedent(Axes.%(func)s.__doc__) + __docstring_addendum """ _fmtmisc = """\ # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost +...@do...py_dedent(Axes.%(func)s) def %(func)s(%(argspec)s): %(ret)s = gca().%(func)s(%(call)s) draw_if_interactive() return %(ret)s -if Axes.%(func)s.__doc__ is not None: - %(func)s.__doc__ = dedent(Axes.%(func)s.__doc__) """ # these methods are all simple wrappers of Axes methods by the same @@ -106,16 +104,16 @@ ) cmappable = { - 'contour' : 'if %(ret)s._A is not None: gci._current = %(ret)s', - 'contourf': 'if %(ret)s._A is not None: gci._current = %(ret)s', - 'hexbin' : 'gci._current = %(ret)s', - 'scatter' : 'gci._current = %(ret)s', - 'pcolor' : 'gci._current = %(ret)s', - 'pcolormesh' : 'gci._current = %(ret)s', - 'imshow' : 'gci._current = %(ret)s', - 'spy' : 'gci._current = %(ret)s', - 'quiver' : 'gci._current = %(ret)s', - 'specgram' : 'gci._current = %(ret)s[-1]', + 'contour' : 'if %(ret)s._A is not None: sci(%(ret)s)', + 'contourf': 'if %(ret)s._A is not None: sci(%(ret)s)', + 'hexbin' : 'sci(%(ret)s)', + 'scatter' : 'sci(%(ret)s)', + 'pcolor' : 'sci(%(ret)s)', + 'pcolormesh': 'sci(%(ret)s)', + 'imshow' : 'sci(%(ret)s)', + 'spy' : 'sci(%(ret)s)', + 'quiver' : 'sci(%(ret)s)', + 'specgram' : 'sci(%(ret)s[-1])', } @@ -235,3 +233,4 @@ # add all the colormaps (autumn, hsv, ....) for name in cmaps: print _fmtcmap%locals() + Deleted: branches/mathtex/bootstrap.py =================================================================== --- branches/mathtex/bootstrap.py 2009-09-08 18:16:38 UTC (rev 7723) +++ branches/mathtex/bootstrap.py 2009-09-09 14:47:09 UTC (rev 7724) @@ -1,52 +0,0 @@ -############################################################################## -# -# Copyright (c) 2006 Zope Corporation and Contributors. -# All Rights Reserved. -# -# This software is subject to the provisions of the Zope Public License, -# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED -# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS -# FOR A PARTICULAR PURPOSE. -# -############################################################################## -"""Bootstrap a buildout-based project - -Simply run this script in a directory containing a buildout.cfg. -The script accepts buildout command-line options, so you can -use the -c option to specify an alternate configuration file. - -$Id$ -""" - -import os, shutil, sys, tempfile, urllib2 - -tmpeggs = tempfile.mkdtemp() - -ez = {} -exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py' - ).read() in ez -ez['use_setuptools'](to_dir=tmpeggs, download_delay=0) - -import pkg_resources - -cmd = 'from setuptools.command.easy_install import main; main()' -if sys.platform == 'win32': - cmd = '"%s"' % cmd # work around spawn lamosity on windows - -ws = pkg_resources.working_set -assert os.spawnle( - os.P_WAIT, sys.executable, sys.executable, - '-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout', - dict(os.environ, - PYTHONPATH= - ws.find(pkg_resources.Requirement.parse('setuptools')).location - ), - ) == 0 - -ws.add_entry(tmpeggs) -ws.require('zc.buildout') -import zc.buildout.buildout -zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap']) -shutil.rmtree(tmpeggs) Deleted: branches/mathtex/buildout.cfg =================================================================== --- branches/mathtex/buildout.cfg 2009-09-08 18:16:38 UTC (rev 7723) +++ branches/mathtex/buildout.cfg 2009-09-09 14:47:09 UTC (rev 7724) @@ -1,31 +0,0 @@ -[buildout] -parts = PIL test python -develop = . -eggs = matplotlib -find-links = http://astraw.com/mpl/ - -[test] -recipe = pbp.recipe.noserunner -# Use Andrew Straw's custom packaging of noserunner with plugin support. -eggs = - pbp.recipe.noserunner==0.2.6.2 - PIL - ${buildout:eggs} -working-directory = ${buildout:directory}/test -initialization = - sys.path.insert(0,'.') - from mplTest import MplNosePlugin -plugins = - MplNosePlugin() - -[python] -recipe = zc.recipe.egg -interpreter = python -eggs = - ${buildout:eggs} - -[PIL] -# This recipe based on http://www.koansys.com/tech/install-plone-with-zopeskel-buildout-needs-pil -# Build egg with Andrew Straw's custom packaging of setuptools-compatibile PIL without Tkinter. -recipe = zc.recipe.egg -egg = PIL==1.1.6 Modified: branches/mathtex/doc/_templates/indexsidebar.html =================================================================== --- branches/mathtex/doc/_templates/indexsidebar.html 2009-09-08 18:16:38 UTC (rev 7723) +++ branches/mathtex/doc/_templates/indexsidebar.html 2009-09-09 14:47:09 UTC (rev 7724) @@ -8,18 +8,33 @@ pathto('users/installing') }}">installing</a> </p> -<p>Watch a <a href="http://videolectures.net/mloss08_hunter_mat">video lecture</a> about matplotlib presented at <a href="http://videolectures.net/mloss08_whistler">NIPS 08 Workshop</a> <i>Machine Learning Open Source Software</i></a>. +<p>Build websites like matplotlib's, +with <a href="http://sphinx.pocoo.org/">sphinx</a> and extensions for +mpl plots, math, inheritance diagrams -- try +the <a href="http://matplotlib.sf.net/sampledoc">sampledoc</a> +tutorial. </p> + +<h3>Videos</h3> + +<p>Watch the <a href="http://conference.scipy.org/">SciPy</a> 2009 <a href="http://www.archive.org/details/scipy09_introTutorialDay2_1">intro</a> and <a href="http://www.archive.org/details/scipy09_advancedTutorialDay1_3">advanced</a> matplotlib tutorials +</p> + +<p>Watch a <a href="http://videolectures.net/mloss08_hunter_mat">talk</a> about matplotlib presented at <a href="http://videolectures.net/mloss08_whistler">NIPS 08 Workshop</a> <i>MLOSS</i></a>. +</p> + + +<h3>Toolkits</h3> + <p>There are several matplotlib addon <a href="{{ pathto('users/toolkits') }}">toolkits</a>, including the projection and mapping toolkit <a href="http://matplotlib.sf.net/basemap/doc/html">basemap</a>, 3d plotting with <a href="{{ -pathto('mpl_toolkits/mplot3d/index') }}">mplot3d</a>, wild and wonderful axes and axis helpers in <a href="{{ +pathto('mpl_toolkits/mplot3d/index') }}">mplot3d</a>, axes and axis helpers in <a href="{{ pathto('mpl_toolkits/axes_grid/index') }}">axes_grid</a> and more. </p> - <h3>Need help?</h3> <p>Check the <a href="{{ pathto('users/index') }}">user guide</a>, @@ -38,7 +53,7 @@ but it is a good idea to ping us on the mailing list too.</p> <p>For details on what's new, see the detailed <a href="{{ -pathto('_static/CHANGELOG', 1) }}">changelog</a>. Anything that could +pathto('_static/CHANGELOG', 1) }}">changelog</a> or browse the <a href="http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/">source code</a>. Anything that could require changes to your existing codes is logged in the <a href="{{ pathto('api/api_changes.html', 1) }}">api changes</a> file.</p> Modified: branches/mathtex/doc/_templates/layout.html =================================================================== --- branches/mathtex/doc/_templates/layout.html 2009-09-08 18:16:38 UTC (rev 7723) +++ branches/mathtex/doc/_templates/layout.html 2009-09-09 14:47:09 UTC (rev 7724) @@ -2,10 +2,11 @@ {% block rootrellink %} - <li><a href="{{ pathto('index') }}">matplotlib home</a>| </li> + <li><a href="{{ pathto('index') }}">home</a>| </li> <li><a href="{{ pathto('search') }}">search</a>| </li> + <li><a href="http://matplotlib.sf.net/examples/index.html">examples</a>| </li> <li><a href="{{ pathto('gallery') }}">gallery</a>| </li> - ... [truncated message content] |