ggplot2 errot: how to fix could not find function “ggplot

How to fix Error in ggplot(., aes... could not find function ggplot

In this post we will learn how to fix one of the most common ggplot2 errors, saying “could not find function “ggplot”” Let us consider an example where we are trying to make boxplot using iris, one of the R built-in datasets. We have been extra careful and write a perfect R code as show… Continue reading ggplot2 errot: how to fix could not find function “ggplot

How to Make Grouped Violinplot with jittered data points in R

Grouped violin plot with jittered points using geom_sina() in ggforce

In this post, we will learn how to make grouped violin plot with jittered data points on top of it using ggplot2 in R. One of the challenges in making grouped violin or box plots with jittered data points is proper alignment of data points and the underlying plot. In an earlier tutorial, we addressed… Continue reading How to Make Grouped Violinplot with jittered data points in R

How to Reverse Order in Facet in ggplot

How to reverse the order of facets in R

In this tutorial, we will learn how to reverse the order of facets, multiple small plots, made with ggplot2 in R. We will use R package forcats’s handy function fct_rev() to reverse the order of facets made using facet_wrap() function in ggplot2. Let us load tidyverse suite of R packages and palmer penguin dataset for… Continue reading How to Reverse Order in Facet in ggplot

How to Add Colors to Axis Tick Label in ggplot2

How to add colors to axis tick labels using ggtext?

In this tutorial, we will learn how to add colors to axis tick labels in ggplot2. To add colors to axis labels we will use the R package “ggtext: Improved text rendering support for ggplot2” developed by Claus Wilke. Let us get started by loading the packages needed. We will use Palmer Penguin data set… Continue reading How to Add Colors to Axis Tick Label in ggplot2

Exit mobile version