<?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 How to add exponential trend line to a semi logarithmic scatter plot in arcpy? in ArcMap Questions</title>
    <link>https://community.esri.com/t5/arcmap-questions/how-to-add-exponential-trend-line-to-a-semi/m-p/1055657#M2463</link>
    <description>&lt;P&gt;I want to create a semi-logarithmic scatter plot and add an exponential trend line to the graph. I would also like to limit the x and y (log y) axes extent with their highest value. Also want to define the interval of the x and y axes.&lt;/P&gt;&lt;P&gt;I have tried with the following code&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; import numpy as np&lt;BR /&gt;... import matplotlib.pyplot as plt&lt;BR /&gt;... fc='Yearwise'&lt;BR /&gt;... x= [r[0] for r in arcpy.da.SearchCursor(fc,'Year') if not r [0] is None]&lt;BR /&gt;... y= [r[0] for r in arcpy.da.SearchCursor(fc,'SMI') if not r [0] is None]&lt;BR /&gt;... ylog= np.log(y)&lt;BR /&gt;... plt.yscale('log')&lt;BR /&gt;... plt.ylim([0.1,10000])&lt;BR /&gt;... plt.scatter(x, ylog)&lt;BR /&gt;... curve_fit= np.polyfit(x,ylog,1)&lt;BR /&gt;... plt.show()&lt;BR /&gt;... print(curve_fit)&lt;/P&gt;&lt;P&gt;But have got the attached result (Please find the attached fig.).&lt;/P&gt;</description>
    <pubDate>Fri, 07 May 2021 14:06:35 GMT</pubDate>
    <dc:creator>badrinathkar</dc:creator>
    <dc:date>2021-05-07T14:06:35Z</dc:date>
    <item>
      <title>How to add exponential trend line to a semi logarithmic scatter plot in arcpy?</title>
      <link>https://community.esri.com/t5/arcmap-questions/how-to-add-exponential-trend-line-to-a-semi/m-p/1055657#M2463</link>
      <description>&lt;P&gt;I want to create a semi-logarithmic scatter plot and add an exponential trend line to the graph. I would also like to limit the x and y (log y) axes extent with their highest value. Also want to define the interval of the x and y axes.&lt;/P&gt;&lt;P&gt;I have tried with the following code&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; import numpy as np&lt;BR /&gt;... import matplotlib.pyplot as plt&lt;BR /&gt;... fc='Yearwise'&lt;BR /&gt;... x= [r[0] for r in arcpy.da.SearchCursor(fc,'Year') if not r [0] is None]&lt;BR /&gt;... y= [r[0] for r in arcpy.da.SearchCursor(fc,'SMI') if not r [0] is None]&lt;BR /&gt;... ylog= np.log(y)&lt;BR /&gt;... plt.yscale('log')&lt;BR /&gt;... plt.ylim([0.1,10000])&lt;BR /&gt;... plt.scatter(x, ylog)&lt;BR /&gt;... curve_fit= np.polyfit(x,ylog,1)&lt;BR /&gt;... plt.show()&lt;BR /&gt;... print(curve_fit)&lt;/P&gt;&lt;P&gt;But have got the attached result (Please find the attached fig.).&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 14:06:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/how-to-add-exponential-trend-line-to-a-semi/m-p/1055657#M2463</guid>
      <dc:creator>badrinathkar</dc:creator>
      <dc:date>2021-05-07T14:06:35Z</dc:date>
    </item>
  </channel>
</rss>

