Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

Adjusting Title & Figsize in R

$
0
0

For this problem I am required to use ggplot2 and ggplot2 only. I have a barplot similar to the one below: enter image description here

I would like to insert a title on the upper left corner but somehow it keeps ending up in the wrong place.

  geom_text(stat='count', aes(label = ..count..), vjust = -1) +
  theme(panel.background = element_blank(), 
        axis.text.y = element_blank(),
        axis.title.y = element_text(),
        axis.ticks.y = element_blank(),
        axis.title.x = element_blank(),
        plot.margin = margin(1,1,1,1),
        panel.border = element_rect(fill = NA)) 

Furthermore I run into the problem of reshaping the plot. I would like the height of the plot to be much smaller but have the same width. Whenever I try it myself i can crop the plot but parts of the biggest bar are being cropped of aswell.

Can anyone help me?


Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>