Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Description
I'd be really interested in having a nice way to produce polar plots where the origin of the radial axis is offset from the centre, something like this:
Having the radial offset is particularly useful for plotting polar histograms, which tend to suffer from the problem that long bars are over-emphasised relative to short bars because their areas being much larger due to the distorting effect of the polar transformation. Adding a radial offset helps to reduce the visual impact of this distortion.
There are of course hacky ways to achieve this sort of effect, e.g. offsetting the r coordinates of the data, then manually setting the radial ticks. I also came acrossthis SO question. The accepted answer, usingfloating_axes.GridHelperCurveLinear
, is close to what I'm looking for:
However, it's still a bit of a nasty hack, since it requires the radial ticks to be set manually.
How much work would it be to add aset_r_offset()
method to allow one to control the relative radial position of the r-axis origin? I imagine it accepting a float between 0 and 1, where 0 would place the r origin exactly at the centre, and 1 would place it exactly at the edge of the plot.