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

The coordinate system


The coordinate system adjusts the mapping from coordinates to the 2D plane of the computer screen. Among the different coordinate systems available in ggplot2, the Cartesian system is the most common coordinate system for two dimensions, while the polar coordinate system is often used for special plots, such as pie charts. When you create a plot, the coordinate system for the graph will be set with default values, which, in most cases, would be Cartesian coordinates. If you want a different coordinate system, you can overwrite the default value using the appropriate function. Such functions have the general form coord_x, where x is replaced by the specific coordinate desired.

The following is a table summarizing the main functions of coordinate systems; a more exhaustive list can be found on the package website:

Main coord functions

Description

coord_cartesian(xlim, ylim)

This is a Cartesian coordinate system.

xlim and ylim can be used to provide limits for the...

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