0

Is there a way to adjust the axis limits in the built-in graph tool in ArcMap?

I have looked all over and cannot find it. It would be easier to just adjust the axes than to save a new shapefile with the extra points removed.

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
a11
  • 940
  • 10
  • 22
  • 1
    https://gis.stackexchange.com/questions/181390/accessing-graph-properties-in-arcpy – FelixIP Feb 19 '21 at 04:39
  • thanks @FelixIP. Is there a way to create and embed a plot from matplotlib while working in the Python window in ArcMap? I have searched but didn't find anything on getting started with matplotlib in ArcMap – a11 Feb 19 '21 at 22:42
  • Where do you want it? There's picture element in layout view... – FelixIP Feb 20 '21 at 01:40

1 Answers1

0

I hope example below will kick-start you using matplotlib module with ArcGIS.

Table:

enter image description here

Script:

import arcpy
import matplotlib.pyplot as plt
inFc = r'C:\SCRATCH\SCRATCH.gdb\points'
tbl=arcpy.da.TableToNumPyArray(inFc, ("D_ALONG","Z"))
line,=plt.plot(tbl["D_ALONG"],tbl["Z"])
plt.title("Rangitoto Caldera")
plt.savefig('F:/AERIALS/PNGs/Example.png')

Output:

enter image description here

FelixIP
  • 22,922
  • 3
  • 29
  • 61