Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Business Analyst
  3. Question
Business Analyst

Remove all of x axis labels in ggplot

Asked by Diane Carr Apr 18, 2021 4.7K views 1 answer
Share

About this question

Question description - I need to remove everything on the x-axis including the labels and tick marks so that only the y-axis is labeled. How would I do this?

In the image below I would like 'clarity' and all of the tick marks and labels removed so that just the axis line is there.

Sample ggplot

data(diamonds)

ggplot(data = diamonds, mapping = aes(x = clarity)) + geom_bar(aes(fill = cut))

enter image description here

Desired chart:

 

enter image description here 

Your answer

1 Answer

More Business Analyst discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Business Analyst Blogs

Guides, tips and career advice on Business Analyst from JanBask experts.