Skip to content

bar() (and possibly other plots) should take an array of string labels for x axis #2516

@stevengj

Description

@stevengj

It's pretty common to have bar charts where the x axis is a set of string labels rather than numbers. This can currently be done in pyplot with e.g.

bar([1,2,3],[4,3,6], align='center')
gca().xaxis.set_ticks([1, 2, 3])
gca().xaxis.set_ticklabels(['one', 'two', 'three'])

but it would be much nicer to simply support

bar(['one', 'two', 'three'], [4,3,6])

Similarly for barh and possibly some other plot types.

cc: @alanedelman

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy