----- Original Message ----- 

> Hi Python experts,
> I am working with an array of data and am trying to plot several
> columns of data which are not continuous; i.e. I would like to plot
> columns 1:4 and 6:8, without plotting column 5. The syntax I am
> currently using is:

> oplot (t,d[:,0:4])

> The question is: How do I specify within the above command, for
> columns 6:8 to be plotted?
> Thanks for any help you may provide.
> Cheers,
> Vlad

> The information in this e-mail is intended only for the person to
> whom it is
> addressed. If you believe this e-mail was sent to you in error and
> the e-mail
> contains patient information, please contact the Partners Compliance
> HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to
> you in error
> but does not contain patient information, please contact the sender
> and properly
> dispose of the e-mail.
> --
> http://mail.python.org/mailman/listinfo/python-list

Hi,

x = x[0:4]+ x[5:8]
y = y[0:4]+ y[5:8]

skips the element at index 4, meaning the fifth columns.
Alternatively,

x = x[:4]+ x[5:]
y = y[:4]+ y[5:]

skips the 5th element without regard for the length of the list. 
http://docs.python.org/release/2.3.5/whatsnew/section-slices.html

JM


-- IMPORTANT NOTICE: 

The contents of this email and any attachments are confidential and may also be 
privileged. If you are not the intended recipient, please notify the sender 
immediately and do not disclose the contents to any other person, use it for 
any purpose, or store or copy the information in any medium. Thank you.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to