10BC0 Cleanup and move fill_demo2 · matplotlib/matplotlib@b10a877 · GitHub
[go: up one dir, main page]

Skip to content

Commit b10a877

Browse files
committed
Cleanup and move fill_demo2
Rename fill_demo2 to fill_demo_features to clarify purpose
1 parent 7f1887b commit b10a877

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"""
2+
Demo of the fill function with a few features.
3+
4+
In addition to the basic fill plot, this demo shows a few optional features:
5+
6+
* Multiple curves with a single command.
7+
* Setting the fill color.
8+
* Setting the opacity (alpha value).
9+
"""
10+
import numpy as np
11+
import matplotlib.pyplot as plt
12+
13+
x = np.linspace(0, 2 * np.pi, 100)
14+
y1 = np.sin(x)
15+
y2 = np.sin(3 * x)
16+
plt.fill(x, y1, 'b', x, y2, 'r', alpha=0.3)
17+
plt.show()

examples/pylab_examples/fill_demo2.py

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)
0