kopia lustrzana https://github.com/animator/learn-python
Update matplotlib-introduction.md
rodzic
0d420ef4a6
commit
358d8b05e4
|
@ -12,8 +12,9 @@ To make this process of data visualization easier and clearer, matplotlib librar
|
|||
|
||||
## Starting with Matplotlib
|
||||
|
||||
### 1.] Install and import the neccasary libraries - mayplotlib.pylplot
|
||||
```python
|
||||
### 1. Install and import the neccasary libraries - mayplotlib.pylplot
|
||||
|
||||
```bash
|
||||
pip install matplotlib
|
||||
```
|
||||
|
||||
|
@ -22,9 +23,7 @@ import maptplotlib.pyplot as plt
|
|||
import numpy as np
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 2.] Scatter plot
|
||||
### 2. Scatter plot
|
||||
Scatter plot is a type of plot that uses the cartesian coordinates between x and y to describe the relation between them. It uses dots to represent relation between the data variables of the data set.
|
||||
|
||||
```python
|
||||
|
@ -41,12 +40,9 @@ plt.tight_layout()
|
|||
plt.show()
|
||||
```
|
||||
|
||||

|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
### 3.] Bar plot
|
||||
### 3. Bar plot
|
||||
Bar plot is a type of plot that plots the frequency distrubution of the categorical variables. Each entity of the categoric variable is represented as a bar. The size of the bar represents its numeric value.
|
||||
|
||||
```python
|
||||
|
@ -61,11 +57,10 @@ plt.ylabel("Y values")
|
|||
|
||||
plt.show()
|
||||
```
|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
### 4.] Histogram
|
||||
### 4. Histogram
|
||||
Histogram is the representation of frequency distribution of qualitative data. The height of each rectangle defines the amount, or how often that variable appears.
|
||||
|
||||
```python
|
||||
|
@ -79,14 +74,7 @@ plt.ylabel("Frequency Distribution")
|
|||
|
||||
plt.show()
|
||||
```
|
||||

|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue