Skip to content
Advertisement

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).

How could I:

  • Plot the colorbar with my custom colormap
  • Replace the colorbar’s ticks with my dates ?

This is my code:

JavaScript

Advertisement

Answer

JavaScript

enter image description here

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement