From c5a5ff637b3a8f4825bf620c13fa4d7b5479fe28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 2 Dec 2019 15:27:39 +0100 Subject: [PATCH 1/2] legend ignores artists with empty and _ labels --- tutorials/intermediate/legend_guide.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tutorials/intermediate/legend_guide.py b/tutorials/intermediate/legend_guide.py index acf0d2290e40..0adc77dbadaa 100644 --- a/tutorials/intermediate/legend_guide.py +++ b/tutorials/intermediate/legend_guide.py @@ -44,7 +44,10 @@ a list of handles/artists which exist on the Axes which can be used to generate entries for the resulting legend - it is worth noting however that not all artists can be added to a legend, at which point a "proxy" will have -to be created (see :ref:`proxy_legend_handles` for further details). +to be created (see :ref:`proxy_legend_handles` for further details). + +Those artists with an empty string as label or with a label starting with +"_" will be ignored. For full control of what is being added to the legend, it is common to pass the appropriate handles directly to :func:`legend`:: From aa51e2db03f4b412629568ae1cc088fbf0342ddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 2 Dec 2019 15:51:36 +0100 Subject: [PATCH 2/2] remove trailing whitespace --- tutorials/intermediate/legend_guide.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/intermediate/legend_guide.py b/tutorials/intermediate/legend_guide.py index 0adc77dbadaa..ec1861cfe6cf 100644 --- a/tutorials/intermediate/legend_guide.py +++ b/tutorials/intermediate/legend_guide.py @@ -44,7 +44,7 @@ a list of handles/artists which exist on the Axes which can be used to generate entries for the resulting legend - it is worth noting however that not all artists can be added to a legend, at which point a "proxy" will have -to be created (see :ref:`proxy_legend_handles` for further details). +to be created (see :ref:`proxy_legend_handles` for further details). Those artists with an empty string as label or with a label starting with "_" will be ignored.