title: How to arrange Xticks in ggplot for categorical variables
body: <p>I am having trouble visualizing the &quot;sex&quot; variable (Female=0, Male=1) from the &quot;heart_data&quot; dataframe. Here's my code:</p>
  <blockquote>
  <p>ggplot(heart_data, aes(x = sex)) + geom_bar()</p>
  </blockquote>
  <p>And this is what I obtain:</p>
  <p><a href="https://i.stack.imgur.com/BzALm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BzALm.png" alt="enter image description here" /></a></p>
  <p>What should I do in order to display just 0 and 1 or, preferably, Female and Male on the Xaxis?</p>