Hi all,
I'm using matplotlib and Numeric since a few days ago, so I am not very sophisticated in using python
I want to use matplotlib to print automatically several spectras from a file. This means, it takes the first column as x-value and the second, fourth, sixth .... column as y-value.
The script I 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 ?
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
--
DI Dr. Werner Pessenhofer
CPA - Computer Process Automation
Pl眉ddemanngasse 33
8010 Graz
Tel.: +43 (0) 676 346 70 08
FAX: +43 (0) 316 873 8772