I'm ananlyzing a dataset, and I know that the data should follow a power model:
y = a*x**b
ln(y) = ln(a) + b* ln(x)
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')
Your green strange plot is what you get when you do a line plot in
matplotlib, with the
x values unsorted. It's a line plot, but it connects by lines (x, y) pairs jumping right and left (in your specific case, it looks like back to near the x-origin). That gives these strange patterns.
You don't have this problem with the blue plot, because it's a scatter plot.
Try calling the plot after sorting both arrays according to the indices of the first using