# Questions tagged [boxplot]

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

**0**

votes

**0**answers

36 views

### Assigning specific colors to and ordered factor in ggplot

I'm trying to assign specific colors to my boxplot/jitter plot but the scale_fill_manual and scale_colour_manual functions don't seem to be working.
When I execute this code, all points on the graph ...

**0**

votes

**0**answers

13 views

### How can I get the density graphs in a beanplot (violinplot) to be consistent with eachother?

I am using the beanplot package to make a row of 16 beanplots. I am using it in a slightly unusual way, in that I do not have 2 subgroups per data, rather I am just looking at 6 data groups in a ...

**3**

votes

**1**answer

38 views

### Xtick frequency in pandas boxplot

I am using pandas groupby for plotting wind speed Vs direction using a bar and whisker plot. However the xaxis is not readable due to so many wind direction value close to each other.
I have tried ...

**0**

votes

**1**answer

18 views

### How to swap the x-labels in a boxplot?

I have graph with several boxplot with questions identifiers on the x-axis (e.g A1, A2, A3). I like to replace the identifiers with custom text.
This doesn't do anything
plt.xticks([1, 2, 3, 4, 5, 6,...

**0**

votes

**0**answers

23 views

### How can the height of seaborn boxplots be changed?

Is there a way to change the height in seaborn's boxes in the boxplot in a way to use a custom function instead of the quartiles (SEM, SD...)? Either by a function directly or by a separate column in ...

**1**

vote

**0**answers

10 views

### Different Box Plot Series Traces Within Plotly Subplots

I am trying to create a series of sub plots each containing box plots using Plotly. At the moment I have managed to create the following plot;
.
Unfortunately, this is not exactly what I want. I ...

**1**

vote

**2**answers

20 views

### Plotting more than one box in ggplot boxplot?

Apologies for not using the correct "lingo", I don't know what it's called:
I have a table made up of data that represents participants' numeric responses to questions. The data table looks like the ...

**1**

vote

**1**answer

32 views

### How to add significance bar between subgroups of box plot

I would like to make a wilcox test and add a significance bar for each group in the boxplot (not between groups). I.e. comparing subgroups ("0", "1") at time 2, 6, and 14.
This is what I have so far:
...

**0**

votes

**1**answer

31 views

### Make a boxplot in highchart with a date object in the x axis

I am trying to make a boxplot in highchart to include it in a shiny app, along with another graph I already have.
The problem is that boxplot, as far as I can tell, do not behave like other plots and ...

**1**

vote

**1**answer

22 views

### Python: How to print the box, whiskers and outlier values in box and whisker plots?

I have plotted a box and whiskers plot for my data
My Code:
red_diamond = dict(markerfacecolor='r', marker='D')
fig3, ax3 = plt.subplots()
ax3.set_title('Changed Outlier Symbols')
ax3.boxplot(...

**0**

votes

**0**answers

27 views

### Why does this syntax not work for boxplot? [closed]

I cannot get boxplot to work properly. It was working and I changed a few things earlier in my code, but not the boxplot, but now it doesn't seem to return what I expect.
I have data on number of ...

**0**

votes

**1**answer

28 views

### create boxplot with year bars from continuous date data with fill

I am trying to make a boxplot with two different fills with continuous date data over years (but just one bar per year). my data looks quite simple:
date, number, type
2007-06-07 2 tot
...

**0**

votes

**2**answers

29 views

### Facet/separate boxplots in R when formula is used and outliers are not drawn? (ggplot2 or r basics)

I have a data frame like that called samples_type:
Status variable value
PAT SPP1 1,994629e+00
PAT SPP1 1,179033e+00
PAT SPP1 2,901539e+00
PAT ...

**3**

votes

**0**answers

54 views

### How to show outliers and mean-line separate from boxplot in ggplot legend?

I am creating a plot with multiple pairs of boxes, I also have a pair mean lines going through the plot, and many outliers shown. The legend currently shows the two boxes, however I would like it to ...

**1**

vote

**1**answer

32 views

### How to draw box plot of columns of a table using dc.js

I have a table as follows:
The number of experiments are arbitrary but the column name's prefix is "client_" following by the client number.
I want to draw a box plot of values against the "client_#"...

**0**

votes

**0**answers

25 views

### How to use the BreakPlot function to avoid unnecessary blank space with boxplot?

I find this amazing tool which Produces a plot who's y-axis skips to avoid unnecessary blank space https://www.mathworks.com/matlabcentral/fileexchange/21864-breakplot. I want to use breakPlot ...

**0**

votes

**0**answers

24 views

### Create grouped boxplot with R boxplot()

I have four data frames each representing different tissues. Their structure is the following:
As column(name)s I have a set of different genes and as row(name)s different samples, each value is the ...

**1**

vote

**1**answer

44 views

### How to adjust the distance between the facet_grid frame and boxplots using ggplot_build & ggplot_gtable

We are presenting outcome data using boxplots and group these for different approaches using facet_grid with ggplot2 and geom_boxplot.
We would like to add more space between the boxplots and the ...

**1**

vote

**1**answer

24 views

### How to increase the distance between boxplots (ggplot2) which have discrete x-axis - position_dodge?

I am trying to change the distance between boxplots in a ggplot2 figure. I have boxplots which show the data for different categories of products.
The categories (x-axis) are discrete variables.
I ...

**0**

votes

**0**answers

30 views

### How to show two figures for every x in matplotlib boxplot?

I'm trying to show two figures for every x in my boxplot next to each other. But my code keeps the figures on top of each other. I cannot figure out how to fix this because I'm using three different ...

**0**

votes

**2**answers

33 views

### How can I find the upper and the lower limits of a bloxplot in R?

enter image description hereI have built a boxplot in R with certain parameteres but i don´t know the code to help me to know the upper and the lower limits of the box. If anyone could help i would ...

**1**

vote

**1**answer

26 views

### R ggplot2: How to plot a mean line for 2 groups across subgroup boxplots?

I have 13 sites that are classified into 2 groups, and I have plotted a boxplot of values for each site using ggplot2. They are identified by group based on the fill color. How can I add a mean line ...

**0**

votes

**1**answer

22 views

### Array (different dates, values), boxplots: x - dates, y - values

I'm new using R. I have such data:
Date;Value
2019-01-31;125
2019-01-31;127
2019-01-31;120
2019-01-31;116
2019-01-31;119
...
2019-02-01;222
2019-02-01;233
2019-02-01;225
2019-02-01;222
...

**0**

votes

**0**answers

19 views

### Connect two boxplots to show significance in ggplot2

I would like to connect two boxplots to show if they are significant in an external association analysis.
library(ggplot2)
ToothGrowth$dose <- as.factor(ToothGrowth$dose)
head(ToothGrowth)
ggplot(...

**0**

votes

**0**answers

18 views

### Is it possible to display a Box plot from excel using Excel web access webpart in SharePoint?

I am trying to display a box plot from my excel on SharePoint page using Excel web Access webpart. But I am receiving the below error.
"We're sorry. We can't open the workbook in the browser ...

**0**

votes

**1**answer

50 views

### How to read in numerous csv files and calculate boxplot stats for each?

I have a directory containing around 10 csv files, all huge datasets with 50M+ rows. I want to create a for loop to
read them in one by one
calculate boxplot stats using the quantile function for ...

**0**

votes

**1**answer

76 views

### visualize simulations/iterations as a confidence interval in box plot python?

I have a data with values generated based simulated iterations (for eg. 100) and am trying to visualize the variation of mean/median, first and third quartile over the 100 iterations as a shaded ...

**0**

votes

**1**answer

180 views

### ggplot2 boxplots - How to group factors levels on the x-axis (and add reference lines for each group mean)

I have 30 plant species for which I have displayed the distributions of midday leaf water potential (lwp_md) using boxplots and the package ggplot2. But how do I group these species along the x-axis ...

**0**

votes

**1**answer

69 views

### ggplot: boxplot with 95% confidence interval

I'd like to plot a boxplot with 95% confidence interval error bars. I'm getting very confused.
What are the statistical properties of the default error bars? Are those 95 intervals? (I think the ...

**0**

votes

**1**answer

57 views

### Adding a label to an abline in R

I am trying to add a label to an abline in an R Boxplot. I know I have to use the text() function but no matter what I try nothing appears on my plot!
My plot code is as follows:
# Technical ...

**-1**

votes

**0**answers

25 views

### How can I add legend based on the color and id for each boxes of the boxplot in matplotlib

I want to add a legend for each box color, which is based on unique id and color of the boxes. The colors and result_ids arrays have the same length, they match to each other uniquely.
I have to ...

**0**

votes

**0**answers

8 views

### Plot data from multiple columns grouping by the last column

I want to create boxplots with the addition of error bars for data that comes from 6 columns. The seventh column of my dataset contains a binary variable that describes the rest of the data. I do have ...

**-1**

votes

**0**answers

11 views

### Matplotlib boxplot not displaying boxes for data

I am trying to plot some data that represents time to execute a block of code in milliseconds using Python's matplotlib boxplot. However, with the data I captured, the only thing the boxplot shows is ...

**0**

votes

**1**answer

41 views

### How to create a boxplot of survey data in R?

I am using data where respondents give a score from 0-10 and I am trying to create box plot of these responses by region. However, the box plots will not form and no error message comes up either.
...

**1**

vote

**0**answers

104 views

### What is equivalent of seaborn's hue in Matplotlib?

May I ask what is the equivalent of hue in Matplotlib? I have a line of seaborn code and would need to convert it into Matplotlib format. Each box corresponds to 1 ID at that time. How do i create a ...

**0**

votes

**0**answers

20 views

### Pandas - How to Plot a Boxplot of a dataframe with Columnn Multi Index?

I have results of computations in a dataframe with multi-level indexes on both axes - snippet below:
results =
Y-M 2001-01 2001-02
A B A B
Day ...

**0**

votes

**0**answers

29 views

### Using plotly to draw boxplot for two groups

I am trying to use plotly to draw boxplots for two groups, it works fine if I do not implement with shiny app, and the figure looks like this:
But when I want to implement this figure in Shiny app, ...

**0**

votes

**0**answers

13 views

### Dynamically adjusting boxplot margins

I am using plotly to make some fully styled boxplots from my data.
My plots are based on the example giving at the very bottom:
https://plot.ly/python/box-plots/
This works fine for most of it, but ...

**0**

votes

**2**answers

52 views

### ggplot Box plots side by side

I would like side by side box plots (total and ELISA) by media type. I saw in other chats that I need to melt the data. When I do this I get the following
Error: stat_boxplot requires the following ...

**-2**

votes

**0**answers

15 views

### Sort Boxplots by Quantity of Data for each x variable

Within ggplot, how do you sort boxplots by the amount of data within each boxplot?
I am working with airline data so essentially I have more data on flights for the big carriers and fewer for ...

**1**

vote

**0**answers

17 views

### Boxplot in Matplotlib printing extra data [duplicate]

I am trying to plot a boxplot and I am using an array similar to the example below:
import numpy as np
import matplotlib.pyplot as plt
np.random.seed(19680801)
# fake up some data
vector = np....

**0**

votes

**0**answers

38 views

### Box plot of a pd.Series with list of DateTimeIndexed arrays

I am trying to make a box plot of values contained in a Series. I have seen this post but my case is a little different. My Series values is a list of N D-dimensional arrays taken on each day. What I ...

**5**

votes

**2**answers

85 views

### creating a common legend for bar plot and line

I'm very new to R so I apologise in advance if this is a very basic question.
I'm trying to plot a graph showing discharge and suspended sediment load (SSL). However, I want to make it clear that the ...

**0**

votes

**1**answer

33 views

### Boxplot only showing flat lines

I have the following matrix:
test <- matrix(c(2006,100,
2007,105,
2008,98,
2009,102,
2010,107),ncol=2,byrow=TRUE)
And I want to ...

**0**

votes

**0**answers

33 views

### R Plotly BoxPlot to Show Summary Statistics by default

How can I show the summary statistics labels by default on below plotly boxplot? I can view them on hover, but i need to show the min, q1, median, q3, max etc along with the values on each box as ...

**3**

votes

**3**answers

48 views

### Boxplot: Matlab displays different graphic in respect of R?

I plotted a simple data matrix
39 135 249 1 91 8 28 0 0 74 17 65 560
69 0 290 26 254 88 31 0 18 53 4 63 625
66 186 344 0 9 0 0 0 18 54 0 74 554
80 41 393 ...

**0**

votes

**0**answers

17 views

### making mean points in boxplot bigger and connecting them to each other

is there any way to increase and change the color of the mean points in boxplot matplotlib? I am showing the mean points by setting showmeans=True in box plot, but I can not find how to change the ...

**0**

votes

**0**answers

11 views

### Google Colab - all box plots in the same graph

I am currently using a Google Colab notebook.
I am trying to get one boxplot for each numerical variable in a dataframe. For this purpose i do :
for col in lst_num_var :
df.boxplot( column = [ ...

**0**

votes

**1**answer

39 views

### Use stat_compare_means to test whether multiple groups are significantly different from zero?

I'm using ggpubr::stat_compare_means in ggplot2 to show significance for multiple boxplots. I am trying to find a way to show whether each of my boxplots is significantly different from a certain ...

**0**

votes

**1**answer

8 views

### Creating boxplots from dataframes without merging into one

I have 4 dataframes that look the same but contain data from different months. This is what they all look like. They have a date and contain process times. The last row is an indicator, but not ...