I was running arcpy.mapping tools and noted different behaviour running inside ArcMap python window and outside of it. The following is the partial code extract.
mxd = arcpy.mapping.MapDocument(mxdLocation)currentLyrExtent=lyr.getExtent()
df = arcpy.mapping.ListDataFrames(mxd)
lyr = arcpy.mapping.ListLayers(mxd,data_frame=df)
df.extent = currentLyrExtent
This is the exported image after running in ArcMap Python window. Looks ok.
This is the exported image after running outside of ArcMap. The image only fills up 1/4 of the whole image frame.
What could be wrong?