You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both the `frame` and `ids` attributes operate on the trace level -- meaning that we can target specific layers of the graph to be animated. One obvious use case for this is to provide a background which displays every possible frame (which is not animated) and overlay the animated frames onto that background. Figure \@ref(fig:animation-targets) shows the same information as Figure \@ref(fig:animation-opts), but layers animated frames on top of a background of all the frames. As a result, it is easier to put a specific year into a global context.
@@ -241,8 +240,6 @@ Although **flexdashboard** is a really excellent way to arrange web-based conten
241
240
242
241
Figure \@ref(fig:flexdashboard-ggplotly) provides an example of embedding `ggplotly()` inside **flexdashboard**[@flexdashboard]. Since **flexdashboard** is an **rmarkdown** template, it automatically comes with many of things that make **rmarkdown** great: ability to produce standalone HTML, integration with other languages, and thoughtful integration with RStudio products like Connect. There are many other things to like about **flexdashboard**, including lots of easy-to-use theming options, multiple pages, storyboards, and even **shiny** integration. Explaining how the **flexdashboard** package actually works is beyond the scope of this book, but you can visit the website for documentation and more examples <https://rmarkdown.rstudio.com/flexdashboard/>.
<imgsrc="images/animation-ggplotly.png" alt="Animation of the evolution in the relationship between GDP per capita and life expectancy in numerous countries." width="100%" />
350
+
<imgsrc="images/animation-ggplotly.png" alt="Animation of the evolution in the relationship between GDP per capita and life expectancy in numerous countries." width="100%" data-url="/interactives/animation-ggplotly.html" />
351
351
<pclass="caption">
352
352
FIGURE 14.1: Animation of the evolution in the relationship between GDP per capita and life expectancy in numerous countries.
<imgsrc="images/animation-factors.png" alt="Animation of GDP per capita versus life expectancy by continent. The ordering of the contintents goes from lowest average (across countries) life expectancy to highest." width="100%" />
387
+
<imgsrc="images/animation-factors.png" alt="Animation of GDP per capita versus life expectancy by continent. The ordering of the contintents goes from lowest average (across countries) life expectancy to highest." width="100%" data-url="/interactives/animation-factors.html" />
388
388
<pclass="caption">
389
389
FIGURE 14.3: Animation of GDP per capita versus life expectancy by continent. The ordering of the contintents goes from lowest average (across countries) life expectancy to highest.
390
390
</p>
391
391
</div>
392
392
<p>Both the <code>frame</code> and <code>ids</code> attributes operate on the trace level – meaning that we can target specific layers of the graph to be animated. One obvious use case for this is to provide a background which displays every possible frame (which is not animated) and overlay the animated frames onto that background. Figure <ahref="animating-views.html#fig:animation-targets">14.4</a> shows the same information as Figure <ahref="animating-views.html#fig:animation-opts">14.2</a>, but layers animated frames on top of a background of all the frames. As a result, it is easier to put a specific year into a global context.</p>
<imgsrc="images/animation-targets.png" alt="Overlaying animated frames on top of a background of all possible frames." width="100%" />
398
+
<imgsrc="images/animation-targets.png" alt="Overlaying animated frames on top of a background of all possible frames." width="100%" data-url="/interactives/animation-targets.html" />
399
399
<pclass="caption">
400
400
FIGURE 14.4: Overlaying animated frames on top of a background of all possible frames.
<imgsrc="images/subplot-simple.svg" alt="The most basic use of subplot() to merge multiple plotly objects into a single plotly object." width="100%" />
354
+
<imgsrc="images/subplot-simple.svg" alt="The most basic use of subplot() to merge multiple plotly objects into a single plotly object." width="100%" data-url="/interactives/subplot-simple.html" />
355
355
<pclass="caption">
356
356
FIGURE 13.1: The most basic use of <code>subplot()</code> to merge multiple plotly objects into a single plotly object.
<imgsrc="images/economics.svg" alt="Five different economic variables on different y scales and a common x scale. Zoom and pan events in the x-direction are synchronized across plots." width="100%" />
367
+
<imgsrc="images/economics.svg" alt="Five different economic variables on different y scales and a common x scale. Zoom and pan events in the x-direction are synchronized across plots." width="100%" data-url="/interactives/economics.html" />
368
368
<pclass="caption">
369
369
FIGURE 13.2: Five different economic variables on different y scales and a common x scale. Zoom and pan events in the x-direction are synchronized across plots.
<imgsrc="images/map-subplot.svg" alt="Multiple bar charts of US statistics by state in a subplot with a choropleth of population density." width="100%" />
452
+
<imgsrc="images/map-subplot.svg" alt="Multiple bar charts of US statistics by state in a subplot with a choropleth of population density." width="100%" data-url="/interactives/map-subplot.html" />
453
453
<pclass="caption">
454
454
FIGURE 13.6: Multiple bar charts of US statistics by state in a subplot with a choropleth of population density.
<imgsrc="images/ggpairs.svg" alt="A generalized pairs plot made via the ggpairs() function from the GGally package." width="100%" />
486
+
<imgsrc="images/ggpairs.svg" alt="A generalized pairs plot made via the ggpairs() function from the GGally package." width="100%" data-url="/interactives/ggpairs.html" />
487
487
<pclass="caption">
488
488
FIGURE 13.8: A generalized pairs plot made via the <code>ggpairs()</code> function from the <strong>GGally</strong> package.
489
489
</p>
@@ -533,7 +533,7 @@ <h4><span class="header-section-number">13.1.2.3</span> Trellis displays with <c
<imgsrc="images/fluid.png" alt="Arranging multiple htmlwidgets with fluidPage() from the shiny package." width="100%" />
591
+
<imgsrc="images/fluid.png" alt="Arranging multiple htmlwidgets with fluidPage() from the shiny package." width="100%" data-url="/interactives/fluid.html" />
592
592
<pclass="caption">
593
593
FIGURE 13.12: Arranging multiple htmlwidgets with <code>fluidPage()</code> from the <strong>shiny</strong> package.
FIGURE 13.14: Using <strong>trelliscopejs</strong> to surface high-dimensional insights related to life expectancy and GDP per capita in various countries. For the interactive, see <ahref="https://plotly-r.com/interactives/trelliscope.html" class="uri">https://plotly-r.com/interactives/trelliscope.html</a>
642
+
FIGURE 13.14: Using <strong>trelliscopejs</strong> to surface high-dimensional insights related to life expectancy and GDP per capita in various countries. For the interactive, see <ahref="https://plotly-r.com/interactives/trelliscope" class="uri">https://plotly-r.com/interactives/trelliscope</a>
0 commit comments