Created
December 5, 2014 21:58
-
-
Save fabiocerqueira/654b1c6a52d47647fc92 to your computer and use it in GitHub Desktop.
Examplo de plot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Demo of the fill function with a few features. | |
| In addition to the basic fill plot, this demo shows a few optional features: | |
| * Multiple curves with a single command. | |
| * Setting the fill color. | |
| * Setting the opacity (alpha value). | |
| """ | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| x = np.linspace(0, 2 * np.pi, 100) | |
| y1 = np.sin(x) | |
| y2 = np.sin(3 * x) | |
| plt.fill(x, y1, 'b', x, y2, 'r', alpha=0.3) | |
| fig = plt.gcf() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment