Using Python and matplotlib to create profile graphs

07-24-2014 03:29 PM

Using Python and matplotlib to create profile graphs

Some explanation of using python (arcpy) and matplotlib to create profile graphs.




Nicely done!

Thanks! How would you go about exporting multiple graphs to 1 pdf/png page (so for example exporting the first 8 plots to the first one paged PDF file, the next 8 plots to a 2nd PDF file and the next 8 plots to the the 3rd, etc)? I know how to perform it with a simple example, but am struggling to implement it in this piece of code.

Have a look at this discussion. I think it provides some details on how to do it:

matplotlib - Python saving multiple figures into one PDF file - Stack Overflow 

Nicely done. Great Work 

Thanks, I am pretty new to matplotlib and Arcpy. I've looked at that discussion. However, the searchcursor loop iterates through each profile as the subplots are being created. This results in getting the same profile graph multiple times on each page. I have 100 + river profile graphs (one every 100 meters) and need to find a way to iterate through the features/profiles, plot the profile graphs every 100 meters and compile these in multiple pdf files with multiple different (about 6) graphs per page/file, ultimately covering the whole river area.

Hi Thijs Bongers , I guess what you are looking for would be possible. I might be better to place your question as a new question in the Python place, where you will have more people that can help you solve it. At this moment I don't have much time, but if I can I will have a look this weekend.

Hi , see explanation in this document that I just shared: Creating multiple graphs per page using matplotlib 

Version history
Revision #:
1 of 1
Last update:
‎07-24-2014 03:29 PM
Updated by: