Plots.jl bar width and color

500 views
Skip to first unread message

Andre Bieler

unread,
Jun 1, 2016, 2:23:42 PM6/1/16
to julia-users
How can I set the with of bars in a bar plot.

say for

```julia
bar([1,2,3], [4,6,3])
```

Is it possible to pick colors that are not defined as
keywords like :black, :grey. etc?

Something like #BFBFBF

Cheers,
Andre

Tom Breloff

unread,
Jun 1, 2016, 3:36:53 PM6/1/16
to julia-users
You can use any Colors.Colorant, or arrays of them: c = [:blue, RGB(1,0,0), RGBA(1,0,0,0.2)]

Andre Bieler

unread,
Jun 1, 2016, 7:13:57 PM6/1/16
to julia-users
Great,

what about the width of the bars?

Tom Breloff

unread,
Jun 1, 2016, 7:43:59 PM6/1/16
to julia...@googlegroups.com
I think I implemented 'bar_width' recently. Might depend on backend? You can always look at the src/args.jl code to get ideas of what is implemented (until good docs are ready of course)
Reply all
Reply to author
Forward
0 new messages