Which data points do you think are drawn at the wrong location? Wolfram seem to be plotting np.abs(2*cos(sample_phi)), sample_phi but just the positive side.

Ahh, took a little bit, but I think I figured out what is going on…

Wolfram is translating negative R values to be opposite theta values (e.g. 45 deg with a value of -.75 is being plotted at 225 deg) with zero always staying at the center.

What matplotlib is doing is allowing r = 0 to be a circle instead of just the single point at the center.

Note that the axis label for the r-axis goes from -2 to 2

Incredible finding. Thank you so much for taking a look! Should not something be done by default in matplotlib to handle such situations, so that people won’t get confused in the future?