I have some code which plots some points. I substituted ax.scatter for ax.plot so I could control the color of each point individually. However when I make this change the axis x and y ranges seem to increase.
I can't pinpoint why this is happening. The only thing I've changed is plot to scatter.
This code makes an axis that is too big
ax.scatter(x, y, c=color_list, s=pts_size, marker='o', edgecolor='none')
#ax.plot(x, y, linestyle='None', marker='o', markerfacecolor=pts_color, markersize=pts_size, markeredgewidth=0)
This code does the right thing (but I can't control the color)
#ax.scatter(x, y, c=color_list, s=pts_size, marker='o', edgecolor='none')
ax.plot(x, y, linestyle='None', marker='o', markerfacecolor=pts_color, markersize=pts_size, markeredgewidth=0)
Is there a way I can call scatter such that it doesn't mess with my current axis limits?