On Thu, Nov 15, 2012 at 2:48 PM, Boris Vladimir Comi <gle...@comunidad.unam.mx> wrote: > Hi all: > > I have begun to learn about python / matplolib / basemap and really need some > help. > > My data is in an Excel workbook in format .xls or csv(see attached): > > 1. How to open excel file in python? > > 2. I would like to plot multiple line joining the positions of each of the > events, it is possible to do this? Have any idea how to do it? > > The idea is to plot the trajectories on a particular region, for my case is > Mexico.
Boris, If you can, install pandas and openpyxl on your machine. Pandas and read in the csv by itself. Openpyxl is only needed if you really want to read the Excel file. Sticking with the csv approach, all you'll have to do is this: import matplotlib.pyplot import pandas fig, ax = plt.subplots() data = pandas.read_csv("/path/to/Trayectorias-scm-2004.csv") data.plot(ax=ax) That will plot all of the non-index columns in your dataframe. Hope that helps, -paul ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users