Assuming you have two sets of values y
and c
, where y
corresponds to the height of the bars and c
corresponds to a color value for each bar based on some criteria (for example, if c(i) > 0
, the bar should be red):
main.m262 chars17 lines
This will create a bar graph with bars of height y
and colors dependent on the values in c
. In this example, if a value in c
is greater than 0
, the corresponding bar is red, otherwise it is blue.
gistlibby LogSnag