From: <par...@us...> - 2006-11-07 02:33:17
|
Revision: 294 http://svn.sourceforge.net/gnuplot-py/?rev=294&view=rev Author: parejkoj Date: 2006-11-06 18:33:08 -0800 (Mon, 06 Nov 2006) Log Message: ----------- Changes required to move from Numeric support over to numpy. All import commands now import numpy instead of Numeric. Comments involving Numeric were simply changed to numpy, except for JNumeric, which may not yet have a numpy version. Some syntax changed as well: NewAxis -> newaxis Float -> float_ Float32 -> float32 typecode() -> dtype.char Also, some brain-dead error handling in utils.float_array(m): the most common reason for a conversion error is a mis-match of array dimensions. It should be better about reporting that. Finally, *set -> *data in PlotItems.Data(). set is now a reserved word for the built-in set class, and I wanted to avoid collisions there. Modified Paths: -------------- trunk/ANNOUNCE.txt trunk/FAQ.txt trunk/NEWS.txt trunk/PlotItems.py trunk/README.txt trunk/TODO.txt trunk/_Gnuplot.py trunk/__init__.py trunk/demo.py trunk/funcutils.py trunk/setup.py trunk/test.py trunk/utils.py Modified: trunk/ANNOUNCE.txt =================================================================== --- trunk/ANNOUNCE.txt 2006-07-16 17:48:06 UTC (rev 293) +++ trunk/ANNOUNCE.txt 2006-11-07 02:33:08 UTC (rev 294) @@ -9,7 +9,7 @@ Prerequisites (see footnotes): the Python interpreter [1] - the Python Numeric module [3] + the Python numpy module [3] the gnuplot program [2] or, to use it under Java (experimental): @@ -20,7 +20,7 @@ Some ways this package can be used: -1. Interactive data processing: Use Python's excellent Numeric package +1. Interactive data processing: Use Python's excellent numpy package to create and manipulate arrays of numbers, and use Gnuplot.py to visualize the results. 2. Web graphics: write CGI scripts in Python that use gnuplot to @@ -76,7 +76,7 @@ portable plotting program with a command-line interface. It can make 2-d and 3-d plots and can output to myriad printers and graphics terminals. -[3] The Numeric Python extension <http://numpy.sourceforge.net/> is a +[3] The numpy Python extension <http://www.scipy.org> is a Python module that adds fast and convenient array manipulations to the Python language. [4] Jython <http://www.jython.org> is a Python interpreter that runs Modified: trunk/FAQ.txt =================================================================== --- trunk/FAQ.txt 2006-07-16 17:48:06 UTC (rev 293) +++ trunk/FAQ.txt 2006-11-07 02:33:08 UTC (rev 294) @@ -17,7 +17,7 @@ #! /usr/bin/python2 import Gnuplot, Gnuplot.funcutils -from Numeric import * +from numpy import * g = Gnuplot.Gnuplot() g.plot([[0,1.1], [1,5.8], [2,3.3], [3,4.2]]) Modified: trunk/NEWS.txt =================================================================== --- trunk/NEWS.txt 2006-07-16 17:48:06 UTC (rev 293) +++ trunk/NEWS.txt 2006-11-07 02:33:08 UTC (rev 294) @@ -235,10 +235,10 @@ dataset; e.g., what used to be written as g = Gnuplot.Gnuplot() - x = Numeric.arange(100)/10.0 + x = numpy.arange(100)/10.0 y = x**2 # Create an array of (x,y) pairs: - g.plot(Gnuplot.Data(Numeric.transpose((x, y)))) + g.plot(Gnuplot.Data(numpy.transpose((x, y)))) can now be shortened to Modified: trunk/PlotItems.py =================================================================== --- trunk/PlotItems.py 2006-07-16 17:48:06 UTC (rev 293) +++ trunk/PlotItems.py 2006-11-07 02:33:08 UTC (rev 294) @@ -1,3 +1,5 @@ +## Automatically adapted for numpy.oldnumeric Sep 22, 2006 by alter_code1.py + # $Id$ # Copyright (C) 1998-2003 Michael Haggerty <mh...@al...> @@ -21,7 +23,7 @@ except ImportError: from StringIO import StringIO -import Numeric +import numpy import gp, utils, Errors @@ -504,12 +506,12 @@ return _FileItem(filename, **keyw) -def Data(*set, **keyw): - """Create and return a _FileItem representing the data from *set. +def Data(*data, **keyw): + """Create and return a _FileItem representing the data from *data. Create a '_FileItem' object (which is a type of 'PlotItem') out of - one or more Float Python Numeric arrays (or objects that can be - converted to a Float Numeric array). If the routine is passed a + one or more Float Python numpy arrays (or objects that can be + converted to a float numpy array). If the routine is passed a single with multiple dimensions, then the last index ranges over the values comprising a single data point (e.g., [<x>, <y>, <sigma>]) and the rest of the indices select the data point. If @@ -543,29 +545,29 @@ """ - if len(set) == 1: - # set was passed as a single structure - set = utils.float_array(set[0]) + if len(data) == 1: + # data was passed as a single structure + data = utils.float_array(data[0]) # As a special case, if passed a single 1-D array, then it is # treated as one value per point (by default, plotted against # its index): - if len(set.shape) == 1: - set = set[:,Numeric.NewAxis] + if len(data.shape) == 1: + data = data[:,numpy.newaxis] else: - # set was passed column by column (for example, + # data was passed column by column (for example, # Data(x,y)); pack it into one big array (this will test # that sizes are all the same): - set = utils.float_array(set) - dims = len(set.shape) + data = utils.float_array(data) + dims = len(data.shape) # transpose so that the last index selects x vs. y: - set = Numeric.transpose(set, (dims-1,) + tuple(range(dims-1))) + data = numpy.transpose(data, (dims-1,) + tuple(range(dims-1))) if 'cols' in keyw: cols = keyw['cols'] del keyw['cols'] - if type(cols) is types.IntType: + if isinstance(cols, types.IntType): cols = (cols,) - set = Numeric.take(set, cols, -1) + data = numpy.take(data, cols, -1) if 'filename' in keyw: filename = keyw['filename'] or None @@ -585,7 +587,7 @@ # Output the content into a string: f = StringIO() - utils.write_array(f, set) + utils.write_array(f, data) content = f.getvalue() if inline: return _InlineFileItem(content, **keyw) @@ -661,7 +663,7 @@ raise Errors.DataError('data array must be two-dimensional') if xvals is None: - xvals = Numeric.arange(numx) + xvals = numpy.arange(numx) else: xvals = utils.float_array(xvals) if xvals.shape != (numx,): @@ -670,7 +672,7 @@ 'the first dimension of the data array') if yvals is None: - yvals = Numeric.arange(numy) + yvals = numpy.arange(numy) else: yvals = utils.float_array(yvals) if yvals.shape != (numy,): @@ -705,17 +707,17 @@ # documentation has the roles of x and y exchanged. We ignore # the documentation and go with the code. - mout = Numeric.zeros((numy + 1, numx + 1), Numeric.Float32) + mout = numpy.zeros((numy + 1, numx + 1), numpy.float32) mout[0,0] = numx - mout[0,1:] = xvals.astype(Numeric.Float32) - mout[1:,0] = yvals.astype(Numeric.Float32) + mout[0,1:] = xvals.astype(numpy.float32) + mout[1:,0] = yvals.astype(numpy.float32) try: # try copying without the additional copy implied by astype(): - mout[1:,1:] = Numeric.transpose(data) + mout[1:,1:] = numpy.transpose(data) except: # if that didn't work then downcasting from double # must be necessary: - mout[1:,1:] = Numeric.transpose(data.astype(Numeric.Float32)) + mout[1:,1:] = numpy.transpose(data.astype(numpy.float32)) content = mout.tostring() if (not filename) and gp.GnuplotOpts.prefer_fifo_data: @@ -726,10 +728,10 @@ # output data to file as "x y f(x)" triplets. This # requires numy copies of each x value and numx copies of # each y value. First reformat the data: - set = Numeric.transpose( - Numeric.array( - (Numeric.transpose(Numeric.resize(xvals, (numy, numx))), - Numeric.resize(yvals, (numx, numy)), + set = numpy.transpose( + numpy.array( + (numpy.transpose(numpy.resize(xvals, (numy, numx))), + numpy.resize(yvals, (numx, numy)), data)), (1,2,0)) # Now output the data with the usual routine. This will Modified: trunk/README.txt =================================================================== --- trunk/README.txt 2006-07-16 17:48:06 UTC (rev 293) +++ trunk/README.txt 2006-11-07 02:33:08 UTC (rev 294) @@ -65,8 +65,8 @@ Obviously, you must have the gnuplot program if Gnuplot.py is to be of any use to you. Gnuplot can be obtained via -<http://www.gnuplot.info>. You also need Python's Numerical -extension, which is available from <http://numpy.sourceforge.net>. +<http://www.gnuplot.info>. You also need a copy of the numpy package, which +is available from the Scipy group at <http://www.scipy.org/Download>. Gnuplot.py uses Python distutils <http://www.python.org/doc/current/inst/inst.html> and can be Modified: trunk/TODO.txt =================================================================== --- trunk/TODO.txt 2006-07-16 17:48:06 UTC (rev 293) +++ trunk/TODO.txt 2006-11-07 02:33:08 UTC (rev 294) @@ -33,4 +33,3 @@ * Support gnuplot's new abilities to allow user interaction via the mouse. I believe this will require 2-way communication between Gnuplot.py and gnuplot. - Modified: trunk/_Gnuplot.py =================================================================== --- trunk/_Gnuplot.py 2006-07-16 17:48:06 UTC (rev 293) +++ trunk/_Gnuplot.py 2006-11-07 02:33:08 UTC (rev 294) @@ -239,8 +239,8 @@ 'items' is a sequence of items, each of which should be a 'PlotItem' of some kind, a string (interpreted as a function - string for gnuplot to evaluate), or a Numeric array (or - something that can be converted to a Numeric array). + string for gnuplot to evaluate), or a numpy array (or + something that can be converted to a numpy array). """ Modified: trunk/__init__.py =================================================================== --- trunk/__init__.py 2006-07-16 17:48:06 UTC (rev 293) +++ trunk/__init__.py 2006-11-07 02:33:08 UTC (rev 294) @@ -128,9 +128,9 @@ Restrictions: - - Relies on the Numeric Python extension. This can be obtained from - "SourceForge", http://sourceforge.net/projects/numpy/. If you're - interested in gnuplot, you would probably also want NumPy anyway. + - Relies on the numpy Python extension. This can be obtained from + the Scipy group at <http://www.scipy.org/Download>. If you're + interested in gnuplot, you would probably also want numpy anyway. - Only a small fraction of gnuplot functionality is implemented as explicit method functions. However, you can give arbitrary Modified: trunk/demo.py =================================================================== --- trunk/demo.py 2006-07-16 17:48:06 UTC (rev 293) +++ trunk/demo.py 2006-11-07 02:33:08 UTC (rev 294) @@ -13,7 +13,7 @@ """ -from Numeric import * +from numpy import * # If the package has been installed correctly, this should work: import Gnuplot, Gnuplot.funcutils @@ -28,7 +28,7 @@ g = Gnuplot.Gnuplot(debug=1) g.title('A simple example') # (optional) g('set data style linespoints') # give gnuplot an arbitrary command - # Plot a list of (x, y) pairs (tuples or a Numeric array would + # Plot a list of (x, y) pairs (tuples or a numpy array would # also be OK): g.plot([[0,1.1], [1,5.8], [2,3.3], [3,4.2]]) raw_input('Please press return to continue...\n') @@ -36,7 +36,7 @@ g.reset() # Plot one dataset from an array and one via a gnuplot function; # also demonstrate the use of item-specific options: - x = arange(10, typecode=Float) + x = arange(10, dtype='float_') y1 = x**2 # Notice how this plotitem is created here but used later? This # is convenient if the same dataset has to be plotted multiple @@ -71,8 +71,8 @@ # Make a 2-d array containing a function of x and y. First create # xm and ym which contain the x and y values in a matrix form that # can be `broadcast' into a matrix of the appropriate shape: - xm = x[:,NewAxis] - ym = y[NewAxis,:] + xm = x[:,newaxis] + ym = y[newaxis,:] m = (sin(xm) + 0.1*xm) - ym**2 g('set parametric') g('set data style lines') Modified: trunk/funcutils.py =================================================================== --- trunk/funcutils.py 2006-07-16 17:48:06 UTC (rev 293) +++ trunk/funcutils.py 2006-11-07 02:33:08 UTC (rev 294) @@ -1,3 +1,5 @@ +## Automatically adapted for numpy.oldnumeric Sep 22, 2006 by alter_code1.py + #! /usr/bin/env python # $Id$ @@ -14,19 +16,19 @@ """ -import Numeric +import numpy import Gnuplot, utils -def tabulate_function(f, xvals, yvals=None, typecode=None, ufunc=0): +def tabulate_function(f, xvals, yvals=None, dtype=None, ufunc=0): """Evaluate and tabulate a function on a 1- or 2-D grid of points. f should be a function taking one or two floating-point parameters. If f takes one parameter, then xvals should be a 1-D array and - yvals should be None. The return value is a Numeric array + yvals should be None. The return value is a numpy array '[f(x[0]), f(x[1]), ..., f(x[-1])]'. If f takes two parameters, then 'xvals' and 'yvals' should each be @@ -37,7 +39,7 @@ If 'ufunc=0', then 'f' is evaluated at each point using a Python loop. This can be slow if the number of points is large. If - speed is an issue, you should write 'f' in terms of Numeric ufuncs + speed is an issue, you should write 'f' in terms of numpy ufuncs and use the 'ufunc=1' feature described next. If called with 'ufunc=1', then 'f' should be a function that is @@ -49,34 +51,34 @@ if yvals is None: # f is a function of only one variable: - xvals = Numeric.asarray(xvals, typecode) + xvals = numpy.asarray(xvals, dtype) if ufunc: return f(xvals) else: - if typecode is None: - typecode = xvals.typecode() + if dtype is None: + dtype = xvals.dtype.char - m = Numeric.zeros((len(xvals),), typecode) + m = numpy.zeros((len(xvals),), dtype) for xi in range(len(xvals)): x = xvals[xi] m[xi] = f(x) return m else: # f is a function of two variables: - xvals = Numeric.asarray(xvals, typecode) - yvals = Numeric.asarray(yvals, typecode) + xvals = numpy.asarray(xvals, dtype) + yvals = numpy.asarray(yvals, dtype) if ufunc: - return f(xvals[:,Numeric.NewAxis], yvals[Numeric.NewAxis,:]) + return f(xvals[:,numpy.newaxis], yvals[numpy.newaxis,:]) else: - if typecode is None: - # choose a result typecode based on what '+' would return + if dtype is None: + # choose a result dtype based on what '+' would return # (yecch!): - typecode = (Numeric.zeros((1,), xvals.typecode()) + - Numeric.zeros((1,), yvals.typecode())).typecode() + dtype = (numpy.zeros((1,), xvals.dtype.char) + + numpy.zeros((1,), yvals.dtype.char)).dtype.char - m = Numeric.zeros((len(xvals), len(yvals)), typecode) + m = numpy.zeros((len(xvals), len(yvals)), dtype) for xi in range(len(xvals)): x = xvals[xi] for yi in range(len(yvals)): Modified: trunk/setup.py =================================================================== --- trunk/setup.py 2006-07-16 17:48:06 UTC (rev 293) +++ trunk/setup.py 2006-11-07 02:33:08 UTC (rev 294) @@ -29,7 +29,8 @@ author_email='mh...@al...', url='http://gnuplot-py.sourceforge.net', license='LGPL', - licence='LGPL', # Spelling error in distutils + # fixed as of python2.3 + # licence='LGPL', # Spelling error in distutils # Description of the package in the distribution package_dir={'Gnuplot' : '.'}, Modified: trunk/test.py =================================================================== --- trunk/test.py 2006-07-16 17:48:06 UTC (rev 293) +++ trunk/test.py 2006-11-07 02:33:08 UTC (rev 294) @@ -1,3 +1,5 @@ +## Automatically adapted for numpy.oldnumeric Sep 22, 2006 by alter_code1.py + #! /usr/bin/env python # $Id$ @@ -15,8 +17,7 @@ """ import os, time, math, tempfile -import Numeric -from Numeric import NewAxis +import numpy try: import Gnuplot, Gnuplot.PlotItems, Gnuplot.funcutils @@ -59,7 +60,7 @@ f = open(filename1, 'w') filename2 = tempfile.mktemp() try: - for x in Numeric.arange(100)/5. - 10.: + for x in numpy.arange(100.)/5. - 10.: f.write('%s %s %s\n' % (x, math.cos(x), math.sin(x))) f.close() @@ -141,10 +142,10 @@ g.plot(f) print '############### test Data ###################################' - x = Numeric.arange(100)/5. - 10. - y1 = Numeric.cos(x) - y2 = Numeric.sin(x) - d = Numeric.transpose((x,y1,y2)) + x = numpy.arange(100)/5. - 10. + y1 = numpy.cos(x) + y2 = numpy.sin(x) + d = numpy.transpose((x,y1,y2)) wait('Plot Data against its index') g.plot(Gnuplot.Data(y2, inline=0)) @@ -187,7 +188,7 @@ g.plot(Gnuplot.Data(d, title='Cosine of x')) print '############### test compute_Data ###########################' - x = Numeric.arange(100)/5. - 10. + x = numpy.arange(100)/5. - 10. wait('Plot Data, computed by Gnuplot.py') g.plot( @@ -259,14 +260,14 @@ print '############### test GridData and compute_GridData ##########' # set up x and y values at which the function will be tabulated: - x = Numeric.arange(35)/2.0 - y = Numeric.arange(30)/10.0 - 1.5 + x = numpy.arange(35)/2.0 + y = numpy.arange(30)/10.0 - 1.5 # Make a 2-d array containing a function of x and y. First create # xm and ym which contain the x and y values in a matrix form that # can be `broadcast' into a matrix of the appropriate shape: - xm = x[:,NewAxis] - ym = y[NewAxis,:] - m = (Numeric.sin(xm) + 0.1*xm) - ym**2 + xm = x[:,numpy.newaxis] + ym = y[numpy.newaxis,:] + m = (numpy.sin(xm) + 0.1*xm) - ym**2 wait('a function of two variables from a GridData file') g('set parametric') g('set data style lines') @@ -299,12 +300,12 @@ wait('Use compute_GridData in ufunc and binary mode') g.splot(Gnuplot.funcutils.compute_GridData( - x,y, lambda x,y: Numeric.sin(x) + 0.1*x - y**2, + x,y, lambda x,y: numpy.sin(x) + 0.1*x - y**2, ufunc=1, binary=1, )) wait('Same thing, with an intermediate file') Gnuplot.funcutils.compute_GridData( - x,y, lambda x,y: Numeric.sin(x) + 0.1*x - y**2, + x,y, lambda x,y: numpy.sin(x) + 0.1*x - y**2, ufunc=1, binary=1, filename=filename1) g.splot(Gnuplot.File(filename1, binary=1)) Modified: trunk/utils.py =================================================================== --- trunk/utils.py 2006-07-16 17:48:06 UTC (rev 293) +++ trunk/utils.py 2006-11-07 02:33:08 UTC (rev 294) @@ -1,3 +1,5 @@ +## Automatically adapted for numpy.oldnumeric Sep 22, 2006 by alter_code1.py + #! /usr/bin/env python # $Id$ @@ -15,30 +17,34 @@ """ import string -import Numeric +import numpy - def float_array(m): - """Return the argument as a Numeric array of type at least 'Float32'. + """Return the argument as a numpy array of type at least 'Float32'. Leave 'Float64' unchanged, but upcast all other types to 'Float32'. Allow also for the possibility that the argument is a - python native type that can be converted to a Numeric array using - 'Numeric.asarray()', but in that case don't worry about + python native type that can be converted to a numpy array using + 'numpy.asarray()', but in that case don't worry about downcasting to single-precision float. """ try: # Try Float32 (this will refuse to downcast) - return Numeric.asarray(m, Numeric.Float32) + return numpy.asarray(m, numpy.float32) except TypeError: # That failure might have been because the input array was - # of a wider data type than Float32; try to convert to the + # of a wider data type than float32; try to convert to the # largest floating-point type available: - return Numeric.asarray(m, Numeric.Float) + # NOTE TBD: I'm not sure float_ is the best data-type for this... + try: + return numpy.asarray(m, numpy.float_) + except TypeError: + # TBD: Need better handling of this error! + print "Fatal: array dimensions not equal!" + return None - def write_array(f, set, item_sep=' ', nest_prefix='', nest_suffix='\n', nest_sep=''): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mh...@us...> - 2007-03-30 11:25:26
|
Revision: 297 http://svn.sourceforge.net/gnuplot-py/?rev=297&view=rev Author: mhagger Date: 2007-03-30 04:25:28 -0700 (Fri, 30 Mar 2007) Log Message: ----------- Delete the information comment line "Automatically adapted for numpy.oldnumeric Sep 22, 2006 by alter_code1.py" as (1) it doesn't need to be permanently documented in the modified files and (2) it screws up the "#!" line needed to execute the files under Unix. Modified Paths: -------------- trunk/PlotItems.py trunk/funcutils.py trunk/test.py trunk/utils.py Modified: trunk/PlotItems.py =================================================================== --- trunk/PlotItems.py 2007-03-30 10:57:31 UTC (rev 296) +++ trunk/PlotItems.py 2007-03-30 11:25:28 UTC (rev 297) @@ -1,5 +1,3 @@ -## Automatically adapted for numpy.oldnumeric Sep 22, 2006 by alter_code1.py - # $Id$ # Copyright (C) 1998-2003 Michael Haggerty <mh...@al...> Modified: trunk/funcutils.py =================================================================== --- trunk/funcutils.py 2007-03-30 10:57:31 UTC (rev 296) +++ trunk/funcutils.py 2007-03-30 11:25:28 UTC (rev 297) @@ -1,5 +1,3 @@ -## Automatically adapted for numpy.oldnumeric Sep 22, 2006 by alter_code1.py - #! /usr/bin/env python # $Id$ Modified: trunk/test.py =================================================================== --- trunk/test.py 2007-03-30 10:57:31 UTC (rev 296) +++ trunk/test.py 2007-03-30 11:25:28 UTC (rev 297) @@ -1,5 +1,3 @@ -## Automatically adapted for numpy.oldnumeric Sep 22, 2006 by alter_code1.py - #! /usr/bin/env python # $Id$ Modified: trunk/utils.py =================================================================== --- trunk/utils.py 2007-03-30 10:57:31 UTC (rev 296) +++ trunk/utils.py 2007-03-30 11:25:28 UTC (rev 297) @@ -1,5 +1,3 @@ -## Automatically adapted for numpy.oldnumeric Sep 22, 2006 by alter_code1.py - #! /usr/bin/env python # $Id$ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mh...@us...> - 2007-03-30 12:52:16
|
Revision: 299 http://svn.sourceforge.net/gnuplot-py/?rev=299&view=rev Author: mhagger Date: 2007-03-30 05:52:17 -0700 (Fri, 30 Mar 2007) Log Message: ----------- "with" will be a Python keyword starting in Python 2.6 (and Python 2.5 already emits warnings if "with" is used as an identifier. So... Do not use "with" as an identifier within Gnuplot.py (including the test and demo scripts). Rename the PlotItem "with" parameter to "with_". However, for backwards compatibility (and through the magic of Python varargs processing), accept "with" as an alternative spelling of this option. This version runs on my computer, but I only have Python 2.4 installed, so I can't really test it. Modified Paths: -------------- trunk/PlotItems.py trunk/demo.py trunk/test.py Modified: trunk/PlotItems.py =================================================================== --- trunk/PlotItems.py 2007-03-30 11:27:17 UTC (rev 298) +++ trunk/PlotItems.py 2007-03-30 12:52:17 UTC (rev 299) @@ -83,11 +83,12 @@ _option_list = { 'axes' : lambda self, axes: self.set_string_option( 'axes', axes, None, 'axes %s'), - 'with' : lambda self, with: self.set_string_option( - 'with', with, None, 'with %s'), + 'with' : lambda self, with_: self.set_string_option( + 'with', with_, None, 'with %s'), 'title' : lambda self, title: self.set_string_option( 'title', title, 'notitle', 'title "%s"'), } + _option_list['with_'] = _option_list['with'] # order in which options need to be passed to gnuplot: _option_sequence = [ @@ -101,8 +102,8 @@ Keyword options: - 'with=<string>' -- choose how item will be plotted, e.g., - with='points 3 3'. + 'with_=<string>' -- choose how item will be plotted, e.g., + with_='points 3 3'. 'title=<string>' -- set the title to be associated with the item in the plot legend. @@ -215,7 +216,7 @@ into gnuplot itself. The argument to the contructor is a string that should be a mathematical expression. Example:: - g.plot(Func('sin(x)', with='line 3')) + g.plot(Func('sin(x)', with_='line 3')) As shorthand, a string passed to the plot method of a Gnuplot object is also treated as a Func:: Modified: trunk/demo.py =================================================================== --- trunk/demo.py 2007-03-30 11:27:17 UTC (rev 298) +++ trunk/demo.py 2007-03-30 12:52:17 UTC (rev 299) @@ -44,7 +44,7 @@ # written to a temporary file once. d = Gnuplot.Data(x, y1, title='calculated by python', - with='points 3 3') + with_='points 3 3') g.title('Data can be computed by python or gnuplot') g.xlabel('x') g.ylabel('x squared') Modified: trunk/test.py =================================================================== --- trunk/test.py 2007-03-30 11:27:17 UTC (rev 298) +++ trunk/test.py 2007-03-30 12:52:17 UTC (rev 299) @@ -73,7 +73,7 @@ g.replot() wait('Style linespoints') - g.plot(Gnuplot.Func('sin(x)', with='linespoints')) + g.plot(Gnuplot.Func('sin(x)', with_='linespoints')) wait('title=None') g.plot(Gnuplot.Func('sin(x)', title=None)) wait('title="Sine of x"') @@ -86,7 +86,7 @@ wait('Original') g.plot(f) wait('Style linespoints') - f.set_option(with='linespoints') + f.set_option(with_='linespoints') g.plot(f) wait('title=None') f.set_option(title=None) @@ -103,20 +103,20 @@ g.plot(Gnuplot.File(filename1)) wait('Style lines') - g.plot(Gnuplot.File(filename1, with='lines')) + g.plot(Gnuplot.File(filename1, with_='lines')) wait('using=1, using=(1,)') - g.plot(Gnuplot.File(filename1, using=1, with='lines'), - Gnuplot.File(filename1, using=(1,), with='points')) + g.plot(Gnuplot.File(filename1, using=1, with_='lines'), + Gnuplot.File(filename1, using=(1,), with_='points')) wait('using=(1,2), using="1:3"') g.plot(Gnuplot.File(filename1, using=(1,2)), Gnuplot.File(filename1, using='1:3')) wait('every=5, every=(5,)') - g.plot(Gnuplot.File(filename1, every=5, with='lines'), - Gnuplot.File(filename1, every=(5,), with='points')) + g.plot(Gnuplot.File(filename1, every=5, with_='lines'), + Gnuplot.File(filename1, every=(5,), with_='points')) wait('every=(10,None,0), every="10::5"') - g.plot(Gnuplot.File(filename1, with='lines'), + g.plot(Gnuplot.File(filename1, with_='lines'), Gnuplot.File(filename1, every=(10,None,0)), Gnuplot.File(filename1, every='10::5')) @@ -130,7 +130,7 @@ wait('Original') g.plot(f) wait('Style linespoints') - f.set_option(with='linespoints') + f.set_option(with_='linespoints') g.plot(f) wait('using=(1,3)') f.set_option(using=(1,3)) @@ -163,8 +163,8 @@ g.plot(Gnuplot.File(filename1)) wait('Same thing, inline data') g.plot(Gnuplot.Data(d, inline=1)) - wait('with="lp 4 4"') - g.plot(Gnuplot.Data(d, with='lp 4 4')) + wait('with_="lp 4 4"') + g.plot(Gnuplot.Data(d, with_='lp 4 4')) wait('cols=0') g.plot(Gnuplot.Data(d, cols=0)) wait('cols=(0,1), cols=(0,2)') @@ -199,13 +199,13 @@ g.plot(Gnuplot.File(filename1)) wait('Same thing, inline data') g.plot(Gnuplot.funcutils.compute_Data(x, math.cos, inline=1)) - wait('with="lp 4 4"') - g.plot(Gnuplot.funcutils.compute_Data(x, math.cos, with='lp 4 4')) + wait('with_="lp 4 4"') + g.plot(Gnuplot.funcutils.compute_Data(x, math.cos, with_='lp 4 4')) print '############### test hardcopy ###############################' print '******** Generating postscript file "gp_test.ps" ********' wait() - g.plot(Gnuplot.Func('cos(0.5*x*x)', with='linespoints 2 2', + g.plot(Gnuplot.Func('cos(0.5*x*x)', with_='linespoints 2 2', title='cos(0.5*x^2)')) g.hardcopy('gp_test.ps') @@ -249,12 +249,12 @@ print '############### test splot ##################################' wait('a 3-d curve') - g.splot(Gnuplot.Data(d, with='linesp', inline=0)) + g.splot(Gnuplot.Data(d, with_='linesp', inline=0)) wait('Same thing, saved to a file') Gnuplot.Data(d, inline=0, filename=filename1) - g.splot(Gnuplot.File(filename1, with='linesp')) + g.splot(Gnuplot.File(filename1, with_='linesp')) wait('Same thing, inline data') - g.splot(Gnuplot.Data(d, with='linesp', inline=1)) + g.splot(Gnuplot.Data(d, with_='linesp', inline=1)) print '############### test GridData and compute_GridData ##########' # set up x and y values at which the function will be tabulated: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bm...@us...> - 2008-01-14 21:22:10
|
Revision: 300 http://gnuplot-py.svn.sourceforge.net/gnuplot-py/?rev=300&view=rev Author: bmcage Date: 2008-01-14 13:21:24 -0800 (Mon, 14 Jan 2008) Log Message: ----------- prepare for 1.8 release Modified Paths: -------------- trunk/ANNOUNCE.txt trunk/NEWS.txt Modified: trunk/ANNOUNCE.txt =================================================================== --- trunk/ANNOUNCE.txt 2007-03-30 12:52:17 UTC (rev 299) +++ trunk/ANNOUNCE.txt 2008-01-14 21:21:24 UTC (rev 300) @@ -1,4 +1,4 @@ -This is to announce the release of version 1.7 of Gnuplot.py. +This is to announce the release of version 1.8 of Gnuplot.py. Gnuplot.py is a Python [1] package that allows you to create graphs from within Python using the gnuplot [2] plotting program. @@ -35,16 +35,11 @@ other using Gnuplot.py to produce a crude animation. New features in this version: + + Various bug fixes + + an option "filename" to Data and GridDat + This allows saving the data to a permanent, rather than temporary + + pdf terminal definition - + Relaxed license from GPL to LGPL. - + Added support for sending data to gnuplot via FIFOs (named pipes). - This eliminates the ambiguity about when temporary files can be - deleted, and thereby removes a common source of problems with - Gnuplot.py. Unfortunately, FIFOs only work under forms of unix. - + Added preliminary support for running Gnuplot.py under Jython, the - Java implementation of the Python language. It partly works but - depends on JNumeric, which is still beta-level. - Features already present in older versions: + Two and three-dimensional plots. @@ -65,8 +60,10 @@ + Partly table-driven to make it easy to extend. New terminal types can be supported easily by adding data to a table. + Install via distutils. + + LGPL license . + + Support for sending data to gnuplot via FIFOs (named pipes, linux only). + + Preliminary support for running Gnuplot.py under Jython - Footnotes: ---------- [1] Python <http://www.python.org> is an excellent object-oriented Modified: trunk/NEWS.txt =================================================================== --- trunk/NEWS.txt 2007-03-30 12:52:17 UTC (rev 299) +++ trunk/NEWS.txt 2008-01-14 21:21:24 UTC (rev 300) @@ -3,9 +3,13 @@ This file describes the changes introduced in each version of the Gnuplot.py package. +Version ?.? -Version ?.?: +Version 1.8: +* Use with_ instead of with as that will be a python keyword in the + future. + * Added an option "filename" to Data and GridData in PlotItems.py. This allows saving the data to a permanent, rather than temporary, file. (Patch contributed by Matthew Fulmer.) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bm...@us...> - 2008-01-14 21:30:36
|
Revision: 301 http://gnuplot-py.svn.sourceforge.net/gnuplot-py/?rev=301&view=rev Author: bmcage Date: 2008-01-14 13:30:39 -0800 (Mon, 14 Jan 2008) Log Message: ----------- prepare for 1.8 release Modified Paths: -------------- trunk/Gnuplot.html trunk/README.txt Modified: trunk/Gnuplot.html =================================================================== --- trunk/Gnuplot.html 2008-01-14 21:21:24 UTC (rev 300) +++ trunk/Gnuplot.html 2008-01-14 21:30:39 UTC (rev 301) @@ -25,7 +25,7 @@ project page</a> on SourceForge. <li> Download the <a href="http://sourceforge.net/project/showfiles.php?group_id=17434"> - current version (version 1.7)</a> (includes documentation) + current version (version 1.8)</a> (includes documentation) <li> The <a href="http://gnuplot-py.sourceforge.net/doc">online documentation</a> @@ -68,6 +68,10 @@ <h2>News</h2> +<p> (January 2008) Gnuplot.py version 1.8 is out. This version +includes bugfixes and improvements that have piled up since 1.7. +For more information, read the <tt>NEWS.txt</tt> file in the distribution. </p> + <p> (17 October 2003) Gnuplot.py version 1.7 is out. This version includes a change of license from GPL to LGPL, support for sending data to Gnuplot via FIFOs (named pipes) under unix, and preliminary @@ -132,11 +136,11 @@ <ol> <li> <a href="http://sourceforge.net/project/showfiles.php?group_id=17434">Download</a> - either <code>gnuplot-py-1.7.tar.gz</code> or <code> - Gnuplot-1.7.zip</code>. + either <code>gnuplot-py-1.8.tar.gz</code> or <code> + Gnuplot-1.8.zip</code>. <li> Gunzip and untar (or unzip) it, which will create a directory - called <code>gnuplot-1.7</code>. + called <code>gnuplot-1.8</code>. <li> Refer to <tt>README.txt</tt> in that directory for further instructions. Usually it should be enough to type <code>python Modified: trunk/README.txt =================================================================== --- trunk/README.txt 2008-01-14 21:21:24 UTC (rev 300) +++ trunk/README.txt 2008-01-14 21:30:39 UTC (rev 301) @@ -54,7 +54,7 @@ Quick instructions: -1. Download gnuplot-py-1.7.tar.gz or gnuplot-py-1.7.zip. +1. Download gnuplot-py-1.8.tar.gz or gnuplot-py-1.8.zip. 2. Extract the archive to a temporary directory. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bm...@us...> - 2008-01-14 22:15:14
|
Revision: 302 http://gnuplot-py.svn.sourceforge.net/gnuplot-py/?rev=302&view=rev Author: bmcage Date: 2008-01-14 14:15:19 -0800 (Mon, 14 Jan 2008) Log Message: ----------- allow svg output, add test Modified Paths: -------------- trunk/NEWS.txt trunk/termdefs.py trunk/test.py Modified: trunk/NEWS.txt =================================================================== --- trunk/NEWS.txt 2008-01-14 21:30:39 UTC (rev 301) +++ trunk/NEWS.txt 2008-01-14 22:15:19 UTC (rev 302) @@ -7,6 +7,8 @@ Version 1.8: +* hardcopy allows for terminal='svg' (using a patch from Spyros Blanas) + * Use with_ instead of with as that will be a python keyword in the future. Modified: trunk/termdefs.py =================================================================== --- trunk/termdefs.py 2008-01-14 21:30:39 UTC (rev 301) +++ trunk/termdefs.py 2008-01-14 22:15:19 UTC (rev 302) @@ -469,3 +469,11 @@ BareStringArg(argname='fontsize'), ] +terminal_opts['svg'] = [ + BareStringArg(argname='size', fixedword='size'), # tuple of two doubles + KeywordOrBooleanArg(options=['fixed', 'dynamic']), + StringArg(argname='fname', fixedword='fname'), + BareStringArg(argname='fsize', fixedword='fsize'), + KeywordOrBooleanArg(options=['enhanced', 'noenhanced']), + StringArg(argname='fontfile', fixedword='fontfile'), + ] Modified: trunk/test.py =================================================================== --- trunk/test.py 2008-01-14 21:30:39 UTC (rev 301) +++ trunk/test.py 2008-01-14 22:15:19 UTC (rev 302) @@ -243,6 +243,16 @@ wait('Testing hardcopy options: fontsize=20') g.hardcopy('gp_test.ps', fontsize=20) + print '******** Generating svg file "gp_test.svg" ********' + wait() + g.plot(Gnuplot.Func('cos(0.5*x*x)', with_='linespoints 2 2', + title='cos(0.5*x^2)')) + g.hardcopy('gp_test.svg', terminal='svg') + + wait('Testing hardcopy svg options: enhanced') + g.hardcopy('gp_test.ps', terminal='svg', enhanced='1') + + print '############### test shortcuts ##############################' wait('plot Func and Data using shortcuts') g.plot('sin(x)', d) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bm...@us...> - 2008-01-17 20:10:44
|
Revision: 305 http://gnuplot-py.svn.sourceforge.net/gnuplot-py/?rev=305&view=rev Author: bmcage Date: 2008-01-17 12:10:44 -0800 (Thu, 17 Jan 2008) Log Message: ----------- 2008-01-17 Benny Malengier <ben...@gm...> * _Gnuplot.py: set output before terminal so as not to overwrite previous output file. Modified Paths: -------------- trunk/ChangeLog trunk/_Gnuplot.py Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-01-17 20:07:04 UTC (rev 304) +++ trunk/ChangeLog 2008-01-17 20:10:44 UTC (rev 305) @@ -1,2 +1,6 @@ 2008-01-17 Benny Malengier <ben...@gm...> + * _Gnuplot.py: set output before terminal so as not to overwrite + previous output file. + +2008-01-17 Benny Malengier <ben...@gm...> * ChangeLog: add ChangeLog file to keep track of changes \ No newline at end of file Modified: trunk/_Gnuplot.py =================================================================== --- trunk/_Gnuplot.py 2008-01-17 20:07:04 UTC (rev 304) +++ trunk/_Gnuplot.py 2008-01-17 20:10:44 UTC (rev 305) @@ -574,8 +574,8 @@ % (string.join(keyw.keys(), ', '),) ) + self.set_string('output', filename) self(string.join(setterm)) - self.set_string('output', filename) # replot the current figure (to the printer): self.refresh() # reset the terminal to its `default' setting: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-05-02 01:08:58
|
Revision: 306 http://gnuplot-py.svn.sourceforge.net/gnuplot-py/?rev=306&view=rev Author: alford Date: 2008-05-01 18:09:02 -0700 (Thu, 01 May 2008) Log Message: ----------- Official version 1.8 Modified Paths: -------------- trunk/RELEASES.txt trunk/__init__.py Modified: trunk/RELEASES.txt =================================================================== --- trunk/RELEASES.txt 2008-01-17 20:10:44 UTC (rev 305) +++ trunk/RELEASES.txt 2008-05-02 01:09:02 UTC (rev 306) @@ -14,14 +14,14 @@ Gnuplot.html -- update the version number where it appears. Update the "News" section. - __init__.py -- increment the __version__ string. + __init__.py -- increment the __version__ string. No "+" on the end. 2. Check the changes into Subversion. 3. Tag the release in Subversion: $ svn cp https://svn.sourceforge.net/svnroot/gnuplot-py/trunk \ - https://svn.sourceforge.net/svnroot/gnuplot-py/tags/release-1.7 + https://svn.sourceforge.net/svnroot/gnuplot-py/tags/release-1.8 4. Create new documentation using happydoc: @@ -34,7 +34,7 @@ $ python2 ./setup.py sdist --formats=gztar,zip -6. Generate the binary distributions. [I don't think a binary +6. [OMIT THIS] Generate the binary distributions. [I don't think a binary distribution is worthwhile because the place that the files need to be installed is dependent on the version of python being used.] Modified: trunk/__init__.py =================================================================== --- trunk/__init__.py 2008-01-17 20:10:44 UTC (rev 305) +++ trunk/__init__.py 2008-05-02 01:09:02 UTC (rev 306) @@ -156,7 +156,7 @@ """ -__version__ = '1.7+' +__version__ = '1.8' # Other modules that should be loaded for 'from Gnuplot import *': __all__ = ['utils', 'funcutils', ] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-05-04 20:26:09
|
Revision: 308 http://gnuplot-py.svn.sourceforge.net/gnuplot-py/?rev=308&view=rev Author: alford Date: 2008-05-04 13:26:08 -0700 (Sun, 04 May 2008) Log Message: ----------- Version 1.8+ Modified Paths: -------------- trunk/RELEASES.txt trunk/__init__.py Modified: trunk/RELEASES.txt =================================================================== --- trunk/RELEASES.txt 2008-05-02 21:38:03 UTC (rev 307) +++ trunk/RELEASES.txt 2008-05-04 20:26:08 UTC (rev 308) @@ -3,6 +3,10 @@ These are my notes about the steps to make a new release of Gnuplot.py. +0. Get the current SVN version, and put it in a directory called Gnuplot + $ svn co --username=SFNAME https://gnuplot-py.svn.sourceforge.net/svnroot/gnuplot-py/trunk Gnuplot + where SFNAME is your sourceforge username. + 1. Edit the following files for the release: NEWS.txt -- add the version number at the top of the file and make @@ -17,20 +21,18 @@ __init__.py -- increment the __version__ string. No "+" on the end. 2. Check the changes into Subversion. + $ svn commit -m "Official version 1.8" 3. Tag the release in Subversion: + $ svn cp https://gnuplot-py.svn.sourceforge.net/svnroot/gnuplot-py/trunk \ + https://gnuplot-py.svn.sourceforge.net/svnroot/gnuplot-py/tags/release-1.8 -m "Adding tag for release 1.8." - $ svn cp https://svn.sourceforge.net/svnroot/gnuplot-py/trunk \ - https://svn.sourceforge.net/svnroot/gnuplot-py/tags/release-1.8 - -4. Create new documentation using happydoc: - +4. Create new documentation using happydoc. cd to the Gnuplot directory, then $ rm -rf doc - $ ( cd .. ; - happydoc -d Gnuplot/doc -t 'Gnuplot.py' \ - --author='Michael Haggerty <mh...@al...>' Gnuplot ) + $ cd .. + $ happydoc -d Gnuplot/doc -t 'Gnuplot.py' Gnuplot -5. Generate the source distributions: +5. Generate the source distributions in Gnuplot/dist; cd to Gnuplot and then: $ python2 ./setup.py sdist --formats=gztar,zip @@ -40,30 +42,58 @@ $ python2 ./setup.py bdist --format=gztar,zip,rpm,wininst + + 7. Release the files on SourceForge: + $ cd dist + $ ftp upload.sourceforge.net (username anonymous) + cd incoming + put gnuplot-py-1.8.tar.gz + put gnuplot-py-1.8.zip + a. Go to the "Admin" page. b. Go to the "File release system" page. c. Click on "Add Release" for package Gnuplot-py. - d. Type a release name of the form "1.7". + d. Type a release name of the form "1.8". - e. Paste the "New features in this version" section of ANNOUNCE.txt - into the "release notes" text box. + Click on "Create This Release" + + e. In "Step 1: Edit Existing Release", + check the "Preserve my pre-formatted text." button below the text boxes + Paste the "New features in this version" section of ANNOUNCE.txt + into the "Paste the notes in" text box. + Paste the section of NEWS.txt for this release in to the + "Paste The Change Log In" text box + Click "Submit/refresh" - f. Follow the instructions to release the files. + f. In "Step 2: Add Files To This Release" section, + Select gnuplot-py-1.8.tar.gz and gnuplot-py-1.8.zip in the then click + "Add files or refresh view" - g. Send an email to people monitoring the project with the button - at the bottom of the release page. + g. In step 3 "Edit Files In This Release", + For gnuplot-py-1.8.tar.gz, under "Processor" select + "Platform-Independent" and under "file type" select "source .gz", + then click "Update/refresh" + For gnuplot-py-1.8.zip, under "Processor" select + "Platform-Independent" and under "file type" select "source .zip". + then click "Update/refresh" -8. Send an announcement to gnuplot-py-users. + h. In "Step 4: Email release notice", check "I'm sure", then + click "Send Notice". +8. Send an announcement to gnu...@li... + 9. Send an announcement to comp.lang.python. 10. Append a '+' to the __version__ string in __init__.py to distinguish intermediate Subversion releases from official releases. Add a "Version ?.?:" line to NEWS.txt to receive future - change notes. Check the changes into Subversion. + change notes. + [Remove backup files (ending with '~')] + Check the changes into Subversion: + svn commit -m "Version 1.8+" Modified: trunk/__init__.py =================================================================== --- trunk/__init__.py 2008-05-02 21:38:03 UTC (rev 307) +++ trunk/__init__.py 2008-05-04 20:26:08 UTC (rev 308) @@ -156,7 +156,7 @@ """ -__version__ = '1.8' +__version__ = '1.8+' # Other modules that should be loaded for 'from Gnuplot import *': __all__ = ['utils', 'funcutils', ] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2008-05-08 14:39:39
|
Revision: 309 http://gnuplot-py.svn.sourceforge.net/gnuplot-py/?rev=309&view=rev Author: alford Date: 2008-05-08 07:38:57 -0700 (Thu, 08 May 2008) Log Message: ----------- Updated and expanded RELEASES.txt Modified Paths: -------------- trunk/Gnuplot.html trunk/RELEASES.txt Modified: trunk/Gnuplot.html =================================================================== --- trunk/Gnuplot.html 2008-05-04 20:26:08 UTC (rev 308) +++ trunk/Gnuplot.html 2008-05-08 14:38:57 UTC (rev 309) @@ -1,15 +1,17 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>Gnuplot.py</title> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> </head> -<body bgcolor="#ffffff"> +<body> -<center><h1>Gnuplot.py on <a href="http://sourceforge.net"><img +<h1>Gnuplot.py on <a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=17434&type=1" -width="88" height="31" border="0" alt="SourceForge Logo"></a></h1></center> + alt="SourceForge Logo"/></a></h1> +<!-- width="88" height="31" border="0" --> <table> <tr> @@ -19,19 +21,19 @@ <td> <ul> <li> The <a - href="http://gnuplot-py.sourceforge.net">Gnuplot.py home page</a> + href="http://gnuplot-py.sourceforge.net">Gnuplot.py home page</a></li> <li> The <a href="http://sourceforge.net/projects/gnuplot-py/">Gnuplot.py - project page</a> on SourceForge. + project page</a> on SourceForge.</li> <li> Download the <a href="http://sourceforge.net/project/showfiles.php?group_id=17434"> - current version (version 1.8)</a> (includes documentation) + current version (version 1.8)</a> (includes documentation)</li> <li> The <a href="http://gnuplot-py.sourceforge.net/doc">online - documentation</a> + documentation</a></li> <li> The <a href="http://lists.sourceforge.net/lists/listinfo/gnuplot-py-users">Gnuplot.py - users' mailing list</a> + users' mailing list</a></li> </ul> </td> </tr> @@ -43,10 +45,10 @@ href="http://www.gnuplot.info/">gnuplot</a>, the popular open-source plotting program. It allows you to use gnuplot from within Python to plot arrays of data from memory, data files, or mathematical -functions. If you use Python to perform computations or as `glue' for +functions. If you use Python to perform computations or as 'glue' for numerical programs, you can use this package to plot data on the fly as they are computed. And the combination with Python makes it is -easy to automate things, including to create crude `animations' by +easy to automate things, including to create crude 'animations' by plotting different datasets one after another. </p> <p> Commands are communicated to gnuplot through a pipe and data @@ -60,16 +62,17 @@ flexibility to set plot options and to run multiple gnuplot sessions simultaneously. If you are more ambitious, it is not difficult to add entirely new types of plottable items by deriving from the -`<tt>PlotItem</tt>' class. </p> +'<tt>PlotItem</tt>' class. </p> <p> The package includes a demonstration that can be run by typing -`<tt>python demo.py</tt>'. </p> +'<tt>python demo.py</tt>'. </p> <h2>News</h2> -<p> (January 2008) Gnuplot.py version 1.8 is out. This version -includes bugfixes and improvements that have piled up since 1.7. +<p> (2 May 2008) Gnuplot.py version 1.8 is out. This version +includes bugfixes and improvements that have piled up since 1.7, +including compatibility with NumPy. For more information, read the <tt>NEWS.txt</tt> file in the distribution. </p> <p> (17 October 2003) Gnuplot.py version 1.7 is out. This version @@ -82,7 +85,7 @@ <h2>Documentation</h2> <p> The quickest way to learn how to use Gnuplot.py is to install it -then run the simple demonstration by typing `<tt>python demo.py</tt>', +then run the simple demonstration by typing '<tt>python demo.py</tt>', then to look at the <tt>demo.py</tt> file to see the commands that create the demo. One of the examples is probably similar to what you want to do. </p> @@ -99,7 +102,7 @@ at the docstrings yourself by opening the python files in an editor. </p> -<p> Finally, there is a new <a +<p> Finally, there is a <a href="mailto:gnu...@li...">mailing list</a> for Gnuplot.py users. For more information about subscribing to the list or viewing the archive of old articles, please click <a @@ -108,9 +111,8 @@ <p> To get good use out of Gnuplot.py, you will want to know something about gnuplot, for which a good source is the gnuplot help (run -gnuplot then type `help', or read it online at <a -href="http://www.gnuplot.info/gnuplot.html"> this -website</a>). You might also want to check out Bernhard Reiter's <a +gnuplot then type 'help', or read it online at <a +href="http://www.gnuplot.info/">the gnuplot website</a>). You might also want to check out Bernhard Reiter's <a href="http://www.usf.uni-osnabrueck.de/~breiter/tools/gnuplot/index.en.html"> gnuplot information page</a>, which has many more links. </p> @@ -122,11 +124,11 @@ <p> Before you can use Gnuplot.py, you will need working versions of </p> <ul> - <li> the <a href="http://www.gnuplot.info">gnuplot</a> program, + <li> the <a href="http://www.gnuplot.info">gnuplot</a> program,</li> <li> <a href="http://www.python.org">Python</a> (version 2.2 or - later), and - <li> the <a href="http://numpy.sourceforge.net/"> Numeric Python - extension</a> + later), and</li> + <li> the <a href="http://numpy.scipy.org/">"NumPy"</a> Numeric + computation package for Python.</li> </ul> <p> If you want to run under MS Windows, make sure you have @@ -137,14 +139,14 @@ <li> <a href="http://sourceforge.net/project/showfiles.php?group_id=17434">Download</a> either <code>gnuplot-py-1.8.tar.gz</code> or <code> - Gnuplot-1.8.zip</code>. + Gnuplot-1.8.zip</code>.</li> <li> Gunzip and untar (or unzip) it, which will create a directory - called <code>gnuplot-1.8</code>. + called <code>gnuplot-1.8</code>.</li> <li> Refer to <tt>README.txt</tt> in that directory for further instructions. Usually it should be enough to type <code>python - setup.py install</code>. + setup.py install</code>.</li> </ol> @@ -162,11 +164,11 @@ into commercial products. See the <a href="LICENSE"> LICENCE</a> file for more information. (If these restrictions are a problem for you, please contact me to discuss the issue.) +</p> <h2>Credits</h2> -<p> The Gnuplot.py package was written by <a -href="http://monsoon.harvard.edu/~mhagger/">Michael Haggerty</a>. </p> +<p> The Gnuplot.py package was written by Michael Haggerty. </p> <p> The package was inspired by and partly derived from the Gnuplot.py module written by <a href="http://starship.python.net/crew/hinsen/"> @@ -187,18 +189,18 @@ <p> Thanks also to many other users who have submitted suggestions, bug fixes, and other feedback. </p> -<hr> +<hr/> +<p> +Written by Michael Haggerty (email <a href="mailto:mh...@al..."> +<<i>mh...@al...</i>></a>)</p> -Written by <a href="http://monsoon.harvard.edu/~mhagger/">Michael -Haggerty</a> (email <a href="mailto:mh...@al..."> -<<i>mh...@al...</i>></a>)<br> - <p> - <a href="http://validator.w3.org/check/referer"> - <img border="0" src="http://www.w3.org/Icons/valid-html401" - alt="Valid HTML 4.01!" height="31" width="88"> -</a> -This page should be viewable on any standards-compliant browser. + <a href="http://validator.w3.org/check?uri=referer"><img + src="http://www.w3.org/Icons/valid-xhtml10" + alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a> </p> +<p> +</p> -</body> </html> +</body> +</html> Modified: trunk/RELEASES.txt =================================================================== --- trunk/RELEASES.txt 2008-05-04 20:26:08 UTC (rev 308) +++ trunk/RELEASES.txt 2008-05-08 14:38:57 UTC (rev 309) @@ -1,26 +1,27 @@ # $Id$ -These are my notes about the steps to make a new release of -Gnuplot.py. +These are notes about the steps to make a new release of Gnuplot.py. -0. Get the current SVN version, and put it in a directory called Gnuplot +0. Get the current SVN version, and put it in a local directory called Gnuplot $ svn co --username=SFNAME https://gnuplot-py.svn.sourceforge.net/svnroot/gnuplot-py/trunk Gnuplot where SFNAME is your sourceforge username. 1. Edit the following files for the release: NEWS.txt -- add the version number at the top of the file and make - sure that the comments are up-to-date. + sure that the comments are up to date. + Remove the "Version ?.?:" line. ANNOUNCE.txt -- add the version number at the top of the file and update the blurbs as appropriate. - Gnuplot.html -- update the version number where it appears. Update - the "News" section. + Gnuplot.html -- update the version number where it appears. + Update the "News" section. - __init__.py -- increment the __version__ string. No "+" on the end. + __init__.py -- increment the __version__ string. If there is a + "+" on the end, remove it. -2. Check the changes into Subversion. +2. Check the changes into Subversion, with an appropriate comment $ svn commit -m "Official version 1.8" 3. Tag the release in Subversion: @@ -30,31 +31,32 @@ 4. Create new documentation using happydoc. cd to the Gnuplot directory, then $ rm -rf doc $ cd .. - $ happydoc -d Gnuplot/doc -t 'Gnuplot.py' Gnuplot - + $ happydoc -d Gnuplot/doc -t 'Gnuplot.py' Gnuplot + Note: + To install happydoc, you download its source from sourceforge, + and unpack it, then + $ cp -r happydoclib/ /usr/lib/python2.5/site-packages/ + $ cp happydoc /usr/local/bin + 5. Generate the source distributions in Gnuplot/dist; cd to Gnuplot and then: - $ python2 ./setup.py sdist --formats=gztar,zip 6. [OMIT THIS] Generate the binary distributions. [I don't think a binary distribution is worthwhile because the place that the files need to be installed is dependent on the version of python being used.] - $ python2 ./setup.py bdist --format=gztar,zip,rpm,wininst - - 7. Release the files on SourceForge: - $ cd dist $ ftp upload.sourceforge.net (username anonymous) cd incoming put gnuplot-py-1.8.tar.gz put gnuplot-py-1.8.zip - a. Go to the "Admin" page. + a. Log in to the sourceforge web interface, choose Gnuplot.py + from "My projects" - b. Go to the "File release system" page. + b. Select Admin -> "File release system" c. Click on "Add Release" for package Gnuplot-py. @@ -62,7 +64,7 @@ Click on "Create This Release" - e. In "Step 1: Edit Existing Release", + e. In "Step 1: Edit Existing Release", check the "Preserve my pre-formatted text." button below the text boxes Paste the "New features in this version" section of ANNOUNCE.txt into the "Paste the notes in" text box. @@ -70,11 +72,11 @@ "Paste The Change Log In" text box Click "Submit/refresh" - f. In "Step 2: Add Files To This Release" section, - Select gnuplot-py-1.8.tar.gz and gnuplot-py-1.8.zip in the then click - "Add files or refresh view" + f. In "Step 2: Add Files To This Release" section, + Select gnuplot-py-1.8.tar.gz and gnuplot-py-1.8.zip in the + list of files, then click "Add files or refresh view" - g. In step 3 "Edit Files In This Release", + g. In "Step 3: Edit Files In This Release", For gnuplot-py-1.8.tar.gz, under "Processor" select "Platform-Independent" and under "file type" select "source .gz", then click "Update/refresh" @@ -85,15 +87,42 @@ h. In "Step 4: Email release notice", check "I'm sure", then click "Send Notice". -8. Send an announcement to gnu...@li... +8. Upload the new web page files (modified in step 1) to sourceforge: + $ sftp SF...@sh... + cd /home/groups/g/gn/gnuplot-py/htdocs + put Gnuplot.html + put ANNOUNCE.txt + put NEWS.txt + quit + This updates the Gnuplot.html home page, http://gnuplot-py.sourceforge.net/ + +9. Update the project news page (http://sourceforge.net/projects/gnuplot-py/) + - log in to sourceforge on the web + - select Gnuplot.py from "My projects" + - Admin -> News -> Submit + Subject: Gnuplot.py version 1.8 released + For the "Details" box, select some stuff from NEWS.txt, eg: + ---- + Version 1.8 of Gnuplot.py has just been released. + Highlights: + + Compatible with NumPy + + Compatible with future python where "with" will be a reserved word + + Added a 'pdf' terminal definition + + hardcopy allows for terminal='svg' + See NEWS.txt for more details. + ---- + Then delete the News item for the previous release: return to + Admin -> News, click on the item for the previous release, + select "displayed", select "delete", and click "submit". -9. Send an announcement to comp.lang.python. +10. Send an announcement to gnu...@li... -10. Append a '+' to the __version__ string in __init__.py to +11. Send an announcement to comp.lang.python. + +12. Append a '+' to the __version__ string in __init__.py to distinguish intermediate Subversion releases from official releases. Add a "Version ?.?:" line to NEWS.txt to receive future change notes. - [Remove backup files (ending with '~')] - Check the changes into Subversion: + Check the changes into Subversion, with a suitable comment, eg: svn commit -m "Version 1.8+" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |