O'Reilly logo

R Data Visualization Cookbook by Atmajitsinh Gohil

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

An interactive bar plot

We would like to make the bar plot interactive. The advantage of using the Google Chart API in R is the flexibility it provides in making interactive plots. The googleVis package allows us to skip the step to export a plot from R to an illustrator and we can make presentable plots right out of R.

The bar plot functionality in R comes with various options and it is not possible to demonstrate all of the options in this recipe. We will try to explore plot options that are specific to bar plots.

In this recipe, we will learn to plot the returns data of Microsoft over a 2-year period. The data for the exercise was downloaded using Google Finance. We have calculated 1-day returns for Microsoft in MS Excel and imported the CSV ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required