-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Leftovers from old file in saveHTML #113
Comments
Not sure, might be spurious, from an unclosed device, and thus not a problem of this package. |
I tested your demo twice with img.name = "blacksquare" or img.name = "blackcircle", and keeping the html file name as same, I didn't see any a placeholder image. |
I believe that a file called Maybe this could be avoided by setting Best, Ulrike |
Yes, I think there are some problems in Here is my code. ani.options(imgdir="images", ani.dev="png", use.dev=TRUE, interval=0.1, nmax=38)
greys20 <- grey.colors(20, start=0.2, end=0.9)
saveHTML(
for (i in c(20:1, 2:19)){
plot.new()
par(mar=rep(1,4), bg="grey20")
plot.window(xlim=c(-1.25,1.25), ylim=c(-1.25,1.25), asp=1)
symbols(0, 0, circles=1, inches=FALSE,
bg=greys20[i], fg=greys20[i], add=TRUE)},
img.name = "blacksquare", htmlfile = "blackmovie.html",
title="Crude animation", navigator=FALSE)
ani.options(imgdir="images", ani.dev="png", use.dev=TRUE, interval=0.1, nmax=38)
greys20 <- grey.colors(20, start=0.2, end=0.9)
saveHTML(
for (i in c(20:1, 2:19)){
plot.new()
par(mar=rep(1,4), bg="grey20")
plot.window(xlim=c(-1.25,1.25), ylim=c(-1.25,1.25), asp=1)
symbols(0, 0, circles=1, inches=FALSE,
bg=greys20[i], fg=greys20[i], add=TRUE)},
img.name = "blackcircle", htmlfile = "blackmovie.html",
title="Crude animation", navigator=FALSE)
|
In ## try to append to the HTML file if it exists
html = if (file.exists(htmlfile)) {
readLines(htmlfile)
} else {
readLines(system.file('misc', 'scianimator', 'index.html', package = 'animation'))
} |
I see! I observe that appending does not happen for the same Best, Ulrike |
I encountered some problems arising from left-overs of an old saved html file of the same name. The situation: I ran the code below initially with black squares, with
img.name="blacksquare"
. I then changed to circles, changing the name toimg.name="blackcircle"
, but keeping the html file name. Viewing the html file in the browser showed an animation at the top which tried to find file "blacksquare1.png" (but of course didn't and displayed a placeholder instead), and below that the intended animation with the circles (the Rstudio window did not display either of the animations properly); thus,saveHTML
behaved as though there were an append option somehow, which seems like a bug to me.Best, Ulrike
The code:
ani.options(imgdir="images", ani.dev="png", use.dev=TRUE, interval=0.1, nmax=38)
greys20 <- grey.colors(20, start=0.2, end=0.9)
saveHTML(
for (i in c(20:1, 2:19)){
plot.new()
par(mar=rep(1,4), bg="grey20")
plot.window(xlim=c(-1.25,1.25), ylim=c(-1.25,1.25), asp=1)
symbols(0, 0, circles=1, inches=FALSE,
bg=greys20[i], fg=greys20[i], add=TRUE)},
img.name = "blackcircle", htmlfile = "blackmovie.html",
title="Crude animation", navigator=FALSE)
The text was updated successfully, but these errors were encountered: