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
Tranistion_layer adds extra layer of NA #384
Comments
The issue arrises when setting a transition_length. This can be seen using the frame_vars() command:
The first layer recieves a transition of 4 frames followed by 16 frames for the layer. The remaining four layers recieve 4 frames for the transition and 15 frames for the layer, which sums to 96 out of 100 frames. The missing 4 frames recieve values of NA. It is not yet clear to me why gganimate is creating the frames in this manner. It seems like the missing 4 frames should naturally be assigned to the four layers which only recieve 15 frames per layer. Since the original desired output was essentially a gif going throough each layer, the transition_length can be set to zero. This results in no frames of NA being added to the animation:
|
When creating a .gif using transition_layer() and extra frame of NA is added at the end.
Reprex:
The animation works as expected until the end of the animation . The layers go ..."five of 5", "one of 5", "NA of 5", "one of 5".
There is no NA in the layer information:
The text was updated successfully, but these errors were encountered: