Created
July 17, 2021 05:38
-
-
Save codewithpom/36b9343520be8ee151baaf8670026a82 to your computer and use it in GitHub Desktop.
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
import matplotlib.pyplot as plt | |
y_axis = [4, 6, 7, 5, 9, 10] | |
# create y_axis list for y axis | |
x_axis = list(range(len(y_axis))) | |
# create x_axis list for x axis | |
plt.plot(x_axis, y_axis) | |
# plot the lists on the graph | |
plt.title("My first Matplotlib Graph") | |
# set title of the graph | |
plt.xlabel('X axis label', fontsize=18) | |
# add label at x axis with fontsize 18 | |
plt.ylabel("Y axis label", fontsize=18) | |
# add label at y axis with fontsize 18 | |
# finally after all the changes show the graph | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment