Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 04f54f3

Browse files
committed
FIX: review suggestions
1 parent 2653170 commit 04f54f3

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

plot_types/A_basic/b_scatter.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@
1010

1111
# make the data
1212
np.random.seed(3)
13-
X = 4 + np.random.normal(0, 1.25, 24)
14-
Y = 4 + np.random.normal(0, 1.25, len(X))
13+
X = 4 + np.random.normal(0, 2, 24)
14+
Y = 4 + np.random.normal(0, 2, len(X))
15+
# size and color:
16+
S = np.random.uniform(5, 55, len(X))
1517

1618
# plot
1719
fig, ax = plt.subplots()
1820

19-
ax.scatter(X, Y, 20, zorder=10,
20-
edgecolor="none", linewidth=0.25)
21+
ax.scatter(X, Y, s=S, zorder=10, c=55-S, cmap=plt.get_cmap('Blues'))
2122

2223
ax.set_xlim(0, 8)
2324
ax.set_xticks(np.arange(1, 8))

plot_types/A_basic/c_bar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# plot
1616
fig, ax = plt.subplots()
1717

18-
ax.bar(X, Y, bottom=0, width=1, edgecolor="white", linewidth=0.7)
18+
ax.bar(X, Y, width=1, edgecolor="white", linewidth=0.7)
1919

2020
ax.set_xlim(0, 8)
2121
ax.set_xticks(np.arange(1, 8))

plot_types/C_stats/a_hist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# plot:
1616
fig, ax = plt.subplots()
1717

18-
ax.hist(X, bins=8, linewidth=0.5, edgecolor="white",)
18+
ax.hist(X, bins=8, linewidth=0.5, edgecolor="white")
1919

2020
ax.set_xlim(0, 8)
2121
ax.set_xticks(np.arange(1, 8))

plot_types/C_stats/b_boxplot.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,11 @@
1616
fig, ax = plt.subplots()
1717
VP = ax.boxplot(D, positions=[2, 4, 6], widths=1.5, patch_artist=True,
1818
showmeans=False, showfliers=False,
19-
medianprops={"color": "white",
20-
"linewidth": 0.5},
21-
boxprops={"facecolor": "C0",
22-
"edgecolor": "white",
23-
"linewidth": 0.5},
24-
whiskerprops={"color": "C0",
25-
"linewidth": 1.5},
26-
capprops={"color": "C0",
27-
"linewidth": 1.5})
19+
medianprops={"color": "white", "linewidth": 0.5},
20+
boxprops={"facecolor": "C0", "edgecolor": "white",
21+
"linewidth": 0.5},
22+
whiskerprops={"color": "C0", "linewidth": 1.5},
23+
capprops={"color": "C0", "linewidth": 1.5})
2824

2925
ax.set_xlim(0, 8)
3026
ax.set_xticks(np.arange(1, 8))

0 commit comments

Comments
 (0)