5261/making-ggplot2-plot-without-any-legends-axes-or-axis-labels
I am making a bar-plot with ggplot2:\
ggplot(data=mtcars,aes(x=factor(cyl),fill=factor(cyl)))+geom_bar()
I would want to plot this without any axes or legends. How can i do it?
The below command will give you the desired plot with no axes and legends:
ggplot(data=mtcars,aes(x=factor(cyl),fill=factor(cyl)))+geom_bar()+theme_void()+theme(legend.position="none")
# Load a dataset(to work with) # We’ll ...READ MORE
You need to close the device to ...READ MORE
Add a limit to axis ticks using ...READ MORE
How to fit different elements in a ...READ MORE
By Using gridExtra library we can easily ...READ MORE
You can use the theme layer to ...READ MORE
You just have to add 'outlier.shape=NA' inside ...READ MORE
Use facet_grid() and pass the field to ...READ MORE
You can use the scale_x_discrete() function with ...READ MORE
Load the 'scales' package first, which gives ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.