Skip to content

Small tips on the matplotlib tutorial #58

Description

@timhoffm

Annotating bars

There is https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.bar_label.html so that you don't have to roll your own annotate_bars() function anymore.

Boxplots
Instead of

    ax.boxplot(...)
    ax.set_xticklabels(labels)

use

    ax.boxplot(..., tick_labels=labels)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions