Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [boxplot]

A {boxplot} is used as a descriptive statistic. Both {pgfplots} and {pstricks} offers this as a graphing tool.

Filter by
Sorted by
Tagged with
0 votes
1 answer
18 views

Using \boxplot calculated whisker values to sort outliers

I'm working on getting the \boxplot command from the 'statistics' package to calcualte the lower and upper whisker values of a data set read from a sinlge colum .txt file then use those whisker values ...
grandpapocketcandy's user avatar
1 vote
1 answer
41 views

Box plot graph - New line for long xticklabels

I want to make my "xticklabels" have a new line between them so that they are in two lines and not as cramped. The double backslash \\ and \n did not work. Code: \documentclass{standalone} \...
Erik's user avatar
  • 13
1 vote
1 answer
41 views

boxplot scaling

\documentclass{article} \usepackage{graphicx} % Required for inserting images \usepackage{subcaption} \usepackage{pgfplots} \pgfplotsset{compat=1.8} \usepgfplotslibrary{statistics} \begin{document} \...
O Y Jo's user avatar
  • 25
1 vote
1 answer
60 views

Y-axis square root scaling

I am trying to create a boxplot of my data in pgfplots with square-root scaling of Y axis, due to the nature of data. This is my code: \documentclass{article} \usepackage{pgfplots} \usetikzlibrary{...
Martin Benes's user avatar
0 votes
2 answers
27 views

No error message but also no output. pdfplotset boxplot diagram

Credit where credit is due: I found this wonderful boxplot, im trying to fit my dataset into it and i am failing miserably. My main Problem is, that Miktex is not giving out any error message that i ...
schaewol's user avatar
1 vote
1 answer
105 views

Issues with legend mark colour not the same as the boxplot

I am not able to get the legend colour to be the same as the colour of the lines of boxplot. Here is my code: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \...
Ginko-Mitten's user avatar
1 vote
1 answer
93 views

Import values from csv for prepared boxplot?

I have referred to the question posted here: Read boxplot prepared values from a table. However, it doesn't work very well with external .csv files. I have the following Table.csv content: Product,Min,...
Ginko-Mitten's user avatar
1 vote
1 answer
121 views

How to fill boxes of the pgfplots box plots with predefined colors?

How can I fill each pgfplots box with different predefined colors? The code below from https://www.latex4technics.com/?note=7WU2A1. \documentclass{minimal} \usepackage{pgfplots} \...
Ugurcan's user avatar
  • 155
1 vote
1 answer
147 views

Remove unwanted entries from Legend in pgfplot

I am trying to combine a box-plot with the actual points to show distribution. Furthermore, the marks used for the points depend on whether the treatment it represents was positive (marked x) or ...
Ginko-Mitten's user avatar
0 votes
1 answer
287 views

Spread the dots in boxplot in pgfplots

Since I couldn't find any instructions to make a violin plot in the pgfplot manual, I am making a box-plot and adding the corresponding points on the plot. This tends to be more transparent with the ...
Ginko-Mitten's user avatar
1 vote
1 answer
95 views

What is default behavior for boxplot outliers, and how to include them?

I was going to ask how to include outliers in my boxplot. Here is a simple working example: \documentclass[11pt]{amsart} \usepackage{tikz} \usepackage{pgfplots} \usepgfplotslibrary{statistics} \begin{...
J.D.'s user avatar
  • 27
1 vote
1 answer
105 views

tikzpicture boxplot, bare minimum example, paragraph ended error

I'm looking to add boxplots to my document. I know there are already working examples out there, including on this site, but I was curious if I could get the bare minimum simplest example to run. The ...
J.D.'s user avatar
  • 27
2 votes
1 answer
122 views

PGF boxplot prepared including outliers from file

This question is basically a continuation of this answer. How can I handle outlier data in PGF boxplots, supposed my input table looks like this: \pgfplotstableread{ index lw lq med uq uw out1 ...
jayanywhere's user avatar
0 votes
1 answer
69 views

How can I have 11 ticks (groups) where each tick is an overlap (no distance) of 3 different boxes?

\documentclass[a4paper]{standalone} \usepackage{pgfplots} \usepgfplotslibrary{statistics} \pgfplotsset{compat=1.8} \begin{document} \begin{tikzpicture} \begin{axis}[ boxplot/draw direction=y, ...
S Mohamed's user avatar
2 votes
0 answers
237 views

How to draw multiple boxplot from one csv

I have 3 CSV files (teapot.csv, cube.csv, and sphere.csv) They all look like that : duration,x,y,z,norm 13506,0.763489,0.21941,0.571625,0.978678365 25162,1.466019,-0.222542,1.588425,2.172977365 9083,1....
jarbinks's user avatar
2 votes
1 answer
614 views

How to add upper/lower fence + outliers to a box plot?

I'm trying to create a box & whiskers plot that includes the upper & lower fence, and the outliers. My current plot looks like this (minus all the labeling): \documentclass [12pt, letterpaper]...
Le-Kat's user avatar
  • 21
0 votes
1 answer
564 views

Change boxplot size

As you can see in the image, the height of the boxplot in y-direction is unreasonably huge. How can I adjust that? Settings: \documentclass[final, english, ngerman, a4paper, 12pt, numbers=noenddot, cd=...
mado_xx's user avatar
1 vote
2 answers
191 views

Overlapping mark plot and box plot

I am not very familiar with box plots in pgfplots. But now I have to do some. The first turned out pretty well with 3 boxes and their corresponding data. I wanted to reuse this code for another box ...
Roland's user avatar
  • 6,685
2 votes
1 answer
119 views

Improve the visuals in the graph

After looking at some plots on OriginLab which combine boxplots with the distribution curve and the raw data, I wanted to do something similar in PGFPlots. I found some interesting work already here. ...
crypto's user avatar
  • 757
1 vote
1 answer
566 views

How to hatch Boxplot in TikZ

Can you please tell me how to add hatching to a Boxplot in TikZ? Thanks in advance. \documentclass{article} \usepackage{amsmath,amssymb,amsfonts} \usepackage{tikz} \usetikzlibrary{patterns} \...
Bilal's user avatar
  • 201
0 votes
1 answer
125 views

How can you change the x-coords of a prepared boxplot in pgfplots?

I want to visualize data with pgfplot boxplots. I am using prepared boxplots. The only problem that i have is that i don't know how to customize the x-axis values of the boxplot correctly. The x-axis ...
mab0189's user avatar
  • 185
1 vote
1 answer
42 views

Ommiting a row when boxplotting

I have a file that looks like this: 1 0.237340 0.135170 0.339511 0.237653 0.135482 0.339823 2 0.561320 0.422007 0.700633 0.165871 0.026558 0....
MDescamps's user avatar
  • 125
0 votes
0 answers
35 views

pgfplots: add margin 'whisker' to barchart [duplicate]

I have the following bar-chart with 5 sets of 2 bars. For some of the individual bars, there is a margin in the (upper) value. I would like to express this similar to a boxplot, with a 'whisker' on ...
plaene's user avatar
  • 1
2 votes
1 answer
316 views

TikZ PGFPlots Boxplots - Two labels (agree & disagree) on x axis

I want to visualise the results of a questionnaire using Boxplots. I am using TikZ with PGFPlots. I would like to label the left of the x axis with "Strongly disagree" and the right with &...
Haflad's user avatar
  • 33
3 votes
1 answer
70 views

Outlier value missing

I have this code \documentclass{article} \usepackage{tikz} \usepackage{tikz-3dplot} \usepackage{pgfplots} \usepgfplotslibrary{statistics} \pgfplotsset{compat=1.10} \usepackage{caption} \begin{...
Pablo Souto's user avatar
0 votes
1 answer
46 views

Boxplot slightly moving depentend on upper whisker

I created a few boxplots which should align with each other. I noticed that one of the boxplots, the second one, is slightly moving to the left if the upper whisker is "5". This doesn't ...
uwjhn's user avatar
  • 35
0 votes
1 answer
139 views

Outliers' colours do not match their corresponding Boxplot colour

can you give me some help here? I'm using custom colours for each axis of my boxplot, but their outliers do not match that color. This is what I have so far \documentclass{article} \usepackage[utf8]{...
Humberto's user avatar
  • 157
0 votes
1 answer
309 views

Legend on top of Diagram left aligned with x axes

I have a set of Boxplot diagrams generated using Python3 (tikzplotlib). I would like to add legends now that are left aligned with the x-Axis and positioned on top of the diagrams. Currently I solve ...
baxbear's user avatar
  • 167
1 vote
1 answer
195 views

PGFplots Boxplot, using values of median, quartile... outside axis environment

I try to make some boxplots to some given data and use the calculated values (pgfplots did) of the median, quartiles, average,... outside the axis environment. My MWE: \documentclass[utf8,fleqn]{...
user125198's user avatar
1 vote
1 answer
951 views

Add legend to tikz boxplot

I have major problems adding a proper legend to my tikz boxplot graph. Either the legend did not show at all or scrambled the whole boxplot layout. I would be happy with a basic legend inside or ...
Moka's user avatar
  • 67
2 votes
1 answer
467 views

Add the raw data and distribution curve to a boxplot in Latex (TikZpictures)

I have a set of data and I would like to highlight the difference between two different groups. For this I want to build a graph similar to the one presented below. My question would be how to plot ...
Alexandre Loures's user avatar
3 votes
1 answer
413 views

X-Axis break for boxplot with groupplot

I'm currently stumped in how to proceed to get an x-axis break for my boxplot. From going through slightly related tex.stackexchange posts, I'm guessing this should be achievable with groupplot, but ...
ThS's user avatar
  • 33
2 votes
1 answer
413 views

Multiple boxplots grouped by key

I have some data in a CSV file that I want to use to create multiple boxplots. Every sample has an identifier "set" that denotes the membership to a certain set and I want to have one boxplot per set. ...
ma0ho's user avatar
  • 175
1 vote
1 answer
178 views

How to add bars on upper and lower X-Axis in Tikz BoxPlot

I need to show green bars on the x-axis of a tikz boxplot as shown in the following figure. (The green bars indicate whether the corresponding question to this value is positive when the value is high ...
Liton's user avatar
  • 113
0 votes
0 answers
76 views

Boxplot add circles/stars

Any advice on how to add circles or stars (*) to the plot? \pgfplotsset{width=7cm,compat=1.16}\usepgfplotslibrary{statistics} \begin{tikzpicture} \begin{axis}[ boxplot/draw direction=y, x axis line ...
rapiz's user avatar
  • 1
4 votes
1 answer
1k views

Dot and whisker plot in PGFplots

Sometimes it is useful to present the coefficients of a regression with accompanying confidence intervals as a dot-and-whisker plot. See here for a motivation of this approach and some examples of ...
Sav-econ's user avatar
  • 335
1 vote
0 answers
640 views

boxplot in gnuplot [closed]

I don't understand why some point are not taken by boxplot \documentclass[10pt]{beamer} \usetheme{Warsaw} \usepackage[utf8]{inputenc} \usepackage[french]{babel} \usepackage[T1]{fontenc} \usepackage{...
michael briffoteaux's user avatar
3 votes
1 answer
162 views

Bug when creating boxplot groups

I need to create a boxplot chart where the boxes are grouped. Based on the answer to this question . Create a graph which contains 4 groups where each group is composed of 4 boxes. \documentclass{...
Miguel Rodriguez's user avatar
1 vote
0 answers
99 views

pgfplots boxplot without outliers, but with extrema [duplicate]

In response to this question asking about how pgfplots boxplots can be produced without outliers, this answer suggested a fix that does not seem to work anymore. (I am not the first to notice this as ...
user1362373's user avatar
  • 2,869
2 votes
1 answer
652 views

How can I specify the coordinates in a boxplot as black dots? [duplicate]

How can I specify the coordinates (here outliers) as black dots? The color in the square brackets is already defined as black, if I insert "mark=*" in the square brackets the boxplots disappear. \...
user192811's user avatar
2 votes
1 answer
249 views

Fiddling with Box plot using statistics library

For anyone who is experienced with the statistics package please give me some tips on how to achieve the following: 1. shaded in the box with gray!30 2. move the whole boxplot up by 0.25 unit so it is ...
Will Kim's user avatar
  • 2,062
2 votes
1 answer
1k views

pgfplots: How to draw boxplot pairs separated in two y axis?

The user Korijn has posted a nice approach on how to create pairs of boxplots which are belonging to each other. Minimum Working Example (MWE): \documentclass[border=2mm]{standalone} \usepackage{...
Dave's user avatar
  • 3,778
1 vote
0 answers
451 views

Combine fill and pattern in a pgfplot boxplot?

Is it possible to combine a pattern with a background color in Pgfplot boxplot? \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.8} \usepgfplotslibrary{statistics} \usetikzlibrary{...
nikosavv's user avatar
1 vote
1 answer
723 views

Pgfplots box plot: change outlier style

I am trying to plot several box plots (data read from file), and I want them to look the same. I managed to do that for everything but the outliers, that still use the default style/colormap (see the ...
Bibi's user avatar
  • 1,542
1 vote
1 answer
534 views

Combine boxplot and histogram in one diagram (PGF/TikZ)

For my bachelor thesis I did a questionnaire, now I want to evaluate and visualise it in a diagram, combining multiple values. Most of the answers from this survey are in a scale of 1-5 or 1-6. I want ...
arthur_nie's user avatar
2 votes
1 answer
724 views

pgfplots - box plot with colored outliers

I am trying to restyle a pgfplots box plot in a matter suggested by Daniel Carr. filled boxes instead of outlined thickened whiskers with no fences all elements (boxes, whiskers, and outliers) ...
Matthew Leingang's user avatar
2 votes
1 answer
2k views

How to modify a boxplot!? (mean, outliers, values: median, ...)

I have some issues with my boxplot and I hope someone can help me to fix them. Here my MWE: \documentclass[a4paper]{scrbook} \usepackage[utf8]{inputenc} \usepackage{textcomp} ...
TRJW's user avatar
  • 450
5 votes
2 answers
797 views

How to sketch a simple horizontal box plot

I am trying to plot a box plot in latex. Below is what I want (only horizontal axis; ticks or axis arrows are options but I do not want axes borders or any vertical axis element). The code below is ...
Will Kim's user avatar
  • 2,062
0 votes
1 answer
866 views

Include average in boxplot

I would like to include an average into my boxplots. The boxplots are made using https://tex.stackexchange.com/a/183856/164280 as an example. I have seen in How to show the mean or average value on a ...
Hans's user avatar
  • 491
1 vote
1 answer
318 views

boxplot prepared from table, accessed using row names instead of numbers

I have csv files1 that I want to plot as boxplots. I found the solution to that part of the problem here (courtesy of Jake), and that constitutes a large part of my MWE. The difference here is that I ...
Zac-K's user avatar
  • 307