From ab4b878b12e1599febfeb18348812e1c3eea715b Mon Sep 17 00:00:00 2001 From: navdeep rana Date: Tue, 17 Oct 2017 18:56:16 +0530 Subject: [PATCH 1/3] Documented the incompatibility of shrink and cax kwargs in colorbar. --- lib/matplotlib/colorbar.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/matplotlib/colorbar.py b/lib/matplotlib/colorbar.py index 0fb4e3b47c17..68346f7ca416 100644 --- a/lib/matplotlib/colorbar.py +++ b/lib/matplotlib/colorbar.py @@ -180,6 +180,9 @@ to which the colorbar is attached; but it is a manual method requiring some trial and error. If the colorbar is too tall (or a horizontal colorbar is too wide) use a smaller value of *shrink*. +Further *shrink* and *cax* kwargs are incompatible with each other and shrink +applies only if the colorbar makes its own Axes by sharing space from the Axes +in which the mappable resides. For more precise control, you can manually specify the positions of the axes objects in which the mappable and the colorbar are drawn. In From 1dc1d8dee5a30c57c0a8b1255b4da05ea5faa77d Mon Sep 17 00:00:00 2001 From: navdeep rana Date: Tue, 17 Oct 2017 19:13:26 +0530 Subject: [PATCH 2/3] Documented the incompatibility of shrink and cax kwargs in colorbar. --- lib/matplotlib/colorbar.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/matplotlib/colorbar.py b/lib/matplotlib/colorbar.py index 68346f7ca416..9db544c3d848 100644 --- a/lib/matplotlib/colorbar.py +++ b/lib/matplotlib/colorbar.py @@ -180,9 +180,9 @@ to which the colorbar is attached; but it is a manual method requiring some trial and error. If the colorbar is too tall (or a horizontal colorbar is too wide) use a smaller value of *shrink*. -Further *shrink* and *cax* kwargs are incompatible with each other and shrink -applies only if the colorbar makes its own Axes by sharing space from the Axes -in which the mappable resides. +Further, *shrink* and *cax* kwargs are incompatible with each other and +*shrink* applies only if the colorbar makes its own Axes by sharing space +with the Axes in which it resides. For more precise control, you can manually specify the positions of the axes objects in which the mappable and the colorbar are drawn. In From 1269f623bca3951ee96d7e98e56c5763c99a6093 Mon Sep 17 00:00:00 2001 From: navdeep rana Date: Wed, 18 Oct 2017 10:19:38 +0530 Subject: [PATCH 3/3] Added incompatibility of kwargs *shrink* and *aspect* with *cax* to the documentation. --- lib/matplotlib/colorbar.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/matplotlib/colorbar.py b/lib/matplotlib/colorbar.py index 9db544c3d848..e83f6a4410c5 100644 --- a/lib/matplotlib/colorbar.py +++ b/lib/matplotlib/colorbar.py @@ -175,14 +175,9 @@ If *mappable* is a :class:`~matplotlib.contours.ContourSet`, its *extend* kwarg is included automatically. -Note that the *shrink* kwarg provides a simple way to keep a vertical -colorbar, for example, from being taller than the axes of the mappable -to which the colorbar is attached; but it is a manual method requiring -some trial and error. If the colorbar is too tall (or a horizontal -colorbar is too wide) use a smaller value of *shrink*. -Further, *shrink* and *cax* kwargs are incompatible with each other and -*shrink* applies only if the colorbar makes its own Axes by sharing space -with the Axes in which it resides. +The *shrink* kwarg provides a simple way to scale the colorbar with respect +to the axes. Note that if *cax* is specified it determines the size of the +colorbar and *shrink* and *aspect* kwargs are ignored. For more precise control, you can manually specify the positions of the axes objects in which the mappable and the colorbar are drawn. In