From: <jd...@us...> - 2008-09-30 11:18:23
|
Revision: 6135 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6135&view=rev Author: jdh2358 Date: 2008-09-30 11:18:10 +0000 (Tue, 30 Sep 2008) Log Message: ----------- removed numerical_methods from imports Modified Paths: -------------- trunk/matplotlib/examples/pylab_examples/fill_between.py trunk/matplotlib/examples/pylab_examples/interp_demo.py trunk/matplotlib/lib/matplotlib/__init__.py trunk/matplotlib/lib/matplotlib/cbook.py trunk/matplotlib/lib/matplotlib/dates.py trunk/matplotlib/matplotlibrc.template Modified: trunk/matplotlib/examples/pylab_examples/fill_between.py =================================================================== --- trunk/matplotlib/examples/pylab_examples/fill_between.py 2008-09-29 17:30:14 UTC (rev 6134) +++ trunk/matplotlib/examples/pylab_examples/fill_between.py 2008-09-30 11:18:10 UTC (rev 6135) @@ -1,5 +1,5 @@ #!/usr/bin/env python -import matplotlib.numerical_methods as numerical_methods +import matplotlib.mlab as mlab from pylab import figure, show import numpy as np @@ -13,15 +13,15 @@ ax3 = fig.add_subplot(313) -xs, ys = numerical_methods.poly_between(x, 0, y1) +xs, ys = mlab.poly_between(x, 0, y1) ax.fill(xs, ys) ax.set_ylabel('between y1 and 0') -xs, ys = numerical_methods.poly_between(x, y1, 1) +xs, ys = mlab.poly_between(x, y1, 1) ax2.fill(xs, ys) ax2.set_ylabel('between y1 and 1') -xs, ys = numerical_methods.poly_between(x, y1, y2) +xs, ys = mlab.poly_between(x, y1, y2) ax3.fill(xs, ys) ax3.set_ylabel('between y1 and y2') ax3.set_xlabel('x') Modified: trunk/matplotlib/examples/pylab_examples/interp_demo.py =================================================================== --- trunk/matplotlib/examples/pylab_examples/interp_demo.py 2008-09-29 17:30:14 UTC (rev 6134) +++ trunk/matplotlib/examples/pylab_examples/interp_demo.py 2008-09-30 11:18:10 UTC (rev 6135) @@ -1,6 +1,6 @@ from matplotlib.pyplot import figure, show from numpy import pi, sin, linspace -from matplotlib.numerical_methods import stineman_interp +from matplotlib.mlab import stineman_interp x = linspace(0,2*pi,20); y = sin(x); yp = None Modified: trunk/matplotlib/lib/matplotlib/__init__.py =================================================================== --- trunk/matplotlib/lib/matplotlib/__init__.py 2008-09-29 17:30:14 UTC (rev 6134) +++ trunk/matplotlib/lib/matplotlib/__init__.py 2008-09-30 11:18:10 UTC (rev 6135) @@ -131,12 +131,9 @@ major, minor1, minor2, s, tmp = sys.version_info _python24 = major>=2 and minor1>=4 -try: - import datetime - import dateutil - import pytz -except ImportError: _havedate = False -else: _havedate = True +# the havedate check was a legacy from old matplotlib which preceeded +# datetime support +_havedate = True #try: # import pkg_resources # pkg_resources is part of setuptools Modified: trunk/matplotlib/lib/matplotlib/cbook.py =================================================================== --- trunk/matplotlib/lib/matplotlib/cbook.py 2008-09-29 17:30:14 UTC (rev 6134) +++ trunk/matplotlib/lib/matplotlib/cbook.py 2008-09-30 11:18:10 UTC (rev 6135) @@ -1307,6 +1307,77 @@ ls_mapper = dict(_linestyles) ls_mapper.update([(ls[1], ls[0]) for ls in _linestyles]) +def less_simple_linear_interpolation( x, y, xi, extrap=False ): + """ + This function has been moved to matplotlib.mlab -- please import + it from there + """ + # deprecated from cbook in 0.98.4 + warnings.warn('less_simple_linear_interpolation has been moved to matplotlib.mlab -- please import it from there', DeprecationWarning) + import matplotlib.mlab as mlab + return mlab.less_simple_linear_interpolation( x, y, xi, extrap=extrap ) + +def isvector(X): + """ + This function has been moved to matplotlib.mlab -- please import + it from there + """ + # deprecated from cbook in 0.98.4 + warnings.warn('isvector has been moved to matplotlib.mlab -- please import it from there', DeprecationWarning) + import matplotlib.mlab as mlab + return mlab.isvector( x, y, xi, extrap=extrap ) + +def vector_lengths( X, P=2., axis=None ): + """ + This function has been moved to matplotlib.mlab -- please import + it from there + """ + # deprecated from cbook in 0.98.4 + warnings.warn('vector_lengths has been moved to matplotlib.mlab -- please import it from there', DeprecationWarning) + import matplotlib.mlab as mlab + return mlab.vector_lengths( X, P=2., axis=axis ) + +def distances_along_curve( X ): + """ + This function has been moved to matplotlib.mlab -- please import + it from there + """ + # deprecated from cbook in 0.98.4 + warnings.warn('distances_along_curve has been moved to matplotlib.mlab -- please import it from there', DeprecationWarning) + import matplotlib.mlab as mlab + return mlab.distances_along_curve( X ) + +def path_length(X): + """ + This function has been moved to matplotlib.mlab -- please import + it from there + """ + # deprecated from cbook in 0.98.4 + warnings.warn('path_length has been moved to matplotlib.mlab -- please import it from there', DeprecationWarning) + import matplotlib.mlab as mlab + return mlab.path_length(X) + +def is_closed_polygon(X): + """ + This function has been moved to matplotlib.mlab -- please import + it from there + """ + # deprecated from cbook in 0.98.4 + warnings.warn('is_closed_polygon has been moved to matplotlib.mlab -- please import it from there', DeprecationWarning) + import matplotlib.mlab as mlab + return mlab.is_closed_polygon(X) + +def quad2cubic(q0x, q0y, q1x, q1y, q2x, q2y): + """ + This function has been moved to matplotlib.mlab -- please import + it from there + """ + # deprecated from cbook in 0.98.4 + warnings.warn('quad2cubic has been moved to matplotlib.mlab -- please import it from there', DeprecationWarning) + import matplotlib.mlab as mlab + return mlab.quad2cubic(q0x, q0y, q1x, q1y, q2x, q2y) + + if __name__=='__main__': assert( allequal([1,1,1]) ) assert(not allequal([1,1,0]) ) Modified: trunk/matplotlib/lib/matplotlib/dates.py =================================================================== --- trunk/matplotlib/lib/matplotlib/dates.py 2008-09-29 17:30:14 UTC (rev 6134) +++ trunk/matplotlib/lib/matplotlib/dates.py 2008-09-30 11:18:10 UTC (rev 6135) @@ -79,6 +79,14 @@ import re, time, math, datetime import pytz + +# compatability for 2008c and older versions +try: + import pytz.zoneinfo +except ImportError: + pytz.zoneinfo = pytz.tzinfo + pytz.zoneinfo.UTC = pytz.UTC + import matplotlib import numpy as np Modified: trunk/matplotlib/matplotlibrc.template =================================================================== --- trunk/matplotlib/matplotlibrc.template 2008-09-29 17:30:14 UTC (rev 6134) +++ trunk/matplotlib/matplotlibrc.template 2008-09-30 11:18:10 UTC (rev 6135) @@ -251,12 +251,12 @@ # The figure subplot parameters. All dimensions are fraction of the # figure width or height -#figure.subplot.left : 0.125 # the left side of the subplots of the figure -#figure.subplot.right : 0.9 # the right side of the subplots of the figure -#figure.subplot.bottom : 0.1 # the bottom of the subplots of the figure -#figure.subplot.top : 0.9 # the top of the subplots of the figure -#figure.subplot.wspace : 0.2 # the amount of width reserved for blank space between subplots -#figure.subplot.hspace : 0.2 # the amount of height reserved for white space between subplots +#figure.subplot.left : 0.125 # the left side of the subplots of the figure +#figure.subplot.right : 0.9 # the right side of the subplots of the figure +#figure.subplot.bottom : 0.1 # the bottom of the subplots of the figure +#figure.subplot.top : 0.9 # the top of the subplots of the figure +#figure.subplot.wspace : 0.2 # the amount of width reserved for blank space between subplots +#figure.subplot.hspace : 0.2 # the amount of height reserved for white space between subplots ### IMAGES #image.aspect : equal # equal | auto | a number @@ -272,7 +272,7 @@ ### SAVING FIGURES #path.simplify : False # When True, simplify paths in vector backends, such as PDF, PS and SVG -# the default savefig params can be different for the GUI backends. +# the default savefig params can be different from the display params # Eg, you may want a higher resolution, or to make the figure # background white #savefig.dpi : 100 # figure dots per inch @@ -308,12 +308,12 @@ # Set the verbose flags. This controls how much information # matplotlib gives you at runtime and where it goes. The verbosity # levels are: silent, helpful, debug, debug-annoying. Any level is -# inclusive of all the levels below it. If you setting is debug, +# inclusive of all the levels below it. If your setting is "debug", # you'll get all the debug and helpful messages. When submitting -# problems to the mailing-list, please set verbose to helpful or debug +# problems to the mailing-list, please set verbose to "helpful" or "debug" # and paste the output into your report. # -# The fileo gives the destination for any calls to verbose.report. +# The "fileo" gives the destination for any calls to verbose.report. # These objects can a filename, or a filehandle like sys.stdout. # # You can override the rc default verbosity from the command line by This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |