-1

I have been trying to make different graphs and none of them fit the box of the r graphs.

This is an example of my codes

 plot <- barplot(
      sort(colSums(prop.table(sentimientos_df[, 9:10]))), 
      horiz = TRUE, 
      cex.names = 0.8, 
      las = 1, 
      main = "Positive vs Negative Sentiment", xlab="Percentage"
    )

and this is a photo of the problem that I have, in which the title is not completely visible, nor the labels that I have assigned to it: plot

  • It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. Have you changed the default `par()` settings in your R session? – MrFlick Jan 19 '23 at 20:49

1 Answers1

0

You might be able to lower the title by using the title() function.

 plot <- barplot(
      sort(colSums(prop.table(sentimientos_df[, 9:10]))), 
      horiz = TRUE, 
      cex.names = 0.8, 
      xlab="Percentage"
    )
title("Positive vs Negative Sentiment", line = -2)
amanwebb
  • 380
  • 2
  • 9