Closed weianuk closed 7 years ago
I cannot repeat your code. what is function
?
But I can run the demo successfully as shown below.
saveGIF(
{ for (i in 1:5) {
plot(rnorm(10))
legend(x="topleft",legend = c("1", "2","3","4","5","6"),
fill = c("red", "green","yellow", "blue","purple","grey"), bty = "n")
}
},
interval = 0.1, ani.width = 550, ani.height = 550
)
@yulijia Thanks for your prompt reply. Function is a complex block that calls many other subfunctions and ggmap, so it is hard to put here. But I realised the error is the legend setting using ggmap.
If you don't have further questions, I will close this issue.
When I was using saveGIF using the code below,
it gave the error of the legend:
Hope for helps on my problem. @yulijia @yihui
Thanks in advance.