Skip to content

Feature request: offset radial origin for polar plots #4217

@alimuldal

Description

@alimuldal

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:

origin example

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:

so_example

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions