#Source: https://t.me/rstudioprogr
library(ggplot2)

data <- data.frame(x = c("52 week range","EV/EBITDA (Global)", "EV/EBITDA (Russia)", "DCF", "LBO Valuation"), 
                   median = c(99,135, 122, 102, 145),  
                   q1 = c(67, 54, 71, 66, 99),  
                   q3 = c(113,160, 145, 134, 156),  
                   min = c(40,50,60,35, 85), 
                   max = c(120,178,199, 188, 178))

mean(data$median)
## [1] 120.6
ggplot(data) +
  geom_errorbar(aes(x = x, ymin = min, ymax = max), width = 0.1, color = "black") + 
  geom_boxplot(aes(x = x, y = median, ymin = q1, lower = q1, middle = median, upper = q3, ymax = q3),
               stat = "identity", fill = "darkblue", color = "lightblue", width = 0.5) +
  coord_flip() +
  theme_minimal() + xlab("") + ylab("") + 
  geom_hline(aes(yintercept = mean(data$median), color = "Итоговая оценка"), linetype="dashed", size=1) + 
  theme(legend.position = "top") + 
  guides(color=guide_legend(title="")) + scale_color_manual(values = c("forestgreen")) + 
  ggtitle("Football field для оценки стоимости компании") + 
  labs(caption = "@rstudioprogr")