ggplot2 - scatter plot with boxplot to show the outliers

0 votes

Hi, I want to see the ouliers using box and whisker chart, but the boxplot shows only margins of IQR, min, max and median. How to show points in the box plot like below?

Aug 1 in Data Analytics by kyra
18 views

1 answer to this question.

0 votes

Add another layer of scatter plot on top of box plot like below to show like the image above.

For Example - 

ggplot(mpg,aes(drv,displ))+geom_boxplot()

ggplot(mpg,aes(drv,displ))+geom_boxplot() + geom_point()

To add color to data points, add col = "color name" inside geom_point()

answered Aug 1 by Cherukuri
• 28,040 points

Related Questions In Data Analytics

+1 vote
2 answers

Custom Function to replace missing values in a vector with the mean of values

Try this. lapply(a,function(x){ifelse(is.na(x),mean(a,na.rm = TRUE) ...READ MORE

answered Aug 14 in Data Analytics by anonymous
85 views
0 votes
1 answer

With the help of tidyverse: how to rename a column to a variable name

With the help of Dplyr: rename function ...READ MORE

answered Apr 3, 2018 in Data Analytics by DeepCoder786
• 1,720 points

edited Apr 3, 2018 by DeepCoder786 44 views
0 votes
1 answer

R plot arima fitted model with the original series

This question has many ways to answer, ...READ MORE

answered May 18, 2018 in Data Analytics by DataKing99
• 8,130 points
1,182 views
0 votes
1 answer

Changing the order of bars in a bar-plot - ggplot2 - R

You can use the scale_x_discrete() function with ...READ MORE

answered May 28, 2018 in Data Analytics by Bharani
• 4,550 points
3,041 views
0 votes
1 answer

How to plot side-by-side Plots with ggplot2 in R?

By Using gridExtra library we can easily ...READ MORE

answered Apr 16, 2018 in Data Analytics by DeepCoder786
• 1,720 points
1,569 views
0 votes
0 answers
0 votes
0 answers
0 votes
0 answers

Create a dual axis column/bar chart using ggplot in R

Hi, i need to create a dual ...READ MORE

Jul 22 in Data Analytics by riya
67 views
0 votes
2 answers

How to count the number of elements with the values in a vector?

Use dplyr function group_by(). > n = as.data.frame(num) > ...READ MORE

answered Aug 21 in Data Analytics by anonymous
• 28,040 points
118 views
0 votes
1 answer

How to add create a box plot with categorical columns?

One way is to convert to factor ...READ MORE

answered Jul 4 in Data Analytics by anonymous
• 28,040 points
44 views