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 f032c51

Browse filesBrowse files
authored
Merge pull request #8154 from patniharshit/lineBarMarkerMerge
merge fill_demo and fill_demo_features
2 parents 9a7d9db + b4c8140 commit f032c51
Copy full SHA for f032c51

File tree

Expand file treeCollapse file tree

2 files changed

+17
-25
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+17
-25
lines changed
+17-4Lines changed: 17 additions & 4 deletions
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

Copy file name to clipboardExpand all lines: examples/lines_bars_and_markers/fill_demo_features.py
-21Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

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