Skip to content

Commit 8caa7a9

Browse files
authored
Update dot-plots with mislabeled data (#3063)
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
1 parent 9377627 commit 8caa7a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: doc/python/dot-plots.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ schools = ["Brown", "NYU", "Notre Dame", "Cornell", "Tufts", "Yale",
5050
"Princeton", "U.Penn", "Stanford", "MIT", "Harvard"]
5151
n_schools = len(schools)
5252

53-
men_salary = [72, 67, 73, 80, 76, 79, 84, 78, 86, 93, 94, 90, 92, 96, 94, 112]
54-
women_salary = [92, 94, 100, 107, 112, 114, 114, 118, 119, 124, 131, 137, 141, 151, 152, 165]
53+
women_salary = [72, 67, 73, 80, 76, 79, 84, 78, 86, 93, 94, 90, 92, 96, 94, 112]
54+
men_salary = [92, 94, 100, 107, 112, 114, 114, 118, 119, 124, 131, 137, 141, 151, 152, 165]
5555

5656
df = pd.DataFrame(dict(school=schools*2, salary=men_salary + women_salary,
5757
gender=["Men"]*n_schools + ["Women"]*n_schools))
@@ -158,4 +158,4 @@ fig.show()
158158

159159
### Reference
160160

161-
See https://plotly.com/python/reference/scatter/ for more information and chart attribute options!
161+
See https://plotly.com/python/reference/scatter/ for more information and chart attribute options!

0 commit comments

Comments
 (0)