AnsweredAssumed Answered

update graph/picture in arcmap layout view by using arcpy

Question asked by SORFLA on Nov 5, 2014



I am making a script in arcpy where I create a graph by using matplotlib in python. I save the graph as a picture (test.png). I then insert the picture manually into arcmap layout view. When running the script again the graph will be updated and the picture saved and overwritten each time. The picture name is coming up under 'Element Name' in 'Picture Properties' in layout view and is correct. The path is also correct. But the picture is not updated after the script have been running (it should be since the parameters are changed). I have the line 'arcpy.RefreshActiveView()' after the picture is saved in the script, but nothing is happening. When double click the picture in layout view, then the window of 'picture properties' is coming up, and the picture is updated. But I want this to happen automatically when running the script. I will be grateful for some advice! Thanks! Agathe