I have three columns in my data. Name, TP and FP and I want to plot a Cleveland dot plot which is ordered by the value of TP (in descending order) showing BOTH the TP and FP value for the respective Name.
R code
data <- read.csv("averages-names.csv")
data <- data %>% group_by(Name) %>% summarise(TP = sum(TP, na.rm=TRUE), FP = sum(FP, na.rm=TRUE)) %>% arrange(TP) %>% mutate(Name = factor(Name, levels = .$Name))
p = ggplot(data, aes(TP, Name)) + geom_point(color = "blue")
q = ggplot(data, aes(FP, Name)) + geom_point(color = "red")
This shows them successfully on two seperate graphs, but I want to plot both columns on the same graph.
my data looks like this:
data
A tibble: 173 x 3
Name TP FP
<fct> <dbl> <dbl>
1 Audi S5 Coupe 2012 0.214 0.633
2 Chevrolet Express Cargo Van 2007 0.267 0.361
3 Audi 100 Wagon 1994 0.317 0.663
4 Chevrolet Silverado 1500 Extended Cab 2012 0.422 0.633