O'Reilly logo

R Data Analysis Cookbook - Second Edition by Kuntal Ganguly

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

Introduction

Base R's graphics provide plots to feed ranges of data as x and y elements. They manipulate colors, scale dimensions, and present other parts of the graph as graphical elements or options. However, they lack advanced plotting or visualization features. The ggplot2 library implements the grammar of graphics, a coherent system for describing and building graphs. The grammar of graphics is designed to help you in separating and identifying each step of the charting process to better decide on the best way to visualize data. A ggplot2 graph is built up from a few basic elements:

  • Data: The raw data for visualization
  • Geometries (geom_): The geometric shapes that will represent the data
  • Aethetics (aes): The aesthetics of the geometric ...

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