Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b2c2372

Browse filesBrowse files
committed
DOC: Add stackplot to plot types listing and added blues to grid style guide using Blues cmap
1 parent f25c2d0 commit b2c2372
Copy full SHA for b2c2372

File tree

Expand file treeCollapse file tree

3 files changed

+30
-2
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+30
-2
lines changed

‎lib/matplotlib/mpl-data/stylelib/_mpl-gallery-nogrid.mplstyle

Copy file name to clipboardExpand all lines: lib/matplotlib/mpl-data/stylelib/_mpl-gallery-nogrid.mplstyle
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ ytick.major.size: 0.0
1616

1717
# colors:
1818
image.cmap : Blues
19-
# axes.prop_cycle: cycler('color', ['FF7F0E', '1F77B4', '2CA02C'])
19+
axes.prop_cycle: cycler('color', ['c6dbef', '6aaed6', '2070b4', '08306b'])

‎lib/matplotlib/mpl-data/stylelib/_mpl-gallery.mplstyle

Copy file name to clipboardExpand all lines: lib/matplotlib/mpl-data/stylelib/_mpl-gallery.mplstyle
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ ytick.major.size: 0.0
1616

1717
# colors:
1818
image.cmap : Blues
19-
# axes.prop_cycle: cycler('color', ['FF7F0E', '1F77B4', '2CA02C'])
19+
axes.prop_cycle: cycler('color', ['c6dbef', '6aaed6', '2070b4', '08306b'])

‎plot_types/basic/stackplot.py

Copy file name to clipboard
+28Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
"""
2+
===============================
3+
stackplot(x, y)
4+
===============================
5+
See `~matplotlib.axes.Axes.stackplot`
6+
"""
7+
import matplotlib.pyplot as plt
8+
import numpy as np
9+
10+
plt.style.use('_mpl-gallery')
11+
12+
# make data
13+
x = np.arange(0, 10, 2)
14+
ay = [1, 1.25, 2, 2.75, 3]
15+
by = [1, 1, 1, 1, 1]
16+
cy = [2, 1, 2, 1, 2]
17+
y = np.vstack([ay, by, cy])
18+
labels = ['a', 'b', 'c']
19+
# plot
20+
fig, ax = plt.subplots()
21+
22+
ax.stackplot(x, y, labels=labels)
23+
ax.legend(loc=2)
24+
25+
ax.set(xlim=(0, 8), xticks=np.arange(1, 8),
26+
ylim=(0, 8), yticks=np.arange(1, 8))
27+
28+
plt.show()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.