Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
ggplot2 Essentials

You're reading from   ggplot2 Essentials Explore the full range of ggplot2 plotting capabilities to create meaningful and spectacular graphs

Arrow left icon
Product type Paperback
Published in Jun 2015
Publisher
ISBN-13 9781785283529
Length 234 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Donato Teutonico Donato Teutonico
Author Profile Icon Donato Teutonico
Donato Teutonico
Arrow right icon
View More author details
Toc

Exploring scales

We already discussed scales in different situations but, in this case, we will focus on certain general aspects that will turn out to be essential for you to understand how to fully utilize the different scales available. Generally speaking, the scales are assigned during the aesthetic mapping and are then used to define guides to trace from the represented objects back to the data by creating legends as well as the plot axis. You can add a scale to your plot or modify the default values of the scale using one of the scale functions. These functions have the general structure of scale_aesthetic_scale, where aesthetic represents the aesthetic on which the scale is applied and scale represents the name of the scale on which it is used. Typical aesthetic values can be, for instance, color, x, y, fill, shape, or size, while examples of scales are hue, brewer, gradient, and log10. So, for instance, the scale_color_gradient() function defines the gradient of colors. Take for...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image