Skip to main content
Commonmark migration
Source Link

You can remove your legend title with labs(color="") since the color aes gives your legend the name:

library(ggplot2) ggplot(data=df, aes(x=df$X, y=df$Y, color=df$Variable))+ geom_line(size=1)+ labs(x = "x", y = "y", color = NULL) + theme_bw() 

Plot: [![your plot without legend name][1]][1]your plot without legend name


Also working:

scale_color_discrete(name = NULL)

For further information check this thread here [1]: https://i.sstatic.net/ouirp.png

You can remove your legend title with labs(color="") since the color aes gives your legend the name:

library(ggplot2) ggplot(data=df, aes(x=df$X, y=df$Y, color=df$Variable))+ geom_line(size=1)+ labs(x = "x", y = "y", color = NULL) + theme_bw() 

Plot: [![your plot without legend name][1]][1]


Also working:

scale_color_discrete(name = NULL)

For further information check this thread here [1]: https://i.sstatic.net/ouirp.png

You can remove your legend title with labs(color="") since the color aes gives your legend the name:

library(ggplot2) ggplot(data=df, aes(x=df$X, y=df$Y, color=df$Variable))+ geom_line(size=1)+ labs(x = "x", y = "y", color = NULL) + theme_bw() 

Plot: your plot without legend name


Also working:

scale_color_discrete(name = NULL)

For further information check this thread here

added 4 characters in body
Source Link
mischva11
  • 3k
  • 3
  • 20
  • 35

You can remove your legend title with labs(color="") since the color aes gives your legend the name:

library(ggplot2) ggplot(data=df, aes(x=df$X, y=df$Y, color=df$Variable))+ geom_line(size=1)+ labs(x = "x", y = "y", color = ""NULL) + theme_bw() 

Plot: [![your plot without legend name][1]][1]


Also working:

scale_color_discrete(name = ""NULL)

For further information check this thread here [1]: https://i.sstatic.net/ouirp.png

You can remove your legend title with labs(color="") since the color aes gives your legend the name:

library(ggplot2) ggplot(data=df, aes(x=df$X, y=df$Y, color=df$Variable))+ geom_line(size=1)+ labs(x = "x", y = "y", color = "") + theme_bw() 

Plot: [![your plot without legend name][1]][1]


Also working:

scale_color_discrete(name = "")

For further information check this thread here [1]: https://i.sstatic.net/ouirp.png

You can remove your legend title with labs(color="") since the color aes gives your legend the name:

library(ggplot2) ggplot(data=df, aes(x=df$X, y=df$Y, color=df$Variable))+ geom_line(size=1)+ labs(x = "x", y = "y", color = NULL) + theme_bw() 

Plot: [![your plot without legend name][1]][1]


Also working:

scale_color_discrete(name = NULL)

For further information check this thread here [1]: https://i.sstatic.net/ouirp.png

Source Link
mischva11
  • 3k
  • 3
  • 20
  • 35

You can remove your legend title with labs(color="") since the color aes gives your legend the name:

library(ggplot2) ggplot(data=df, aes(x=df$X, y=df$Y, color=df$Variable))+ geom_line(size=1)+ labs(x = "x", y = "y", color = "") + theme_bw() 

Plot: [![your plot without legend name][1]][1]


Also working:

scale_color_discrete(name = "")

For further information check this thread here [1]: https://i.sstatic.net/ouirp.png