I took the following sample code from another similar question and tried to replicate it.
x <- structure(list(variable = c("a", "b", "c"), f = c(0.98, 0.66, 0.34), m = c(0.75760989010989, 0.24890977443609, 0.175125)), .Names = c("variable","f", "m"), row.names = c(NA, 3L), class = "data.frame")
> x
variable f m
1 a 0.98 0.7576099
2 b 0.66 0.2489098
3 c 0.34 0.1751250
and when the example ran the following code:
ggplot(x, aes(variable, f,label=variable)) +
geom_bar() + geom_bar(aes(variable, m), fill="purple")
the following stacked bar char shows...
My turn! The following is a data frame of data
> data
asset.std asset.dstd symbols
IEF 0.00470368279997122 0.00477691934631662 IEF
SPY 0.0119358320227236 0.0130162006829043 SPY
GSG 0.0137798134700255 0.0147096635302501 GSG
VNQ 0.016058588692544 0.0169327904112519 VNQ
TLT 0.0108803682930942 0.0109165197621356 TLT
SHY 0.000635574928974698 0.000676146828833939 SHY
and i run the following code
ggplot(data, aes(symbols, asset.std, label=symbols))+
geom_bar() + geom_bar(aes(symbols, asset.dstd),fill="blue")
and i get this instead....huh?
Am i missing something in my ggplot2 code? Anything would help thxs