Hi Community
I want make a plot animate. I need that the points appear and desappear, but only make that the movements of points.
set.seed(1)
library(tidyverse)
library(gganimate)
df <- tibble(
x = rnorm(100)
, y = rnorm(100)
, size = rep(c(2, 3, 4, 5), 25)
, cl = sample(c("a", "b"), 100, T)
, time = rep(1:10, 10) #|> lubridate::year()
)
p2 <-
df |>
ggplot() +
aes(x, y, size = size, color = cl) +
geom_point() +
scale_size(range = c(5, 12)) +
transition_reveal(time) +
#enter_fade()
#transition_manual(time) +
shadow_mark(past = F, future = T)
animate(p2, renderer = gifski_renderer("sa.gif"))
Thanks
Yes, Im posted in both communty, for better help.
Thnks
Please be aware of our cross-posting policy
Posting the same question both here and on other sites
Posting the same question to multiple forums at the same time is often considered impolite. We don't completely ban such cross-posting, but we ask you to think hard before you do it and to follow some rules.
Cross-post sparingly
Rather than post the same thing here and elsewhere from the get-go, post in one place at a time. Let enough time go by (think days, not hours) before you take your question somewhere else. Sometimes people at another site may suggest you post here if your question doesn't fit within the scope of the other site.
Always link to your other posts, and update everywhere with any solution…
1 Like
@andresrcs , tnks. I had not seen this community policy. Thanks for sharing and clarifying. I agree, it was a mistake for not knowing this, it will not be repeated.
system
Closed
February 3, 2022, 4:34pm
6
This topic was automatically closed 7 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.