I would like to know how to make matplotlib's scatter function colour points by a third variable.
Questions
gnuplot linecolor variable in matplotlib? and Matplotlib scatterplot; colour as a function of a third variable
posed similar queries, however, the answers to those questions don't address my issue: the use of c=arraywhichspecifiespointcolour
in the scatter function only sets the fill colour, not the edge colour. This means that the use of c=arr...
fails when using markersymbol='+'
, for instance (because that marker has no fill, only edges). I want points to be coloured by a third variable reliably, regardless of which symbol is used.
Is there a way to achieve this with Matplotlib's scatter function?