Molte grazie. Chiedo un ulteriore aiuto.
Ho scritto le seguenti righe di codice: xx = numpy.array([ 1. , 2. , 3. , 4. , 5. , 6. , 7. , 8. , 9.]) yy = numpy.array([ 1./1. , 1./2. , 1./3. , 1./4. , 1./5. , 1./6. , 1./7. , 1./8. , 1./9.]) ww = numpy.array([ 1. , 2. , 3. , 5. , 7. , 11. , 13. , 17. , 19.]) zz = numpy.array([ 1.**2 , 2.**2 , 3.**2 , 4.**2 , 5.**2 , 6.**2 , 7.**2 , 8.**2 , 9.**2]) yx = numpy.array( list(zip(xx,yy)) ) wx = numpy.array( list(zip(xx,ww)) ) zx = numpy.array( list(zip(xx,zz)) ) Le liste yx, wx, zx sono adesso liste di punti del piano. Ora dovrei i loro tre grafici insieme in una unica figura. Ho cercato su matplotlib ma non ho trovato indicazioni per me comprensibili. Posso avere indicazioni? Grazie Bruno Firmani Via Giannantonio Manci 5 - 39100 BOLZANO e.mail firmanibr...@gmail.com mlbf1...@gmail.com tel. +39 338 5721755 (cellulare) fax +39 02 70039544 Il giorno ven 4 dic 2020 alle ore 01:02 Alessandro Dentella < sandro.dente...@gmail.com> ha scritto: > On Thu, Dec 03, 2020 at 07:24:27PM +0100, Bruno Firmani wrote: > > Sto muovendo i primi passi in Python. > > Benvenuto > > > > > Il mio problema รจ il seguente: > > > > ho quattro liste numeriche: > > > > xx = [x1,x2, ... ,xn] > > yy = [y1,y2, ... ,yn] > > ww = [w1,w2, ... ,wn] > > zz = [z1,z2, ... ,zn] > > > > e dovrei far disegnare, per linee, in un unico grafico le liste di punti: > > > > [ [x1,y1] , ... , [xn,yn] ] > > [ [x1,w1] , ... , [xn,wn] ] > > [ [x1,z1] , ... , [xn,zn] ] > > > > Chiedo, se possibile, di avere indicazioni. > > una cosa tipo zip(xx, yy)? > > In [1]: xx = ['x1','x2', 'xn'] > ...: yy = ['y1','y2', 'yn'] > ...: ww = ['w1','w2', 'wn'] > ...: zz = ['z1','z2', 'zn'] > > In [2]: list(zip(xx, yy)) > Out[2]: [('x1', 'y1'), ('x2', 'y2'), ('xn', 'yn')] > > In [3]: list(zip(xx, ww)) > Out[3]: [('x1', 'w1'), ('x2', 'w2'), ('xn', 'wn')] > > *:-) > > > -- > Sandro Dentella *:-) > http://wikidattica.org Flashcard per la didattica > _______________________________________________ > Python mailing list > Python@lists.python.it > https://lists.python.it/mailman/listinfo/python >
_______________________________________________ Python mailing list Python@lists.python.it https://lists.python.it/mailman/listinfo/python