Tag Archives: R Project

R language – error analysis – error in Call.graphics (C_ palette2, .Call(C_ palette2, NULL)) : invalid graphics state

problem description: plot, the error 01

> ggplot(religions_long, 
+        aes(State, value, fill = variable)) +
+     geom_bar(stat = "identity") +
+     coord_flip()
> Error in .Call.graphics(C_palette2, .Call(C_palette2, NULL)) : 
  invalid graphics state

solution: maybe R can’t bear too much drawing, so empty all drawing will