Matplotlib.pyplot.ylabel() in Python Improve Improve Like Article Like Save Share Report Matplotlib is a very powerful plotting library useful for those working with Python and NumPy. And for making statistical interference, it becomes very necessary to visualize our data and Matplotlib is the tool that can be very helpful for this purpose. matplotlib.pyplot.ylabel() This function sets the label for the y-axis of the plot. Syntax: matplotlib.pyplot.ylabel(ylabel, fontdict=None, labelpad=None) Parameters: ylabel: The name of the label fontdict: Adds the font styles to the label labelpad: This helps us to set the spacing between label and the axis Example #1: import matplotlib.pyplot as plt # setting x values x =['Geeks', 'for', 'geeks', 'tutorials'] # Setting y values y =[1, 2, 3, 4] # Adding label on the y-axis plt.ylabel('Numbers label') # plotting the graph plt.plot(x, y) Output: Example #2: import matplotlib.pyplot as plt x =['Geeks', 'for', 'geeks', 'tutorials'] y =[1, 2, 3, 4] # Adding space between label and # axis by setting labelpad plt.ylabel('Numbers label', labelpad = 50) plt.plot(x, y) Output: Example #3: import matplotlib.pyplot as plt x =['Geeks', 'for', 'geeks', 'tutorials'] y =[1, 2, 3, 4] # Setting font dictionary font = {'family': 'Verdana', 'color': 'green', 'size': 20, } # Adding the font styles to the label plt.ylabel('Numbers label', fontdict = font) plt.plot(x, y) Output: Last Updated : 12 Apr, 2020 Like Article Save Article Previous Matplotlib.axes.Axes.add_table() in Python Next Nested-if statement in Python Share your thoughts in the comments Add Your Comment Please Login to comment... Similar Reads Matplotlib.pyplot.broken_barh() in Python Matplotlib.pyplot.axis() in Python Matplotlib.pyplot.get_fignums() in Python Python | Matplotlib.pyplot ticks Matplotlib.pyplot.waitforbuttonpress() in Python Matplotlib.pyplot.streamplot() in Python Matplotlib.pyplot.ylim() in Python Matplotlib.pyplot.figimage() function in Python matplotlib.pyplot.arrow() in Python Matplotlib.pyplot.acorr() in Python Like S sathvik chiramana Follow Article Tags : Python-matplotlib Python Practice Tags : python