- Mastering Machine Learning for Penetration Testing
- Chiheb Chebbi
- 117字
- 2021-06-25 21:03:06
Matplotlib
As you know, visualization plays a huge role in gaining insights from data, and is also very important in machine learning. Matplotlib is a visualization library used for plotting by data scientists. You can get a clearer understanding by visiting its official website at https://matplotlib.org:

To install it on an Ubuntu machine, use the following command:
sudo apt-get install python3-matplotlib

To import the required packages, use import:
import matplotlib.pyplot as plt
import numpy as np
Use this example to prepare the data:
x = np.linspace(0, 20, 50)
To plot it, add this line:
plt.plot(x, x, label='linear')
To add a legend, use the following:
plt.legend()
Now, let's show the plot:
plt.show()
Voila! This is our plot:

推薦閱讀
- 微商之道
- 物聯(lián)網(wǎng)智慧安監(jiān)技術(shù)
- 物聯(lián)網(wǎng)時代
- 物聯(lián)網(wǎng)安全技術(shù)
- 區(qū)塊鏈輕松上手:原理、源碼、搭建與應用
- 電力物聯(lián)網(wǎng)工程技術(shù)原理與應用
- 物聯(lián)網(wǎng)通信技術(shù)
- Mastering TypeScript 3
- 網(wǎng)管員必讀:網(wǎng)絡管理(第2版)
- 5G技術(shù)與標準
- 圖神經(jīng)網(wǎng)絡前沿
- Laravel Application Development Cookbook
- ReasonML Quick Start Guide
- 互聯(lián)網(wǎng)安全的40個智慧洞見(2018)
- ElasticSearch Server