How can I interpolate medians in a box plot?

Good morning. I have a number of box plots (generated using boxplot) and I would like to draw a line on the plot that connects the median values. Given the plot shown in the image, I would like to connect the red horizontal lines of the box plots in order to show the diminishing trend of the median values.
interpolazione_box_plot.png
Is that possible? How can I do it?

Answers (1)

Rik
Rik on 29 Apr 2019
You can probably extract the median value from the object boxplot creates, but you can also use the median function to find the median values of your groups.
Then you can overlay your plots by first using hold on, and then using plot to insert your plotted line.

Categories

Find more on Interpolation in Help Center and File Exchange

Products

Release

R2019a

Asked:

on 26 Mar 2019

Answered:

Rik
on 29 Apr 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!