<?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 Re: Show a graph with python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/show-a-graph-with-python/m-p/16086#M1249</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Regardless of how the graph is made, either manually or via a script, I think you still have to open the graph in ArcMap.&lt;/P&gt;&lt;P&gt;View / Graph and then pick it.&lt;/P&gt;&lt;P&gt;If you are creating the graph using arcpy / python, is this happening within an open ArcMap mxd?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Mar 2015 07:42:38 GMT</pubDate>
    <dc:creator>NeilAyres</dc:creator>
    <dc:date>2015-03-23T07:42:38Z</dc:date>
    <item>
      <title>Show a graph with python</title>
      <link>https://community.esri.com/t5/python-questions/show-a-graph-with-python/m-p/16085#M1248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using the GP tools and python it is possible to dynamically create a graph in ArcMap but how can I display the graph to the user?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 04:16:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/show-a-graph-with-python/m-p/16085#M1248</guid>
      <dc:creator>Warwick</dc:creator>
      <dc:date>2015-03-23T04:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Show a graph with python</title>
      <link>https://community.esri.com/t5/python-questions/show-a-graph-with-python/m-p/16086#M1249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Regardless of how the graph is made, either manually or via a script, I think you still have to open the graph in ArcMap.&lt;/P&gt;&lt;P&gt;View / Graph and then pick it.&lt;/P&gt;&lt;P&gt;If you are creating the graph using arcpy / python, is this happening within an open ArcMap mxd?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 07:42:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/show-a-graph-with-python/m-p/16086#M1249</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2015-03-23T07:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Show a graph with python</title>
      <link>https://community.esri.com/t5/python-questions/show-a-graph-with-python/m-p/16087#M1250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes it is possible.&amp;nbsp; It's probably not as straight-forward as you might be expecting though.&amp;nbsp; For our implementation(s), we employ the matplotlib library to generate our graphs, save as .png and then populate File Geodatabase(s) as attachments to their related FeatureClasses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I couldn't really begin to post up any code examples unless you have something specific in mind. Post up an example of your data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 14:35:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/show-a-graph-with-python/m-p/16087#M1250</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2015-03-23T14:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Show a graph with python</title>
      <link>https://community.esri.com/t5/python-questions/show-a-graph-with-python/m-p/16088#M1251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's a short example using matplotlib (although there are probably far better examples found with a quick Google search or on Stack Overflow).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample data:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 8pt;"&gt;H:\GraphData.csv&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month&amp;nbsp; Values&lt;BR /&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp; 2.0228&lt;BR /&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp; 2.0229&lt;BR /&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp; 2.0231&lt;BR /&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp; 2.0232&lt;BR /&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp; 2.0233&lt;BR /&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp; 2.0234&lt;BR /&gt;6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp; 2.0235&lt;BR /&gt;7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp; 2.0236&lt;BR /&gt;8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp; 2.0237&lt;BR /&gt;9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&amp;nbsp; 2.0237&lt;BR /&gt;10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&amp;nbsp; 2.0238&lt;BR /&gt;11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12&amp;nbsp; 2.0239&lt;BR /&gt;12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13&amp;nbsp; 2.0240&lt;BR /&gt;13&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 14&amp;nbsp; 2.0241&lt;BR /&gt;14&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&amp;nbsp; 2.0243&lt;BR /&gt;15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16&amp;nbsp; 2.0244&lt;BR /&gt;16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 17&amp;nbsp; 2.0247&lt;BR /&gt;17&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 18&amp;nbsp; 2.0247&lt;BR /&gt;18&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 19&amp;nbsp; 2.0248&lt;BR /&gt;19&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&amp;nbsp; 2.0249&lt;BR /&gt;20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 21&amp;nbsp; 2.0250&lt;BR /&gt;21&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 22&amp;nbsp; 2.0250&lt;BR /&gt;22&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 23&amp;nbsp; 2.0252&lt;BR /&gt;23&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24&amp;nbsp; 2.0253&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 8pt;"&gt;py Code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import pandas as pd
from pandas import *
import matplotlib.pyplot as plt

data = r'H:\GraphData.csv'
df = pd.io.parsers.read_table(data, sep=',')
xs = df.Month
ys = df['Values']

min = df['Month'].min()
max = df['Month'].max()

fig = plt.figure()
ax = "ax" + str(211)
ax = fig.add_subplot(211, axisbg='white')
ax.plot(xs, ys, linestyle='-', marker='', linewidth=1, color='blue', label=str('Graph Test'))

plt.savefig(r'H:\GraphData.png', dpi=600)
plt.close()&amp;nbsp; 
del fig&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:39:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/show-a-graph-with-python/m-p/16088#M1251</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-12-10T20:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: Show a graph with python</title>
      <link>https://community.esri.com/t5/python-questions/show-a-graph-with-python/m-p/16089#M1252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Workflow would be as follows. User has an ArcMap document open in which a NetCDF Raster layer is visible. The user clicks on a location to view how a variable changes over time or levels. All the steps can be scripted using python, GP tools and a graph template except for the final step of displaying the graph to the user. Am I missing something?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 23:38:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/show-a-graph-with-python/m-p/16089#M1252</guid>
      <dc:creator>Warwick</dc:creator>
      <dc:date>2015-03-24T23:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: Show a graph with python</title>
      <link>https://community.esri.com/t5/python-questions/show-a-graph-with-python/m-p/16090#M1253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I posted a document a while ago with an example of creating a profile graph with matplotlib:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/docs/DOC-1973"&gt;Using Python and matplotlib to create profile graphs&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3116"&gt;Dan Patterson&lt;/A&gt;​ has some valuable posts on this topic too:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migration-blogpost/1428"&gt;Collections in numpy: producing frequency distributions and graphing&lt;/A&gt;​and &lt;A href="https://community.esri.com/migration-blogpost/1436"&gt;X-Y graphing demo using pyplot (matplotlib)...an introduction&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2015 01:41:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/show-a-graph-with-python/m-p/16090#M1253</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2015-03-25T01:41:32Z</dc:date>
    </item>
  </channel>
</rss>

