Draw boxplot with notch in R

0 votes

Hi Team,

I have created a boxplot in R. I want to draw a boxplot with the notch to find out how the medians of different data groups match with each other. How can I do that?

Oct 29, 2020 in Data Analytics by akhtar
• 38,170 points
44 views

1 answer to this question.

0 votes

Hi@akhtar,

We can draw a boxplot with a notch to find out how the medians of different data groups. The below script will create a boxplot graph with the notch for each of the data groups.

png(file = "boxplot_with_notch.png"
boxplot(mpg ~ cyl, data = mtcars, 
   xlab = "Number of Cylinders",
   ylab = "Miles Per Gallon", 
   main = "Mileage Data",
   notch = TRUE, 
   varwidth = TRUE, 
   col = c("green","yellow","purple"),
   names = c("High","Medium","Low")
answered Oct 29, 2020 by MD
• 95,060 points

Related Questions In Data Analytics

0 votes
1 answer

What are the options for deploying models in production with R?

Well, I could say that the answer ...READ MORE

answered Apr 12, 2018 in Data Analytics by DataKing99
• 8,240 points
738 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

edited Jun 9, 2020 by MD 5,646 views
0 votes
1 answer

How to print new lines with print() in R?

You can use cat() instead of writeLines(): ...READ MORE

answered May 3, 2018 in Data Analytics by kappa3010
• 2,090 points
128 views
0 votes
1 answer

How to filter a data frame with dplyr and tidy evaluation in R?

Requires the use of map_df to run each model, ...READ MORE

answered May 16, 2018 in Data Analytics by DataKing99
• 8,240 points
660 views
+10 votes
3 answers

Which is a better initiative to learn data science: Python or R?

Well it truly depends on your requirement, If ...READ MORE

answered Aug 8, 2018 in Data Analytics by Abhi
• 3,720 points
269 views
+1 vote
1 answer
0 votes
1 answer
0 votes
1 answer

How to create the Boxplot in R?

Hi@akhtar, Boxplots are a measure of how well ...READ MORE

answered Oct 29, 2020 in Data Analytics by MD
• 95,060 points
31 views
+1 vote
3 answers

Filtering R data-frame with multiple conditions

You can use the 'filter' function from ...READ MORE

answered Mar 26, 2018 in Data Analytics by Bharani
• 4,620 points
47,352 views