I have a Plot in R, that shows several variables on the x-axis. On the y-axis, there are different departments. Each department has its own ability to save data (the variables on the x-axis). If a variable can be saved by one of the department (TRUE), the department gets a point at the intersection of the two axis. It works for every single variable, that is TRUE in any of the departments. But the problem is, if a variable is not TRUE in any of the departments, the variable is not showing in the plot at all. So my question is: is there is any way to show all the variables on my x axis, even if they are not relevant for the plot? I already added a "Initial department", where every variable is true, but that is only be an interim solution.
The code for plotting is this:
tdf2 <- df2 %>% gather(Abteilungen, value, -names)
p <- tdf2 %>% filter(value==TRUE) %>%
ggplot(aes(names, Abteilungen, col=Abteilungen)) + geom_point() +
scale_y_discrete(limits = rev(levels(factor(tdf2$Abteilungen)))) +
theme(axis.text.x = element_text(angle = 90)) +
xlab("Erfasste Parameter") +
ylab("Betrachtete Abteilungen") +
labs(title = "Gießener Abteilungen im Vergleich: Möglichkeit der strukturierten Erfassung von Parametern")
print(p)