After loading the library in Step 1, we used the core plot_ly() function to create the simplest plot possible. We passed plot_ly() the name of the dataframe, and the columns for the x and y axes as formulae—hence the ~ sign. At this point, we haven't explicitly specified the trace type, what plotly calls its series or data tracks, so it guesses and makes a scatter plot, as shown in the following graph:
Note the menu icons at the top of the plot and the hover text that appears when you mouse over a data point. These figures can be interacted with perfectly well within an interactive R session but are better suited to HTML-based ...