Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This is a sample Python script.
- # Press Shift+F10 to execute it or replace it with your code.
- # Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
- import numpy as np
- import pandas as pd
- import matplotlib.pyplot as plt
- import matplotlib.figure as fig
- def zad1():
- arr = np.array([[2,3,5,1],
- [3,5,7,2],
- [5,7,1,3]])
- columnSum = arr.sum(0)
- rowSum = arr.sum(1)
- arr1 = np.array([1,2,3,4,5,6])
- # print(columnSum, rowSum)
- arr1_0_1 = ((arr-arr.min(0)) / (arr.max(0)-arr.min(0)))
- arr_csv = pd.read_csv('dane.csv', ',', header=None)
- nazwy_kolumn = list(arr_csv.columns)
- # print(arr1_0_1)
- # print(arr_csv[1][1])
- x = np.arange(0, 10, 0.1)
- y = np.sin(x)
- # plt.scatter(x, y)
- # plt.plot(x, y)
- # plt.xlabel('x')
- # plt.ylabel('y')
- # plt.show()
- fig, ax = plt.subplots(1,2,figsize=(10,5))
- # ax[0].plot(x,y)
- # ax[0].set_xlabel('x')
- # ax[0].set_ylabel('y')
- # ax[1].scatter(x,y)
- # ax[1].set_xlabel('x')
- # ax[1].set_ylabel('y')
- # fig.tight_layout()
- fig, ax = plt.subplots(2, 2, figsize = (10, 10))
- ax[0, 0].scatter(x, y)
- ax[0, 1].plot(x, y)
- ax[1, 0].hist(y)
- ax[1, 1].boxplot(y)
- plt.show()
- zad1()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement