Sometimes when making a plot in R, you may want a cleaner chart without axis labels or tick marks. In ggplot2, both axis text (the labels) and axis ticks (the small tick marks) can be removed or customized. In this tutorial, you’ll learn how to remove axis text and ticks in ggplot2 for the x-axis… Continue reading Remove Axis Text & Ticks in ggplot2 (R) — Quick Examples
Tag: R
How To Make Lollipop Plot in R with ggplot2?
In this post, we will learn how to make lollipop plots in using R. Lollipop plots or lollipop charts kid of related to barplots or scatter plot when one of the variables is categorical variable. We will use NYC flights data from nycflights13 R package. Let us load tidyverse and nycflights13 packages. Data for making… Continue reading How To Make Lollipop Plot in R with ggplot2?
How To Color Scatter Plot by Variable in R with ggplot2?
In this post we will learn how to color scatter plots using another variable in the dataset in R with ggplot2. Scatter plots are extremely useful identify any trend between two quantitative variables. However, often you have additional variable in a data set and you might be interested in understanding its relationship. One way to… Continue reading How To Color Scatter Plot by Variable in R with ggplot2?
How To Color Boxplots By a Variable in R with ggplot2?
In this tutorial, we learn how to color boxplots in R by a variable. With ggplot2 in R, we can color boxplots in multiple ways. In this post, we will first see how to make a simple boxplot in R. And then we will learn how to fill the boxes on boxplot by a variable.… Continue reading How To Color Boxplots By a Variable in R with ggplot2?
Introduction to Color Palettes in R with RColorBrewer
Choosing colors for data visualization in R is hard—especially if you want charts that are clear, consistent, and inclusive. The RColorBrewer package (based on a href=”http://colorbrewer2.org/”>ColorBrewer2) gives you carefully designed sequential, diverging, and qualitative palettes that map well to how people perceive data. In this guide, you’ll learn when to use each palette type and… Continue reading Introduction to Color Palettes in R with RColorBrewer
