Question

I have a pyplot polar scatter plot with signed values. Pyplot does the "right" thing and creates only a positive axis, then reflects negative values to look as if they are a positive value 180 degrees away.

But, by default, pyplot plots all points using the same color. So positive and negative values are indistinguishable.

I'd like to easily tell positive values at angle x from negative values at angle (x +/- 180), with positive values red and negative values blue.

I've made no progress creating what should be a very simple color map for this situation.

Help?

Was it helpful?

Solution

I'm not sure if this is the "proper" way to do this, but you could programmatically split your data into two subsets: one containing the positive values and the second containing the negative values. Then you can call the plot function twice, specifying the color you want for each subset.

It's not an elegant solution, but a solution nonetheless.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top