Easiest Way to Plot 📈using Matplotlib in Python 🐍

Published: 31 October 2025
on channel: Gate Smashers
25,168
515

Python Code:
import matplotlib.pyplot as plt

x = [1, 2, 3, 4, 5]
y = [1, 4, 9, 16, 25]

plt.plot(x, y, linewidth=3, marker='+', color='green')
plt.title("Square Numbers", fontsize=24)
plt.xlabel("Value",fontsize=14)
plt.ylabel("Square of Value", fontsize=14)
plt.grid(False)
plt.show()
plt.savefig('squares_plot.png')

🔹 Gate Smashers Shorts:
Watch quick concepts & short videos here:
   / @gatesmashersshorts  

🔹 Subscribe for more shorts and motivational content:
   / @varunainashots  
Subject-wise playlist Links:
--------------------------------------------------------------------------------------------------------------------------------------
►Design and Analysis of algorithms (DAA):
   • Design and Analysis of algorithms (DAA)  
►Software Engineering (Complete Playlist):
   • Software Engineering  
►Database Management System:
   • DBMS (Database Management system) Complete...  
►Cloud Computing:
   • Cloud Computing (Complete Course)  
► Theory of Computation
   • TOC(Theory of Computation)  
►Artificial Intelligence:
   • Artificial Intelligence (Complete Playlist)  
►Computer Networks (Complete Playlist):
   • Computer Networks (Complete Playlist)  
►Operating System:
   • Operating System (Complete Playlist)  
►Structured Query Language (SQL):
   • Structured Query Language (SQL)  
►Discrete Mathematics:
   • Discrete Mathematics  
►Compiler Design:
   • Compiler Design (Complete Playlist)  
►Number System:
   • Number system  
►Programming in C :
   • C Programming  
►Data Structure:
   • Data Structure  
►Computer Architecture :
   • Computer Organization and Architecture (Co...  
►Graph Theory (Complete Playlist):
   • Graph Theory  
►Digital Logic:
   • Digital Logic (Complete Playlist)  

---------------------------------------------------------------------------------------------------------------------------------------
Our social media Links:
► Subscribe to us on YouTube:    / gatesmashers  
►Subscribe to our new channel:    / @varunainashots  
► Like our page on Facebook:   / gatesmashers  
► Follow us on Instagram:   / gate.smashers  
► Follow us on Instagram:   / varunainashots  
► Follow us on Telegram: https://t.me/gatesmashersofficial
► Follow us on Threads: https://www.threads.net/@gate.smashers
--------------------------------------------------------------------------------------------------------------------------------------
►For Any Query, Suggestion or notes contribution:
Email us at: gatesmashers2018@gmail.com


On this page of the site you can watch the video online Easiest Way to Plot 📈using Matplotlib in Python 🐍 with a duration of hours minute second in good quality, which was uploaded by the user Gate Smashers 31 October 2025, share the link with friends and acquaintances, this video has already been watched 25,168 times on youtube and it was liked by 515 viewers. Enjoy your viewing!