I have a color coded plot. Here is a part of the code:
fig = plt.figure(figsize=(10,10))
color_scheme = plt.get_cmap('cool')
gs = gridspec.GridSpec(1, 1)
ax1 = plt.subplot(gs[0])
gs.update(left=0.15,bottom=0.15,right=0.80,top=0.95)
cax = fig.add_axes([0.80, 0.15, 0.03, 0.80])
im = ax1.scatter(x, y, c=z, edgecolors='black', marker='.', s=40, lw=1, cmap=color_scheme, vmin=0, vmax=10)
cb = fig.colorbar(im, cax=cax)
for t in cb.ax.get_yticklabels(): t.set_fontsize(12)
The problem is that I want to connect the dots with a line, and it doesn't work to use marker='-' and it also doesn't work if I use ax1.plt. How can I do this?
What I actually need is to fit a line to some points and color it the same color as the points (the points I fit to will all have same color)