I have three arrays:
x contains the width of each single bar, cumulative value of this array gives the maximum value on x axis eg: [1, 1.5, 0.7, 2,0.2] so maximum x value is 5.2
y contains the height of each bar eg: [-2, 3, 7, 10]
c type of bar eg: [apple, orange, plum, strawberry,apple]
I'd like to plot a barplot in which each bar has an assigned color related to its type, and an assigned width.
Cannot find a way to set these two caracteristic of the bars.
Best Answer