Error in ggplot(): Mapping should be created with `aes()`

How to fix ggplot2 error: Mapping should be created with aes

In this post we will see an example of one of most common errors while making a plot with ggplot2 and how to fix them. Let us we are trying to make a scatter plot using ggplot2 using the following code. Here we use mtcars dataset built-in R to make the scatter plot If we… Continue reading Error in ggplot(): Mapping should be created with `aes()`

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 Make Violin plots with Matplotlib

In this tutorial, we will learn how to make violin plots using Python’s Matplotlib library. Matplotlib has a function called violinplot() and we will use that function to examples of making violinplot first and then learn to customize the violinplots. Unlike other tutorials on violinplot with Matplotlib, here we start with data stored in a… Continue reading How to Make Violin plots with Matplotlib

How to View All Matplotlib Plot Styles and Change

Change matplotlib style to fivethirtyeight style

In this tutorial, we will learn how to change the background theme or style of a plot made with matplotlib. Matplotlib offers a number of ready to use styles to use for matplotlib plots. We will first learn how to find the available style options and then learn to set a matplotlib style of interest… Continue reading How to View All Matplotlib Plot Styles and Change

Exit mobile version