I have some data, which I'd like to plot using matplotlib. Some of the data has been flagged by some other software, and I have a boolean array, the same shape as my original data which tells me which data has been flagged. What I'd like to do is plot the unflagged data as a single pixels ',' and flagged data as crosses 'x'.

At the moment I'm plotting all of the data as single pixels, and then replotting everything as crosses, setting the unflagged data to some negative number and setting the axes to hide them away off the bottom of the graph, however this approach is a bit of a pain as you often end up with the crosses showing up on the bottom of the graph etc.

I'm sure I can get this approach to work but I thought I'd ask if there's there a more elegant way to achieve the same aim.

Many thanks in advance,

John Morgan