• Register
Welcome to Kodlogs, programming questions and answer website.
0 votes
11 views

Problem :

I am getting bellow error message
error in grid.call.graphics(c_setviewport, vp, true) : non-finite location and/or size for viewport
by (6.9k points)  

1 Answer

0 votes

Solution :

I also had faced the similar issue in past.Use the following code it is working for me:
# Just to ensure levels are in correct order
dataset$emp_month <- factor(
  dataset$emp_month, 
  levels = c("January", "March", "April", "May", "December")
  )

ggplot(dataset) +
  geom_boxplot(aes(x = emp_month, y = salary)) +
  geom_point(aes(x = emp_month, y = salary)) +
  facet_grid(. ~ emp_month ,space = "free", scales = "free", margins = T)

Further Readings:

by (20.3k points)  
...