Here is the relevant code fragment: for i in range(1, compList[0][16]): pylab.hold(True) if compList[0][4] == 'Decay S-Curve': testFunctions.zCurve(compList[0][10],compList[0][9]) elif compList[0][4] == 'Bell Curve': testFunctions.gaussCurve(compList[0][14],compList[0][14]) elif compList[0][4] == 'Growth S-Curve': testFunctions.sCurve(compList[0][8],compList[0][11]) elif compList[0][4] == 'Beta': testFunctions.betaCurve(compList[0][13],compList[0][12],compList[0][14]) elif compList[0][4] == 'Data': continue elif compList[0][4] == 'Linear Increasing': testFunctions.linearIncrCurve(compList[0][8],compList[0][11]) elif compList[0][4] == 'Linear Decreasing': testFunctions.linearDecrCurve(compList[0][10],compList[0][9]) elif compList[0][4] == 'Left Shoulder': testFunctions.leftShoulderCurve(compList[0][10],compList[0][11],compList[0][9]) elif compList[0][4] == 'Trapezoid': testFunctions.trapezoidCurve(compList[0][8],compList[0][10],compList[0][11],compList[0][9]) elif compList[0][4] == 'Right Shoulder': testFunctions.rightShoulderCurve(compList[0][8],compList[0][10],compList[0][11]) elif compList[0][4] == 'Triangle': testFunctions.triangleCurve(compList[0][8],compList[0][13],compList[0][9]) elif compList[0][4] == 'Singleton': testFunctions.singletonCurve(compList[0][13],compList[0][14]) elif compList[0][4] == 'Rectangle': testFunctions.rectangleCurve(compList[0][8],compList[0][10],compList[0][11],compList[0][9]) elif compList[0][4] == 'Outcome': testFunctions.outcomeCurve() pylab.savefig(curVar+'.png') pylab.hold()
When it runs in the test script the first curve is plotted in a matplotlib window and the program pauses until I close that window by clicking on the upper right button on the frame. Then this traceback is displayed: Traceback (most recent call last): File "termset-test-data.py", line 391, in ? testCode() File "termset-test-data.py", line 388, in testCode pylab.hold() File "/usr/lib/python2.4/site-packages/matplotlib/pyplot.py", line 334, in hold rc('axes', hold=b) File "/usr/lib/python2.4/site-packages/matplotlib/pyplot.py", line 74, in rc matplotlib.rc(*args, **kwargs) File "/usr/lib/python2.4/site-packages/matplotlib/__init__.py", line 712, in rc rcParams[key] = v File "/usr/lib/python2.4/site-packages/matplotlib/__init__.py", line 552, in __setitem__ cval = self.validate[key](val) File "/usr/lib/python2.4/site-packages/matplotlib/rcsetup.py", line 43, in validate_bool raise ValueError('Could not convert "%s" to boolean' % b) ValueError: Could not convert "None" to boolean What I want is to have all curves from 1 to the maximum number (in compList[0][16]) plotted on the same set of axes, then save that figure and go on to the next one. Is my problem an indentation error at the end of the IF...ELIF tests? TIA, Rich -- Richard B. Shepard, Ph.D. | Integrity Credibility Applied Ecosystem Services, Inc. | Innovation <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users