xiaodai
xiaodai

Reputation: 16004

How to label barcharts in Plots.jl?

I can do a simple barplot

using Plots
bar([1,2,3])

but how do I label the bars as "a", "b", "c"?

Upvotes: 3

Views: 928

Answers (1)

Ian Marshall
Ian Marshall

Reputation: 739

To put labels on the x axis you can do the following:

bar(["a","b","c"],[1,2,3])

If you wanted to put the labels anywhere else then it does seem like annotate! would be your best option, as juliohm suggested.

Upvotes: 3

Related Questions