Having trouble removing the overview of the colors of my variable on the right hand side

Hi there!

I'm having trouble removing the overview of the colouring of the different levels of the variable splitku4_lab on the right hand side of my ggplot-visualization. How do you think I could go about removing it?

My code: ggplot(data = d)+
geom_hline(data = mean,aes(yintercept=mean_val,col=splitku4_lab))+
labs(x=NULL,y="Berettigelse til arbejdsløshedsunderstøttelse (0-10)",
title = "Berettigelse til arbejdsløshedsunderstøttelse (ku4)",
subtitle = "For kontrolgruppe og stimuligrupper",
caption = "N=928")+
facet_grid(.~splitku4_lab,space = "free",scales = "free_x")

Merry Christmas!

Hi, welcome to the forum.

If I understand the question, have a look at How to Remove a Legend in ggplot2 (With Examples)

Add a show.legend = FALSE argument to your geom commands.
Also: When you're adding your code, it is supposed to work for us. Clearly, It does not. That is because we dont have the variable data you are refering to.
In the future,
Please provide a sample of your data. How to make sure your sample code works?
Delete all environment variables and check it for yourself.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.