From 45aafca827e83a5688060cadbb16334b8baed13d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Bere=C5=9B?= Date: Sun, 8 Dec 2019 23:36:14 +0000 Subject: [PATCH 1/4] 'stack' barmode also works for px.bar --- packages/python/plotly/plotly/express/_doc.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/python/plotly/plotly/express/_doc.py b/packages/python/plotly/plotly/express/_doc.py index d30c1217d47..a788f0eab06 100644 --- a/packages/python/plotly/plotly/express/_doc.py +++ b/packages/python/plotly/plotly/express/_doc.py @@ -398,9 +398,10 @@ ], barmode=[ "str (default `'relative'`)", - "One of `'group'`, `'overlay'` or `'relative'`", + "One of `'group'`, `'overlay'`, `'relative'` or `'stack'`", + "In `'stack'` mode, bars are placed on top of each other.", "In `'relative'` mode, bars are stacked above zero for positive values and below zero for negative values.", - "In `'overlay'` mode, bars are drawn on top of one another.", + "In `'overlay'` mode, bars are drawn over each other.", "In `'group'` mode, bars are placed beside each other.", ], boxmode=[ From 1fb817cfd942863d828675261d073e3d36bdcaea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Bere=C5=9B?= Date: Tue, 10 Dec 2019 18:31:42 +0100 Subject: [PATCH 2/4] Remove redundant line in the docs --- packages/python/plotly/plotly/express/_doc.py | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/python/plotly/plotly/express/_doc.py b/packages/python/plotly/plotly/express/_doc.py index a788f0eab06..7c9efa42c32 100644 --- a/packages/python/plotly/plotly/express/_doc.py +++ b/packages/python/plotly/plotly/express/_doc.py @@ -458,7 +458,6 @@ "One of `'outliers'`, `'suspectedoutliers'`, `'all'`, or `False`.", "If `'outliers'`, only the sample points lying outside the whiskers are shown.", "If `'suspectedoutliers'`, all outlier points are shown and those less than 4*Q1-3*Q3 or greater than 4*Q3-3*Q1 are highlighted with the marker's `'outliercolor'`.", - "If `'outliers'`, only the sample points lying outside the whiskers are shown.", "If `'all'`, all sample points are shown.", "If `False`, no sample points are shown and the whiskers extend to the full range of the sample.", ], From 95d17c05da89fc95c53df2d0d2f8267b761504d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Bere=C5=9B?= Date: Tue, 10 Dec 2019 18:48:25 +0100 Subject: [PATCH 3/4] Added a note on 'stack' negative values --- packages/python/plotly/plotly/express/_doc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/python/plotly/plotly/express/_doc.py b/packages/python/plotly/plotly/express/_doc.py index 7c9efa42c32..2ccf02d6592 100644 --- a/packages/python/plotly/plotly/express/_doc.py +++ b/packages/python/plotly/plotly/express/_doc.py @@ -1,7 +1,6 @@ import inspect from textwrap import TextWrapper - # TODO contents of columns # TODO explain categorical # TODO handle color @@ -164,7 +163,7 @@ colref_desc, "Values from this column or array_like are used to assign mark sizes.", ], - radius=["int (default is 30)", "Sets the radius of influence of each point.",], + radius=["int (default is 30)", "Sets the radius of influence of each point."], hover_name=[ colref_type, colref_desc, @@ -399,7 +398,8 @@ barmode=[ "str (default `'relative'`)", "One of `'group'`, `'overlay'`, `'relative'` or `'stack'`", - "In `'stack'` mode, bars are placed on top of each other.", + "In `'stack'` mode, bars are placed on top of each other." + "Positive and negative values will cancel out, drawn in order of appearance in `data_frame`.", "In `'relative'` mode, bars are stacked above zero for positive values and below zero for negative values.", "In `'overlay'` mode, bars are drawn over each other.", "In `'group'` mode, bars are placed beside each other.", From 48e94681f364411700ee050809abb220c8c02753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Bere=C5=9B?= Date: Sat, 25 Jan 2020 16:03:43 +0100 Subject: [PATCH 4/4] Update packages/python/plotly/plotly/express/_doc.py Review change Co-Authored-By: Emmanuelle Gouillart --- packages/python/plotly/plotly/express/_doc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/python/plotly/plotly/express/_doc.py b/packages/python/plotly/plotly/express/_doc.py index ffd7de79617..f3dff6d439d 100644 --- a/packages/python/plotly/plotly/express/_doc.py +++ b/packages/python/plotly/plotly/express/_doc.py @@ -420,7 +420,7 @@ "str (default `'relative'`)", "One of `'group'`, `'overlay'`, `'relative'` or `'stack'`", "In `'stack'` mode, bars are placed on top of each other." - "Positive and negative values will cancel out, drawn in order of appearance in `data_frame`.", + "Positive and negative values will cancel out, drawn in order of appearance of categories in `data_frame`.", "In `'relative'` mode, bars are stacked above zero for positive values and below zero for negative values.", "In `'overlay'` mode, bars are drawn over each other.", "In `'group'` mode, bars are placed beside each other.",