Skip to content

PolarPlane does not work with 0 as maximum #2577

Open
@cafeclimber

Description

@cafeclimber

Enhancement proposal

It is very common in antenna engineering to plot antenna radiation patterns in dB on a polar axis. It is also fairly common for those plots to be normalized (i.e. such that 0 is the maximum). Currently this is not possible with PolarPlane. I believe this is primarily due to these lines:

# PolarPlane.__init__()
# ...
        super().__init__(
            x_range=np.array((-radius_max, radius_max, radius_step)), # <===
            y_range=np.array((-radius_max, radius_max, radius_step)), # <===
            x_length=size,
            y_length=size,
            axis_config=self.radius_config,
            **kwargs,
        )

It should be possible to set 0 as the maximum, as well as set the minimum, eg.

class RadiationPattern(Scene):
    def construct(self):
        polar = PolarPlane(
            radius_min=-40,            
            radius_max=0,
            radius_step=10,
        )

Additional comments

This is an example of this type of plot

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAdditions and improvements in general

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions