Showing posts with label Easing Animation. Show all posts
Showing posts with label Easing Animation. Show all posts

Saturday, January 5, 2019

Easing Animation

Linear Transition Easing  Animation

ggplotly(gg)
> base <- gapminder %>%
+     plot_ly(x = ~gdpPercap, y = ~lifeExp, size = ~pop,
+             text = ~country, hoverinfo = "text") %>%
+     layout(xaxis = list(type = "log"))
base %>%
+     add_markers(color = ~continent, frame = ~year, ids = ~country) %>%
+     animation_opts(1000, easing = "elastic", redraw = FALSE) %>%
+     animation_button(
+         x = 1, xanchor = "right", y = 0, yanchor = "bottom"
+     ) %>%
+     animation_slider(
+         currentvalue = list(prefix = "YEAR ", font = list(color="red"))

Easing Animation

www.r-languagestatistics.co

Black-Scholes formula-R

 Black-Scholes formula-R > BlackScholes <- function(TypeFlag = c("c", "p"), S, X, Time, r, b, sigma) { TypeFla...