Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying ggplot2 Essentials
  • Table Of Contents Toc
ggplot2 Essentials

ggplot2 Essentials

By : Donato Teutonico
3.8 (5)
close
close
ggplot2 Essentials

ggplot2 Essentials

3.8 (5)
By: Donato Teutonico

Overview of this book

This book is perfect for R programmers who are interested in learning to use ggplot2 for data visualization, from the basics up to using more advanced applications, such as faceting and grouping. Since this book will not cover the basics of R commands and objects, you should have a basic understanding of the R language.
Table of Contents (9 chapters)
close
close
8
Index

Scales


Scales take care of the mapping of aesthetic attributes to the data. When the data is assigned to aesthetic mapping, the scales map the data to the corresponding aesthetic attribute, and this is done via a specific function depending on the scale applied. The inverse of this function is then used to map back the elements from the aesthetic to the actual value of the data. This process is used to create the axis, to represent the x-y position of the elements on the plot, or to create the legends that represent the mapping of other aesthetic attributes.

If, for instance, we consider the assignment of data to a color scale. First, the data is assigned to a color by mapping the value of the data to colors within the range defined by the scale, and then the inverse of the scale defines the total range of colors used in the mapping, which will be used to draw the legend of the graph.

Within a plot, each aesthetic assignment has a different scale, and each aesthetic attribute has a default...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
ggplot2 Essentials
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon