4

I have a couple shape files that I want to plot some scatterplot data on top of that.

Does anyone have a way to load a shape file then plot it? I've followed a couple of tutorials, but have not been successful so far.

The shape file, I am trying to use is one of the roads in Pakistan. Found Here

I downloaded the modules pyshp and shapelib but am open to others!

user1253952
  • 1,577
  • 8
  • 22
  • 34
  • Similar question, plotting with matplotlib http://stackoverflow.com/questions/10871085/viewing-a-polygon-read-from-shapefile-with-matplotlib – Eero Aaltonen Oct 01 '12 at 06:47

3 Answers3

4

Helpful tutorial for shapefiles and using basemap to plot maps: http://www.packtpub.com/article/plotting-geographical-data-using-basemap

user1253952
  • 1,577
  • 8
  • 22
  • 34
1

As much as i love D3, Matplotlib and R, this sounds like you just want create an overlay above a Google Maps chart.

This is easier than you might expect:

https://developers.google.com/maps/documentation/javascript/overlays

damzam
  • 1,921
  • 15
  • 18
  • yes, that seems like it might work. I'd like to output a jpg/pdf of the file. Do you know if it's possible? – user1253952 Oct 01 '12 at 05:05
  • @user1253952 Not sure if google maps natively support pdf snapshots, but this tool will do it for you! http://greatmaps.codeplex.com/ – damzam Oct 01 '12 at 06:01
1

Check out Qgis for that purpose.

It has a python console that enables you to treat data in an efficient way. It also reads and writes .shp-files.

Schuh
  • 1,045
  • 5
  • 9