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

R: Is it possible to combine rows of non-equal length into a single data frame using a for-loop?

I have been working with a dataset (called CWNA_clim_vars) structured so that the variables associated with each datapoint within the set are arranged in columns, like this: dbsid elevation Tmax04 Tmax10 Tmin04 Tmin10 PPT04 PPT10 0001 …
T. Zaborniak
  • 107
  • 1
  • 11
1
vote
0 answers

Create a VBA Macro to create BoxPlot Charts

I am a beginner in VBA, so be indulgent in my lack of methodology while working on some VBA macro for Excel. My goal is to create some BoxPlot Charts in Excel at this time, I have been able to create some For/If loop to capture the Data in my…
CLR
  • 21
  • 4
1
vote
1 answer

Add median value for each boxplot

This is the file new.txt Chr Start End Name 18NGS31 18MPD168 18NGS21 18NGS29 18NGS33 18NGS38 chr9 1234 1234 ABL1 1431 1 1112 1082 1809 1647 chr9 2345 2345 ASXL1 3885 37 3578 1974 2921 …
RonicK
  • 229
  • 2
  • 3
  • 10
1
vote
1 answer

Draw the density curve exactly on the Histogram without normalizing

I need to draw the density curve on the Histogram with the actual height of the bars (actual frequency) as the y-axis. Try1: I found a related answer here but, it has normalized the Histogram to the range of the curve. Below is my code and the…
1
vote
3 answers

Python Pandas - MemoryError trying to read big file .txt

i have"MemoryError" when im trying to read file with 45 millions files. How to solve this problem? NOTE: My code works for small files import numpy as np import pandas as pd from pandas import Series, DataFrame from pandas.tools.plotting import…
Raul Escalona
  • 117
  • 1
  • 10
1
vote
1 answer

Incorrect box widths of ggplot boxplot with continuous x axis?

I am plotting the same data once as geom_point() and once as geom_boxplot(), but the width of my boxplots seems to be off. The largest x is at 292, but the corresponding box is smaller than 285. How can i get this to the correct size? Here is a…
voiDnyx
  • 975
  • 1
  • 11
  • 24
1
vote
1 answer

Box plot, move boxes closer together

I have made a box plot with geometric means with the following code bp.vals <- function(x, probs=c(0.05, 0.25, 0.75, .95)) { r <- quantile(x, probs=probs, na.rm=TRUE) r = c(r[1:2], exp(mean(log(x))), r[3:4]) names(r) <- c("ymin",…
Petra
  • 45
  • 1
  • 1
  • 6
1
vote
0 answers

Trouble with creating a grouped Boxplot in R Studio

I am trying to create a grouped Boxplot in R Studio with ggplot2. My Data looks like this: (4 different APP.mm values in total) And a sample dput() of my dataset: structure(list(APP.mm = c(408.5, 408.5, 408.5, 408.5, 408.5, 408.5, 408.5, 408.5,…
Leni
  • 11
  • 2
1
vote
0 answers

Create boxplots specifying particular range of values from each column seaborn

Bit of a tricky one to explain. I am trying to create two subplots consisting of a histogram and a boxplot, using data from the same dataframe (df), which has two columns (different lengths) 'price_cml15' and 'price_nw15'. When making these graphs I…
1
vote
1 answer

Plot only smooth line?

I want to do a plot of just the lowess line of my boxplot. Is there a way to show only that line in the plot and delete the boxplot? I have this. du=boxplot(Q~Duration) lines(lowess(du$stats[3,],f=1/5)) Or is there other function to show that…
user195366
  • 465
  • 2
  • 13
1
vote
1 answer

How do i groupby portions of a column name for a box plot?

I am looking to groupby a subset of column names to create boxplots in python pandas. I have the following dataset: local_term_1year | regional_term_1year | local_term_2year | regional_term_2year …
GrandmasLove
  • 465
  • 1
  • 4
  • 14
1
vote
1 answer

Why boxplot by matplotlib 1.4.0 is not as same as boxplot by matplotlib 2.2.0 for same data?

I was using the following code to boxplot the values with 5th and 95th percentiles as upper and lower bounds. Surprisingly, I have got two different plots by using matplotlib 1.4.0 in python 2.7.3 and matplotlib 2.2.0 in python 3.6.5. The version…
PyLabour
  • 245
  • 3
  • 5
  • 15
1
vote
2 answers

Python boxplot on single variables

I'm trying to print all the boxplots for each variable in a dataset with this python loop. colNameList = list(df.columns) for i in range (0, len(df.columns)): df.boxplot(column=colNameList[i]) Where df is my dataset. Why this simple code shows…
Davide
  • 185
  • 3
  • 22
1
vote
0 answers

gap.boxplot produces different figure than boxplot

Why does the following code produce different figures? (required package: plotrix) boxplot(mpg~cyl, data =mtcars) gap.boxplot(mpg~cyl, data =mtcars) But the following code produces the same figures? boxplot(mtcars$mpg) gap.boxplot(mtcars$mpg) My…
David
  • 11
  • 4
1
vote
1 answer

add mean value on boxplot with ggpubr

I'm trying to add a label on boxplot using ggpubr package. Here's the code I used: library(ggplot2) library(ggpubr) compare_means(len ~ supp, data = ToothGrowth, method="t.test", paired=TRUE, group.by = "dose") # Box plot facetted by "dose" p1 <-…
mercury
  • 13
  • 1
  • 4