From: Darren D. <dd...@co...> - 2005-04-27 11:16:20
|
Hi Dr. Pessenhofer, On Wednesday 27 April 2005 4:12 am, Dr. Werner Pessenhofer wrote: > ____________________________________________________ > > #!/usr/bin/python > #-*- coding: UTF-8 -*- > > from pylab import * > > X = load('Spektren-CuP-conv.dat',comments='#') > > hold(True) > > xlabel(r'$\rm{Wellenl\"ange / nm}$') > ylabel('Extinktion') > title('Spektren CuP') > > ind = 1 > while ind < 18: > Y = take(X,(0,ind), 1) > x = Y[:,0] > y = Y[:,1] > plot(x,y,'-') > ind = ind + 2 > > savefig("Spektren-CuP.ps",orientation="landscape") > > show() > ________________________________________________________ > > The first problem is, that all curves have the same color. Is there a > possibility to "rotate" the colors in the loop ? You could change plot(x,y,'-') to plot(x,y). It will default to the '-' linestyle, and matplotlib will cycle the colors for you. Also, the examples include a script called line_styles.py with this suggestion: > > Second question: > > With savefig("Spektren-CuP.ps",orientation="landscape"), the diagram do > not fill the whole a4 page. I think, this is related to some configuration > values, cause the resulting figure is not an a4 page but a BBox. Any hints > where to change that ? > > Regards > > Werner -- Darren S. Dale Bard Hall Department of Materials Science and Engineering Cornell University Ithaca, NY. 14850 dd...@co... |