By default, the median line of a matplotlib boxplot is red. How can I make it invisible, or how can I get rid of it?
Asked
Active
Viewed 1.2k times
1 Answers
8
This example uses a custom setting of medianprops
: http://matplotlib.org/examples/statistics/boxplot_demo.html. Try using linewidth=0
or linestyle=None
.
How to set the linestyle is described here: http://matplotlib.org/api/lines_api.html#matplotlib.lines.Line2D.set_linestyle
This thread treats a similar topic: pandas - boxplot median color settings issues

Community
- 1
- 1

Michael Westwort
- 914
- 12
- 24
-
The pandas answer is a great resource for removing or enlarging the median line. Good answer. – danelliottster Jan 30 '18 at 22:41