r - Colour just the top border of geom_bar -
a chart lot of bars looks squished, instance -
ggplot(data.frame(x = 1:1000, y = (rnorm(1000)), fill = sample(c('a','b','c'), 1000, replace = t)), aes(x, y, fill = fill)) + geom_bar(stat = 'identity')
i have chart similar dataset feel able make more sense out of colouring top border of bar. i'm unable achieve this. closest can incorporate geom_step
adds vertical lines y value changes , crowds chart more. geom_point
sizes aren't synced separation on x axis spill on side small x values. sure shot solution i'm able think of manipulate data such i'm able draw geom_segment
s work me. there other way
ps: need stick format reasons.
you use geom_errorbar()
, set ymin=
, ymax=
y
values. can play width=
, size=
need.
ggplot(data.frame(x = 1:1000, y = (rnorm(1000)), fill = sample(c('a','b','c'), 1000, replace = t))) + geom_errorbar(aes(x=x,ymin=y,ymax=y,color=fill),size=0.5,width=3)
Comments
Post a Comment