Skip to content

Instantly share code, notes, and snippets.

@jordantwells42
Created August 21, 2020 22:27
Show Gist options
  • Select an option

  • Save jordantwells42/f75de39ebf609e4825e8338a683eef4b to your computer and use it in GitHub Desktop.

Select an option

Save jordantwells42/f75de39ebf609e4825e8338a683eef4b to your computer and use it in GitHub Desktop.
Markdium-A Guide to Serving Up Matplotlib Visualizations Two Ways
# 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