<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic arcpy.MakeGraph/arcpy.Graph() not respecting template design in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-makegraph-arcpy-graph-not-respecting/m-p/83741#M6629</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi I'm using ArcGIS 10.2 Advanced/32-bit Python 2.7.3. I'm needing to create multiple graphs using Arcpy (4 feature classes per graph: 2 vertical line, 2 scatter plot). My code works great using a template for 2 vertical lines. However, I modified my python code and the graph template to add 2 additional xy/scatterplot series and now the template is not being followed. I know for sure my data is being input into Graph()/MakeGraph correctly. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;The only thing I can think of why the template is not following my design for 4 feature classes is that I am adding series out of order (in python) in relation to how the graph series are originally ordered/read from the .tee.&lt;/STRONG&gt;&lt;SPAN&gt; I would love to just manually edit a few parameters in the .tee file to fix the issue. Anyone know where to find a list of parameters for these .tee graph templates or ESRI's graph() class? I prefer not to switch to matplotlib or Grapher over this matter. Thanks for any help you may offer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;For example:&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Current order of input in template.tee:&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;object Series3: TPointSeries&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ... &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; end&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;object Series4: TPointSeries&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; end&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;object Series1: TLineSeries&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; end&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;object Series2: TLineSeries&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; end&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;The way input is currently being input into arcpy.Graph() using python's 'zip' function:&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for yr0_points, yr1_points, yr0_datums, yr1_datums in zip(yr0_points_list, yr1_points_list, yr0_datums_list, yr1_datums_list):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; # Create the graph&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; graph = arcpy.Graph()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; # Add a vertical bar series to the graph&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; graph.addSeriesLineVertical(yr0_lyr, "Elevation", "NEAR_DIST", "") #relates to object Series1: TLineSeries&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; graph.addSeriesLineVertical(yr1_lyr, "Elevation", "NEAR_DIST", "")&amp;nbsp; #relates to object Series2: TLineSeries&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; graph.addSeriesScatterPlot(yr0_datum_lyr, "Elevation","", "Descriptio") #relates to object Series3: TPointSeries&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; graph.addSeriesScatterPlot(yr1_datum_lyr, "Elevation","", "Descriptio") #relates to object Series4: TPointSeries&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; arcpy.MakeGraph_management(graph_grf, graph, "temp_graph")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; arcpy.SaveGraph_management("temp_graph", output_graph_dir, "MAINTAIN_ASPECT_RATIO", 1209, 815)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Sep 2013 15:44:19 GMT</pubDate>
    <dc:creator>BL</dc:creator>
    <dc:date>2013-09-06T15:44:19Z</dc:date>
    <item>
      <title>arcpy.MakeGraph/arcpy.Graph() not respecting template design</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-makegraph-arcpy-graph-not-respecting/m-p/83741#M6629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi I'm using ArcGIS 10.2 Advanced/32-bit Python 2.7.3. I'm needing to create multiple graphs using Arcpy (4 feature classes per graph: 2 vertical line, 2 scatter plot). My code works great using a template for 2 vertical lines. However, I modified my python code and the graph template to add 2 additional xy/scatterplot series and now the template is not being followed. I know for sure my data is being input into Graph()/MakeGraph correctly. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;The only thing I can think of why the template is not following my design for 4 feature classes is that I am adding series out of order (in python) in relation to how the graph series are originally ordered/read from the .tee.&lt;/STRONG&gt;&lt;SPAN&gt; I would love to just manually edit a few parameters in the .tee file to fix the issue. Anyone know where to find a list of parameters for these .tee graph templates or ESRI's graph() class? I prefer not to switch to matplotlib or Grapher over this matter. Thanks for any help you may offer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;For example:&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Current order of input in template.tee:&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;object Series3: TPointSeries&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ... &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; end&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;object Series4: TPointSeries&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; end&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;object Series1: TLineSeries&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; end&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;object Series2: TLineSeries&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; end&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;The way input is currently being input into arcpy.Graph() using python's 'zip' function:&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for yr0_points, yr1_points, yr0_datums, yr1_datums in zip(yr0_points_list, yr1_points_list, yr0_datums_list, yr1_datums_list):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; # Create the graph&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; graph = arcpy.Graph()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; # Add a vertical bar series to the graph&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; graph.addSeriesLineVertical(yr0_lyr, "Elevation", "NEAR_DIST", "") #relates to object Series1: TLineSeries&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; graph.addSeriesLineVertical(yr1_lyr, "Elevation", "NEAR_DIST", "")&amp;nbsp; #relates to object Series2: TLineSeries&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; graph.addSeriesScatterPlot(yr0_datum_lyr, "Elevation","", "Descriptio") #relates to object Series3: TPointSeries&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; graph.addSeriesScatterPlot(yr1_datum_lyr, "Elevation","", "Descriptio") #relates to object Series4: TPointSeries&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; arcpy.MakeGraph_management(graph_grf, graph, "temp_graph")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; arcpy.SaveGraph_management("temp_graph", output_graph_dir, "MAINTAIN_ASPECT_RATIO", 1209, 815)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Sep 2013 15:44:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-makegraph-arcpy-graph-not-respecting/m-p/83741#M6629</guid>
      <dc:creator>BL</dc:creator>
      <dc:date>2013-09-06T15:44:19Z</dc:date>
    </item>
  </channel>
</rss>

