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

Skip to content

Commit 402f41f

Browse files
authored
Merge pull request #27771 from timhoffm/plot_types_plot
Add marker-only and line+marker visuals to the plot() plot types
2 parents 641e3de + 2a59cb2 commit 402f41f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

galleries/plot_types/basic/plot.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,16 @@
1313

1414
# make data
1515
x = np.linspace(0, 10, 100)
16-
y = 4 + 2 * np.sin(2 * x)
16+
y = 4 + 1 * np.sin(2 * x)
17+
x2 = np.linspace(0, 10, 25)
18+
y2 = 4 + 1 * np.sin(2 * x2)
1719

1820
# plot
1921
fig, ax = plt.subplots()
2022

23+
ax.plot(x2, y2 + 2.5, 'x', markeredgewidth=2)
2124
ax.plot(x, y, linewidth=2.0)
25+
ax.plot(x2, y2 - 2.5, 'o-', linewidth=2)
2226

2327
ax.set(xlim=(0, 8), xticks=np.arange(1, 8),
2428
ylim=(0, 8), yticks=np.arange(1, 8))

0 commit comments

Comments
 (0)