Created
August 21, 2020 22:27
-
-
Save jordantwells42/f75de39ebf609e4825e8338a683eef4b to your computer and use it in GitHub Desktop.
Markdium-A Guide to Serving Up Matplotlib Visualizations Two Ways
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
| # Initializing a figure and axes object | |
| fig, ax1 = plt.subplots() | |
| # Adjusting the figure parameters | |
| fig.set_size_inches(9, 5) | |
| fig.set_dpi(100) | |
| # Plotting the data | |
| ax1.plot(x1s, y1s, "co", label = "cyan dots") | |
| ax1.plot(x2s, y2s, "r^", label = "red pyramids") | |
| # Adding more artists | |
| ax1.set_title("My Plot") | |
| ax1.set_xlabel("x") | |
| ax1.set_ylabel("y") | |
| ax1.legend() | |
| plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment