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

ggsignif: How to position significance sign over x-axis ticks

I want to have a box plot with the significance level (e.g. ***) over each group, without a line. The comparison to generate the p value/significance level will be for each test group relative to a single control group. I have a lot of different…
JamesCrook
  • 23
  • 1
  • 6
1
vote
1 answer

Labeling individual boxes in a ggplot boxplot

I added the significance letters to this graph in powerpoint. I would like to add the significance letters above each box in R. Can I modify my ggplot code to include letters above each box? code: p1 <- ggplot(beta_data, …
Becca
  • 107
  • 2
  • 8
1
vote
1 answer

Margin Boxplots Matplotlib

I would like to manually add a margin to the boxplots generated by the following code. At present the boxplots are too much in the corners (ends). In general there will be many boxplots (unlike this sample code), which I'd like equally spaced (like…
user58925
  • 1,537
  • 5
  • 19
  • 28
1
vote
1 answer

Make a boxplot interactive using Shiny

I've been trying to develop an interactive boxplot with selective input in Shiny. current code: library(shiny) shinyUI(fluidPage( titlePanel("Sample 1"), sidebarLayout( sidebarPanel( selectInput("p", "Choose your salaries", choices…
BadLuckNick
  • 61
  • 1
  • 8
1
vote
2 answers

Mark specific value in Boxplot using Pandas

I have created a boxplot using pandas dataframe and now I want to mark specific values in the same plot, with an "X" (hopefully in screaming red!). Some data: df = pd.DataFrame( [ [2, 4, 5, 6, 1], [4, 5, 6, 7, 2], [5, 4, 5, 5, 1], [10, 4, 7, 8,…
gussilago
  • 922
  • 3
  • 12
  • 27
1
vote
0 answers

plotly box plot formatting issue

I'm trying to create a box plot using html and plotly (javascript). However, I'm having a weird issue where only half of my box plot is appearing when I run my code, and there are zoomed in icons over it.Any help debugging would be welcome!…
M Foler
  • 11
  • 2
1
vote
1 answer

R - Remove all outliers at once

I have a data set imported in R where I am trying to remove the outliers. I did it so far that I identified all outlier values with a boxplot and saved them in a variable. outlier_values_2 <- boxplot.stats(myfileswoNA$smart_1_raw)$out # outlier…
ste92
  • 434
  • 9
  • 23
1
vote
0 answers

'hue' in seaborn plot and x-axis location

I have a dataset with 'Counts' from several 'Items' per animal, for totally 291 animals. The data has been acquired at days 4, 10,21 and 60, an (edited) df.to_dense() looks like this Animal Day Item Counts 0 04A 4 11 11 1 04A 4 …
Habi
  • 1,157
  • 6
  • 18
1
vote
1 answer

MATLAB: combination boxplot of different length vectors

I have three vectors if different size (86x1 double), (61x1 double) and (10x1 double). I try: figure boxplot([x1,x2,x3]) but get "error using horzcat, dimensions of matrices being concatenated are not consistent". I've tried transposing the…
user3470496
  • 141
  • 7
  • 33
1
vote
1 answer

R add dividers in plotly boxplots

There are groups of boxplots: dat <- data.frame(xval = sample(100,1000,replace = TRUE), group_af = as.factor(sample(c("a","b","c", "e", "f"),1000,replace = TRUE)), group_xyz =…
Taz
  • 5,755
  • 6
  • 26
  • 63
1
vote
1 answer

Boxplot sublists of a list

i'm new to R. I'm trying to boxplot the data (df, list) in each sub-list using lapply. I have written this function: group.box <- function(x) { lapply(X = x, FUN = boxplot) } Running it on the list that contains 6 sub-lists gives me 6 individual…
Keity
  • 143
  • 1
  • 10
1
vote
1 answer

Defining text for the legend of boxplot in ggplot2

How can I display a1 (random), a2 (random 2), a3 (random 3) in the legend instead of displaying the boxplot symbole? The code I'm working with is library(ggplot2) library(reshape2) B <- 25 datainit <- data.frame(v1 = 1:B, a1 = randl, a2 = rand2,…
1
vote
2 answers

group day of the year data by month

I have a data frame called "fish" which contains variables such as mass, length and day of the year. I need to make a boxplot of fish length by month but there is no month variable, only day of the year (i.e 1:365). How can I group days by 30 to…
B.Riggins
  • 11
  • 1
1
vote
1 answer

Suppress extreme outliers from d3plus box and whiskers plot drawing

I am trying to create box plots with whiskers on d3plus, to compare a metric between "this" provider and "all" providers in my database. I have already calculated the 5-statistics summary from very large arrays in a pre-processing stage, and I am…
nvergos
  • 432
  • 3
  • 15
1
vote
0 answers

matplotlib: align y-ticks in twinx

This is related to many similar questions like this one. However the provided solutions don't really fit my needs because the tick labels then become meaningless. In my case the first y-axis is fixed and always the same. ticks from 0.0 (bottom of…
beginner_
  • 7,230
  • 18
  • 70
  • 127