How to use the colors of a colorbar in a bar plot in Matplotlib

The objective is to visualise two characteristics of a dataset: the spatial distribution of values by colour and the density distribution of values by colour. So, given a dataset of coordinates each with a colour value, show a scatter plot with a colour bar and a histogram of the colours …

Continue reading »