-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgraphing.py
More file actions
33 lines (27 loc) · 808 Bytes
/
graphing.py
File metadata and controls
33 lines (27 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import matplotlib.pyplot as plt
import numpy as np
def pvt_plt(price_array, time_array):
""" First parameter is for the price array and the second is for the time array"""
plt.figure("Price of asset over time")
plt.title("Price of asset over time")
plt.plot(price_array, time_array)
plt.ylabel("USD")
plt.xlabel("DATES")
plt.show()
def compare_pvt(*create_asset):
"""Compares multiple assets in a price over time graph"""
num = len(create_asset)
title = "Comparing the prices over time of " #+ create_asset[0]
plt.figure(title)
plt.title(title)
plt.plot(create_asset[1], create_asset[2])
plt.show()
print(num)
x = [3,4,4,5,5,5,9,5,5,9,6,6,6,6]
y = np.sin(x)
asset_array = ["BTC" , x , y]
#pvt_plt(x,y)
#compare_pvt(BTC)
print(asset_array[0])
print(asset_array[1])
print(asset_array[2])