0

I need a bar graph without internal lines but it doesn't seem to work for me, please help

library(ggplot2)

ggplot(data = Datoshoja1, aes(x = `AreaName`, y = `1990.0`)) + 
  geom_bar(stat="identity",  color = 'red', fill = 'darkred') +
  labs(title= 'Inmigrantes en EEUU año 1990', x = '', y = 'Cantidad de inmigrantes')

this is what I tried and the chart looks like this

enter image description here

but I need it to look like this

enter image description here

r2evans
  • 141,215
  • 6
  • 77
  • 149
  • 8
    Welcome to SO, Arie Goldstein! My guess (knowing nothing of your data) is that you have multiple instances of each country. Please make this question *reproducible*. This includes sample *unambiguous* data (e.g., `data.frame(x=...,y=...)` or the output from `dput(head(x))`), and intended output given that input. Refs: https://stackoverflow.com/q/5963269, [mcve], and https://stackoverflow.com/tags/r/info. – r2evans Nov 28 '22 at 21:16
  • 3
    The internal lines will be there for each row in your data. Pre-aggregate your data using your favorite method [to sum by group](https://stackoverflow.com/q/1660124/903061). – Gregor Thomas Nov 28 '22 at 21:38

0 Answers0