Skip to content

[MNT]: Is broken_barh redundant? #24827

Closed
@omasoud

Description

@omasoud

Summary

broken_barh() documentation does not mention barh() but they seem very similar. I'm able to replace calls to broken_barh() with a call to this:

def broken_barh_using_barh(ax, xranges, yrange, **kwargs):
    kwargs2={'align':'edge'} 
    for k,v in kwargs.items():
        if k == 'facecolors':
            kwargs2['color'] = v
        else:
            kwargs2[k] = v
    ax.barh(y=yrange[0], height=yrange[1], left=[x[0] for x in xranges], width=[x[1] for x in xranges], **kwargs2)

So is there something that broken_barh() offers that barh() doesn't?

Proposed fix

It would help to document the difference if there is a meaningful one, otherwise perhaps deprecate broken_barh().

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