Why it does not show graph?

x <- c(1, 5, 3, 1)
labels <- c("A", "B", "C", "D")
pct <- round(x/sum(x)*100)
l <- paste(labels, pct)
pie(x,labels = l, col=rainbow(length(l)))

It works for me. Are you getting any kind of message in the console?

If so can you post it here?

If all else fails I would try shutting down R and RStudio or even a complete reboot.

do not show anything in the console

Any luck with a reboot?

What happens if you try:

dat1 <-   data.frame(xx = 1:10, yy = 10:1)
with(dat1, plot(xx, yy))

Can you post a screenshot of what you are seen as a result of running that code? also, please clearly state what is your expected output.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.