title: How to rename the y axis ticks in ggplot r
body: <p>I have created a tile plot, as below:
  <a href="https://i.stack.imgur.com/TcPUG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TcPUG.png" alt="enter image description here"></a></p>
  
  <p>I'd like to rename the y axis ticks, instead of 1 - to "country", 2- to "city", 3 - to "all".
  I couldn't find a way to do it. I have the following script:</p>
  
  <pre><code>ggplot(test_df, aes(num, sample_type, fill = exist)) + 
  geom_tile(width=0.9, height=0.9,color = "gray")+ 
  scale_fill_gradientn(colours = c("white", "lightgreen"), values = c(0,1))+ 
  theme(axis.text.x = element_text(angle = 90, hjust = 1), 
  legend.position="none")+
  scale_x_discrete(position = "top") + labs(x = "", y= "Sample Type")
  </code></pre>
  
  <p>How can I do that without changing my dataframe?</p>
  
  <p>Here is a sample of my dataframe:</p>
  
  <pre><code>test_df &lt;- data.frame(
  num = c("num1","num1","num1","num2","num2","num2","num3","num3","num3"),
  sample_type = c(1,2,3,1,3,2,3,1,2),
  exist = c(1,0,0,1,1,0,1,0,0))
  </code></pre>