You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: offset radial origin for polar plots #4217
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 across this SO question. The accepted answer, using floating_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 a set_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.
Reacted by walid el maouaki and Alexander Rakhmaev
Activity