In order to do this, I move each vector vertically and then, pass it to geom_rect(). I want to draw expense and income column by month. Xmin = id - 0.45, xmax = id + 0.45, ymin = end5, Because the income statement details revenues and expenses, it provides a glimpse into which business activities brought in revenue and which cost the organization moneyinformation investors can use to understand its health and executives can use to find areas for improvement. Ggplot(x.paste, aes(month_type, fill = type)) + geom_rect(aes(x = month_type, X.paste$end5 abs(x.paste$income_expense), 0, X.paste$income_expense+x.paste$income_expense) X.paste$start5 abs(x.paste$income_expense) ,x.paste$income_expense , X.paste$end5 abs(x.paste$income_expense), x.paste$income_expense+x.paste$income_expense, "type"] abs(x.paste$income_expense), x.paste$income_expense, X[x$month %in% c("Starting Cash", "End Cash"), I hope it makes my presentation easier to be understood. I want to modify this plot like this.Any help will be appreciate.Īt first I want to add to my previous information, that is, for August 2016, it has two vertical bars, between (2016-08, 0) and (2016-08, 30) for income, and between (2016-08, -40) and (2016-08,30) for expense.Īnd I drew a jpeg picture below which was the graph I wanted to draw with R commands. (dtt I managed to make a graph with R code below, which is different from what I really want. The stacked bar chart above depicts revenue from a fictional fitness retailer for a particular period of time, across two categorical variables: store. I have the data described above, and I want to draw a barplot, income and expense every months in group, left to right, side by side.įor example, in July 2016, it has two vertical bars, between (2016-07,-15) and (2016-07, 35) for income, and between (2016-08, -40) and (2016-08,30) for expense.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |