How to transform nonlinear model to linear?
<p>I'm ananlyzing a dataset, and I know that the data should follow a power model:</p>

<pre><code>y = a*x**b
</code></pre>

<p>I transformed it to linear by taking logarithms:</p>

<pre><code>ln(y) = ln(a) + b* ln(x)
</code></pre>

<p>However, the problems arised on adding a trend line to the plot</p>

<pre><code>slope, intercept, r_value, p_value, std_err = scipy.stats.mstats.linregress(x_ln, y_ln)
yy = np.exp(intercept)*wetarea_x**slope
plt.scatter(wetarea_x, arcgis_wtrshd_x, color = 'blue')
plt.plot(wetarea_x, yy, color = 'green')
</code></pre>

<p><a href="https://i.stack.imgur.com/DkDKP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DkDKP.png" alt="enter image description here"></a></p>

<p>This is what I get with this code.
How to modify the code, so that the trend line on the plot would be correct?</p>