0

I have 3 1D-arrays (lat, lon and temperature) and would like to plot the data using Basemap in python. However, Basemap seems to need 2D-arrays to be able to plot the data according to the latitudes and longitudes I have.

How would I do that?

Thanks for you help!

  • You can scatterplot on top of a basemap with x, y, z vectors, `scatter(x, y, c=z)`. ( [example](http://stackoverflow.com/questions/29590365/scatter-plot-data-does-not-appear-on-continents-in-hammer-basemap/29598107#29598107) ). Are you trying to make a histogram? – cphlewis May 12 '15 at 16:38

1 Answers1

0

Maybe try zip?

Calling zip(a,b) where a and b are some iterable things will return a new array of tuples along the lines of [ (a[0], b[0]) , (a[1],b[1]) , ... , (a[n], b[n]) ] where n is the number of things in the lists.

You could match up the lat/lon into pairs first and then pair them with the temperature.

mcgov
  • 36
  • 1