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

Chapter 2. Basic and Interactive Plots

In this chapter, we will cover the following recipes:

  • Introducing a scatter plot
  • Scatter plots with texts, labels, and lines
  • Connecting points in a scatter plot
  • Generating an interactive scatter plot
  • A simple bar plot
  • An interactive bar plot
  • A simple line plot
  • Line plot to tell an effective story
  • Generating an interactive Gantt/timeline chart in R
  • Merging histograms
  • Making an interactive bubble plot
  • Constructing a waterfall plot in R

Introduction

The main motivation behind this chapter is to introduce the basics of plotting in R and an element of interactivity via the googleVis package. The basic plots are important as many packages developed in R use basic plot arguments and hence understanding them creates a good foundation ...

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