## Re: [Matplotlib-users] Plot array of arrays

 Re: [Matplotlib-users] Plot array of arrays From: David D Clark - 2007-10-02 17:32:52 ```-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Alan, Thanks for the help. This was a big clue. It turns out that what I thought was an array of arrays was actually a list of arrays. If my list was y, running plot(x,array(y).transpose()) solved the problem! Thanks for your help, Dave Alan G Isaac wrote: > On Mon, 01 Oct 2007, David D Clark apparently wrote: >> y=[array([]),array([]),array([])...] >> and x=array([x0,x1,x2,...]) > >> I want to plot the family of curves y=f(x). >> plot(x,y[n]) where n is the nth array in y plots the correct curve, >> however plot(x,y) and plot(x,y[:]) complain about mismatched array >> dimensions. > > > Might you want > plot(x,y.transpose()) > > hth, > Alan Isaac > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users - -- David D. Clark Electrical Engineer P-23, Neutron Science and Technology e-mail mailto:ddclark@... GPG Public key 0x018D6523 available at http://pgp.mit.edu http://www.gnupg.org has information about public key cryptography -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFHAoCvNu7GcwGNZSMRAmlVAJ46vuGaTNmGg0GDvPY7FzAdWhk9sACeIWpY i12r6Utl4pLzyabsxCCP+Dw= =jWKL -----END PGP SIGNATURE----- ```

 [Matplotlib-users] Plot array of arrays From: David D Clark - 2007-10-01 23:34:53 ```-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, I have been struggling with this all afternoon. I have a function which generates an array of arrays: y=[array([]),array([]),array([])...] and x=array([x0,x1,x2,...]) I want to plot the family of curves y=f(x). plot(x,y[n]) where n is the nth array in y plots the correct curve, however plot(x,y) and plot(x,y[:]) complain about mismatched array dimensions. Any suggestions? Thanks, Dave - -- David D. Clark Electrical Engineer P-23, Neutron Science and Technology e-mail mailto:ddclark@... GPG Public key 0x018D6523 available at http://pgp.mit.edu http://www.gnupg.org has information about public key cryptography -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFHAYQNNu7GcwGNZSMRAnKvAKCKHRigFQr7pOc1OU4uyWIPaPjQzQCcCG2c 8lWM6Nhsl/R8s21Rs3mM7v0= =Wr2j -----END PGP SIGNATURE----- ```
 Re: [Matplotlib-users] Plot array of arrays From: Alan G Isaac - 2007-10-02 00:13:09 ```On Mon, 01 Oct 2007, David D Clark apparently wrote: > y=[array([]),array([]),array([])...] > and x=array([x0,x1,x2,...]) > I want to plot the family of curves y=f(x). > plot(x,y[n]) where n is the nth array in y plots the correct curve, > however plot(x,y) and plot(x,y[:]) complain about mismatched array > dimensions. Might you want plot(x,y.transpose()) hth, Alan Isaac ```
 Re: [Matplotlib-users] Plot array of arrays From: David D Clark - 2007-10-02 17:32:52 ```-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Alan, Thanks for the help. This was a big clue. It turns out that what I thought was an array of arrays was actually a list of arrays. If my list was y, running plot(x,array(y).transpose()) solved the problem! Thanks for your help, Dave Alan G Isaac wrote: > On Mon, 01 Oct 2007, David D Clark apparently wrote: >> y=[array([]),array([]),array([])...] >> and x=array([x0,x1,x2,...]) > >> I want to plot the family of curves y=f(x). >> plot(x,y[n]) where n is the nth array in y plots the correct curve, >> however plot(x,y) and plot(x,y[:]) complain about mismatched array >> dimensions. > > > Might you want > plot(x,y.transpose()) > > hth, > Alan Isaac > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users - -- David D. Clark Electrical Engineer P-23, Neutron Science and Technology e-mail mailto:ddclark@... GPG Public key 0x018D6523 available at http://pgp.mit.edu http://www.gnupg.org has information about public key cryptography -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFHAoCvNu7GcwGNZSMRAmlVAJ46vuGaTNmGg0GDvPY7FzAdWhk9sACeIWpY i12r6Utl4pLzyabsxCCP+Dw= =jWKL -----END PGP SIGNATURE----- ```