From 304492e1f7d57be4777db62b859bc0f3616f03fd Mon Sep 17 00:00:00 2001 From: Anthony Miyaguchi Date: Thu, 4 Feb 2021 16:41:12 -0800 Subject: [PATCH] Update dot-plots with mislabeled data The dot plot documentation swapped the labels for men's and women's salaries in the dataset. This reflects the earning disparity in the second plot --- doc/python/dot-plots.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/python/dot-plots.md b/doc/python/dot-plots.md index 5f07980902..576f82dd39 100644 --- a/doc/python/dot-plots.md +++ b/doc/python/dot-plots.md @@ -50,8 +50,8 @@ schools = ["Brown", "NYU", "Notre Dame", "Cornell", "Tufts", "Yale", "Princeton", "U.Penn", "Stanford", "MIT", "Harvard"] n_schools = len(schools) -men_salary = [72, 67, 73, 80, 76, 79, 84, 78, 86, 93, 94, 90, 92, 96, 94, 112] -women_salary = [92, 94, 100, 107, 112, 114, 114, 118, 119, 124, 131, 137, 141, 151, 152, 165] +women_salary = [72, 67, 73, 80, 76, 79, 84, 78, 86, 93, 94, 90, 92, 96, 94, 112] +men_salary = [92, 94, 100, 107, 112, 114, 114, 118, 119, 124, 131, 137, 141, 151, 152, 165] df = pd.DataFrame(dict(school=schools*2, salary=men_salary + women_salary, gender=["Men"]*n_schools + ["Women"]*n_schools)) @@ -158,4 +158,4 @@ fig.show() ### Reference -See https://plotly.com/python/reference/scatter/ for more information and chart attribute options! \ No newline at end of file +See https://plotly.com/python/reference/scatter/ for more information and chart attribute options!