2 The plotly cookbook

This chapter demonstrates the rendering capabilities of plot_ly() through a series of examples. The plot_ly() function provides a direct interface to plotly.js, so anything in the figure reference can be specified via plot_ly(), but this chapter will focus more on the special semantics unique to the R package that can’t be found on the figure reference. Along the way, we will touch on some best practices in visualization.