Displaying 2 results from an estimated 2 matches for "att_level".
Did you mean:
att_levels
2013 Oct 30
1
ggplot2 question: keeping the order as in the input data
...ng ggplot2 (see the code below) to plot the data in 'myplotdata'.
The first column of 'myplotdata' is called "att.levels" and contains
strings; the second column is called "WTP" and contains numeric values.
Notice - I use 'coord.flip()'
The command aes(x=att_levels, y=WTP), if I understand correctly, sorts
things alphabetically based on the column 'att_levels'.
Question 1: How can I reverse the order for x in the plot (also
alphabetically but in the opposite direction)?
Question 2: How can I just have exactly the same order as in the object
'mypl...
2013 Oct 30
1
ggplot2 - how to get rid of bar boarder lines
Hello!
I am using ggplot2:
ggplot(myplotdata, aes(x=att_levels, y=WTP)) +
geom_bar(stat="identity",fill="dark orange",colour="black",
alpha = 1,position = "identity") +
geom_text(aes(label=WTP),colour="black",size=4,hjust=1.1,position='dodge') +
coord_flip() +...