Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

waterfallplots: how to plot individual bars starting at '0' y-axis? #1

Open
BhaktiDwivedi opened this issue Jan 17, 2015 · 0 comments

Comments

@BhaktiDwivedi
Copy link

I am trying to generate waterfallplots using your R package {waterfall}.

I have the below data frame (df) (sample data)

id value subgroup
1 -5.31 10
2 -3.73 10
3 -3.53 10
4 -3.21 10
5 -2.96 10
6 -2.66 20
7 -0.05 20
8 2.5 20
9 3 20
10 5 20

I use the below command to begin with:

waterfallchart(df[,2]~df[,1], data=df, names.arg=NULL, col=c("red","black"), level.lines=FALSE, groups=subgroup)

I am running into following:
(a) I do not get the bars from '0' value (y-axis) starting point, rather it's plotting cumulative row (r) values (r1, r1+r2, r1+r2+r3, r1+r2+r3+r4 and so on) when plotting individual bars. Is there a way to fix that? How can I simply plot the values as in 'value' column?
(b) How can I color each bar by the subgroup category? Is the col command ok?
(c) How can I remove the x-axis names. The 'names.arg=NULL' doesn't seem to work

I would greatly appreciate your help or suggestions on above. Thank you!!

Regards,
Bhakti

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant