Questions tagged [boxplot]

Boxplot is a form of displaying cardinally scaled data displaying robust summary statistics as graphical elements.

A boxplot (or a box-and-whisker plot) is a mean of displaying cardinally scaled data. The graphic displays robust summary statistics of a given dataset. These include for the box: the median, the lower quartile and the upper quartile. The enclosed whiskers are not commonly defined and may display some figure tied to the inter quartile range (e.g. IQR x 1.5) or the maxima/minima. Sometimes outliers are displayed as well.

Boxplots may easily be created by most statistical packages such as:

boxplot(rnorm(100)) #For R
boxplot(randn(100)) %For Matlab
graph box variable  'For Stata
boxplot(data)       #For matplotlib (python)
boxplot(dataframe)  #For seaborn (python)

Link:

3351 questions
1
vote
1 answer

Boxplot in pandas with confidence intervals and bootstrap returns exception - Reproducible example with iris dataset

I tried to plot a boxplot with confidence intervals but I got an exception. from sklearn import datasets iris = datasets.load_iris() iris = iris.data iris = pd.DataFrame(iris) iris.columns = ['a', 'b', 'c', 'd'] iris.boxplot(column='a',…
user8270077
  • 4,621
  • 17
  • 75
  • 140
1
vote
1 answer

Removing lower and upper quartiles in boxplot, with connection between whiskers in R

So im trying to make some different Boxplots, Completely normal boxplot I can't figure out how to create the boxplot without the lower and upper quantile, which essentially would be the outliers and the median connected by the whiskers. So…
RAHenriksen
  • 143
  • 2
  • 12
1
vote
1 answer

How is the extreme of the whisker of boxplot calculated with ggplot?

I'm trying to do a boxplot with ggplot function : ggplot() + geom_boxplot(...) how is the whisker calculated with ggplot?
user9659700
1
vote
2 answers

pandas parsing excel file creating boxplot and store it in excel file again

i have the following excel (xlsx) file with informations like: files val_1 val_2 val_3 val_4 1 file_1 545.0 475.20822 116 43.0 2 file_2 179.0 19.791214 17 39.0 3 file_3 600.0 450.54407 302 92.0 4 …
friggler
  • 177
  • 2
  • 14
1
vote
1 answer

Troubles with R: Changing headings of multiple boxplots using ggplot2

I've run into a problem, that I can't seem to solve, and after having searched the internet for 24h I decided to ask in here. I have a 4 boxplot figure, that I made with the ggplot2. Each boxplot is named after the data variable. But to make it…
1
vote
1 answer

ggplot2 box plot analysis along a given factor

I have a data frame containing three factors (Scenarios, Emission Target, and Climate Action Year) against which there are several numeric-valued metrics. What I am looking for is to create a box plot for a given metric analyzed over the…
Sarang
  • 13
  • 4
1
vote
2 answers

Issue with date to plot box plot with ggplot

I have the following data frame d: TS Turbidity 1 2014-12-12 00:00:00 87 2 2014-12-12 00:15:00 87 3 2014-12-12 00:30:00 91 4 2014-12-12 00:45:00 84 5 2014-12-12 01:00:00 92 6 2014-12-12 01:15:00 …
Elia
  • 17
  • 5
1
vote
2 answers

R outliers function

I have a function to delete outliers detectaOutliers(), but somehow my function does not delete all outliers. Can somebody help me to find the mistake? detectaOutliers = function(x) { q = quantile(x, probs = c(0.25, 0.75)) R = IQR(x) OM1 =…
1
vote
1 answer

Extract values of whiskers from boxplot

Considering boxplot of rivers as below: boxplot(rivers, col='chartreuse3', ylab='length of rivers') My questions are: What is skewness of this distribution How can I extract values of whiskers in above plot. What are the exact outliers values? Any…
user2200016
  • 51
  • 1
  • 3
1
vote
0 answers

scale axis subplots created with df.boxplot(by=)

I have a dataframe df df=pd.DataFrame(data=[[100,23,1],[112,13,1],[212,3,2],[222,2,2]],columns=['A','B','C']) I plot the boxplot using groupby axes = df.boxplot(by='C', return_type='axes') The problem is that I would like to scale the axis of my…
gabboshow
  • 5,359
  • 12
  • 48
  • 98
1
vote
1 answer

Adding observation count in two-factor boxplot

I have already seen another similar question in : Add number of observations per group in ggplot2 boxplot But this solution doesn't work in my plot as I have two-factors boxplots. This is what I tried: Here is my data: >…
1
vote
0 answers

How to connect boxplot's medians with multiple dataset

I searched and didn't find my solution yet. I'd like to have multiple lines to joint all boxplot's medians. I saw a lot of example, but it only worked for one set of data (for example:…
Peter Rowan
  • 127
  • 1
  • 11
1
vote
1 answer

distance between box plots with unequal samples

I would like to draw a bar chart with "unequal samples". Here is an example code A = [16 20 15 17 22 19 17]'; B = [22 15 16 16 16 18]'; C = [23 9 15 18 13 27 17 14 16 15 21 19 17]'; group = [ ones(size(A)); 2 * ones(size(B)); 3 *…
Sonia
  • 25
  • 1
  • 7
1
vote
2 answers

Use geom_count in a boxplot/dotplot to indicate multiple instances of value with multiple groups

I would like to plot the spread of my data on top of a boxplot. I've managed so far to overlap a geom_boxplot() with a geom_dotplot(). However, I have many datapoints, with many overlapping. I would like to give some indication in my plot of where…
Inkling
  • 469
  • 1
  • 4
  • 19
1
vote
1 answer

boxplot displays incorrect when coverting from factor to numeric

My graph displays correctly without using scale. I want to have it looks better so I convert factor to numeric then using scale_x_continuous. However, the graph looks incorrect when I convert from factor to numeric (How to convert a factor to an…
Peter Rowan
  • 127
  • 1
  • 11