Plot a custom colormap next to iterative scatterplot

I have a set of coordinates that are arranged per year, and I scatterplot them.
I create a custom colormap that reflects those years, but the issue is I can’t manage to plot the colorbar of that colormap, and replace the ticks by the values of a numpy array of datetime64. I have no idea how to do it since I don’t plot any image (and the examples online are mainly with plt.imshow).

What ~ in isin pandas method means&

filtered_df = df[~df.index.isin(df_to_remove)] What does this ~ reduction mean? Found it in answers to the task? Was written by smn smart Answers: Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the … Read more