I'm currently trying to place a horizontal dashed line through my log-log graph using the below code. K2H_HUBp[:,1] and DivR are two [1x6000] arrays. The variable ones is a [1x6000] array full of ones.
The point of this plot is showing how the radii of "potatoes" compares with "sweet potatoes". Hence if they were the same, all of the data points should fall on this y = 1 line.
plt.scatter(K2H_HUBp[:,1],DivR,s=2.5,alpha=0.15,c = '#A9A9A9')
plt.loglog(K2H_HUBp[:,1], ones, '--',dashes=(1, 1),linewidth=0.9,c='#3C323C')
plt.ylim((0.1,10))
plt.xlim((0.35,12))
ax = plt.gca()
ax.tick_params(which = 'both', direction = 'in',right='on',top='on')
ax.set_xscale('log')
ax.set_yscale('log')
plt.ylabel("Radius (Potatos/Sweet Potatos)")
plt.xlabel("Radius (Potatos)")
I'd like the ones line to be equally dashed through the plot. I have the problem of getting this graph here where the lines aren't equally spaced out.
I'm looking for the graph to be very similar to this one (yes this is a linear graph and I'm working with a log-log graph)
I've tried modifying the dashes() parameters with no luck.
Thanks in advance for your guidance. :)