Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[ENH]: Add an easy way to plot an infinite half space (e.g. with a HalfSpace patch) #28152

Open
@carlosgmartin

Description

@carlosgmartin

Problem

Using axhline, one can easily plot an infinite line:

def plot_line(ax, a, b, c, **kwargs):
    """Plots the solution to a x + b y = c."""
    ax.axline((c / a, 0), (0, c / b), **kwargs)

It would be nice to have an easy way to plot an infinite half space:

def plot_half_space(ax, a, b, c):
    """Plots the solution to a x + b y ≥ c."""
    ...

Proposed solution

This could potentially be done by adding a HalfSpace patch to matplotlib.patches.

For an analogue, see Mathematica's HalfSpace and HalfPlane.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions