Skip to content

Commit 2d7700e

Browse files
authored
Merge pull request #8154 from patniharshit/lineBarMarkerMerge
merge fill_demo and fill_demo_features
2 parents 10b43cb + 78cd8c1 commit 2d7700e

File tree

2 files changed

+17
-25
lines changed

2 files changed

+17
-25
lines changed
+17-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
"""
2-
==================
3-
A simple Fill plot
4-
==================
2+
==============
3+
Fill plot demo
4+
==============
55
6-
This example showcases the most basic fill plot a user can do with matplotlib.
6+
First example showcases the most basic fill plot a user can do with matplotlib.
7+
8+
Second example shows a few optional features:
9+
10+
* Multiple curves with a single command.
11+
* Setting the fill color.
12+
* Setting the opacity (alpha value).
713
"""
814
import numpy as np
915
import matplotlib.pyplot as plt
@@ -15,4 +21,11 @@
1521

1622
ax.fill(x, y, zorder=10)
1723
ax.grid(True, zorder=5)
24+
25+
x = np.linspace(0, 2 * np.pi, 500)
26+
y1 = np.sin(x)
27+
y2 = np.sin(3 * x)
28+
29+
fig, ax = plt.subplots()
30+
ax.fill(x, y1, 'b', x, y2, 'r', alpha=0.3)
1831
plt.show()

examples/lines_bars_and_markers/fill_demo_features.py

-21
This file was deleted.

0 commit comments

Comments
 (0)