Python 3 Basics # 6.2 | Implement Matplotlib with Numpy | Python for Beginners
Matplotlib with Numpy
a. Scatterplot and it various options to be explored
b. Barplot
Code Starts Here
==============
import matplotlib.pyplot as plt
import numpy as np
y = m*x + c
m = 3
c = 4
x = np.linspace(1,20)
y = m* x + c
1
plt.title('Visualisation demonstation of matplotlib with Numpy')
plt.xlabel('X axis')
plt.ylabel('Y axis')
plt.plot(x,y)
plt.show()
2
plt.title('Visualisation demonstation of matplotlib with Numpy')
plt.xlabel('X axis')
plt.ylabel('Y axis')
plt.plot(x,y,'--')
plt.show()
3
plt.title('Visualisation demonstation of matplotlib with Numpy')
plt.xlabel('X axis')
plt.ylabel('Y axis')
plt.plot(x,y,'.-')
plt.show()
4
plt.title('Visualisation demonstation of matplotlib with Numpy')
plt.xlabel('X axis')
plt.ylabel('Y axis')
plt.plot(x,y,'.',color='r')
plt.show()
opt = ['-','--','.','.-','|','^','p','D','1','2','s']
color1 = ['r','g','y','b','r','g','y','b','r','g','y']
for i in range(len(opt)):
m = 3
c = 4
x = np.linspace(1,20)
y = m* x + c
plt.title('Visualisation demonstation of matplotlib with Numpy')
plt.xlabel('X axis')
plt.ylabel('Y axis')
plt.plot(x,y,opt[i],color=color1[i])
plt.show()
x = [10,12,14]
y = [6,12,15]
x1 = [11,13,15]
y1 = [8,9,18]
plt.bar(x,y,align='center')
plt.bar(x1,y1,align='center')
plt.title('Bar Graph Demo')
plt.xlabel('X axis')
plt.ylabel('Y axis')
plt.show()
All the playlist of this youtube channel
========================================
1. Data Preprocessing in Machine Learning
• Data Preprocessing in Machine Learnin...
2. Confusion Matrix in Machine Learning, ML, AI
• Confusion Matrix in Machine Learning,...
3. Anaconda, Python Installation, Spyder, Jupyter Notebook, PyCharm, Graphviz
• Anaconda | Python Installation | Spyd...
4. Cross Validation, Sampling, train test split in Machine Learning
• Cross Validation | Sampling | train t...
5. Drop and Delete Operations in Python Pandas
• Drop and Delete Operations in Python ...
6. Matrices and Vectors with python
• Matrices and Vectors with python
7. Detect Outliers in Machine Learning
• Detect Outliers in Machine Learning
8. TimeSeries preprocessing in Machine Learning
• TimeSeries preprocessing in Machine L...
9. Handling Missing Values in Machine Learning
• Handling Missing Values in Machine Le...
10. Dummy Encoding Encoding in Machine Learning
• Label Encoding, One hot Encoding, Dum...
11. Data Visualisation with Python, Seaborn, Matplotlib
• Data Visualisation with Python, Matpl...
12. Feature Scaling in Machine Learning
• Feature Scaling in Machine Learning
13. Python 3 basics for Beginner
• Python | Python 3 Basics | Python for...
14. Statistics with Python
• Statistics with Python
15. Data Preprocessing in Machine Learning
• Data Preprocessing in Machine Learnin...
16. Sklearn Scikit Learn Machine Learning
• Sklearn Scikit Learn Machine Learning
17. Linear Regression, Supervised Machine Learning
• Linear Regression | Supervised Machin...
18 Interview Questions on Machine Learning, Artificial Intelligence, Python Pandas and Python Basics
• Interview Question for Machine Learni...
19. Jupyter Notebook Operations
• Jupyter and Spyder Notebook Operation...