Original report at SourceForge, opened Sun Jun 15 16:58:00 2008
It would be nice if there is a possibility to display only a circular sector of a polar plot.
At the moment there is always plotted the full circle (360 degree).
So I suggest a thetamax and thetamin parameter for the polar plot.
On a similar note , I constantly face this problem and method to solve would be appreciated.
and would like to have an extrapolation routine for theta domain.
As mentioned in the previous comment that At the moment matplotlib only plots the full circle (360 degree).
So if one has a theta domain from 0.01 to 2.0_pi-0.01 then it leaves white space (i.e. it does not complete the whole circle)
One usually encounters such domains in numerical grid as starting the value of theta from 0.0 could lead to singularities.
Is there any way to get rid of this white space by forcing the theta domain to start from 0.0 to 2.0_pi and extrapolating the associated 2D data on the polar axis?
I wonder how much work this would be to implement. It seems the set_xlim() and set_ylim() axes methods for polar plots are supposed to control theta and r limits respectively. set_ylim works as expected for r, though unfortunately set_xlim() doesn't seem to have any effect at all, unless I'm doing something wrong.
There's also a set_rlim() which seems to do the same as set_ylim(), and there are get_rmax and get_rmin methods, but strangely no get_rlim method.
Seems example 2 and 3 in this demo show a way forward for doing less than a full 360 deg polar plot, and also for creating an annulus. Looks a bit complicated though:
Some discussion from 2008:
I hacked together something that works well enough for me, based on the floating-axes demo from mpl_toolkits. Here's the code:
And a couple of example plots:
@mspacek Would you be willing to put that into a PR?
Maybe this belongs in mpl_toolkit.
I would be very interested in this feature too. Will use mspacek's routine for now
So what's the actual way going forward here? Copying stuff from mpl_toolkit into the polar axes? (That code is ugly.)
The best result (from a user perspective) would be being able to set theta min/max on a regular polar axes. Using mpl_toolkit is already in the examples and not particularly nice.
I agree, I think it would be best to make this a feature of pylab.polar(). Even when I wrote it, I didn't understand some of the code in
which itself was mostly copied from mpl_toolkits:
I just got it to work through trial and error. So, I'm not sure I'm qualified to merge this into pyplot.polar().
wonderful works. @mspacek