I was wrapping my head around this problem, but couldn't fix it unfortunately... Maybe someone can help.
Basically, I would like to change the label of the x axis so that it only shows full numbers (e.g. "1", "2", etc.) and not "0.5" "1" "1.5" etc that are centered beneath each single bar.
I tried many different things, but they all didn't print what I would like to get. Here's the relevant code to reproduce the issue (histogram (2) as comparison and how I would like (1) to look):
hist(Model_1_Dataset$gtypesup_cat, main = "Frequency of Government Support Types", xlab = "Government Support Types", las = 1, breaks = seq(.5,3.5,1), col = "lightblue")
Create desired histogram (2) as comparison
hist(Model_1_Dataset$outcome_d, main = "Frequency of Conflict Outcomes", xlab = "Conflict Outcomes", las = 1, breaks = seq(-.5,3.5,1), col = "lightgreen")
Hi everyone,
I was wrapping my head around this problem, but couldn't fix it unfortunately... Maybe someone can help.
Basically, I would like to change the label of the x axis so that it only shows full numbers (e.g. "1", "2", etc.) and not "0.5" "1" "1.5" etc that are centered beneath each single bar.
I tried many different things, but they all didn't print what I would like to get. Here's the relevant code to reproduce the issue (histogram (2) as comparison and how I would like (1) to look):
Load relevant dataset
Model_1_Dataset <- read.csv("https://raw.githubusercontent.com/KatrinHeger/CollaborativeResearchProject/master/Model_1_Dataset.csv")
Create histogram (1) (the one to fix)
hist(Model_1_Dataset$gtypesup_cat, main = "Frequency of Government Support Types", xlab = "Government Support Types", las = 1, breaks = seq(.5,3.5,1), col = "lightblue")
Create desired histogram (2) as comparison
hist(Model_1_Dataset$outcome_d, main = "Frequency of Conflict Outcomes", xlab = "Conflict Outcomes", las = 1, breaks = seq(-.5,3.5,1), col = "lightgreen")
Thank's a lot!
Best,
Benedikt