-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgraphs.py
More file actions
33 lines (23 loc) · 704 Bytes
/
graphs.py
File metadata and controls
33 lines (23 loc) · 704 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 numpy as np
import pandas as pd
#Data viz
import plotly.graph_objs as go
#import yfinance as yf
#data = yf.download(tickers='BTC-USD', period = '22h', interval = '15m')
def graa(data, timeP, timeI, cryptn):
fig = go.Figure()
#Candlestick
fig.add_trace(go.Candlestick(x=data.index,
open=data['Open'],
high=data['High'],
low=data['Low'],
close=data['Close'], name = 'market data'))
# Add titles
fig.update_layout(
title=cryptn+' price evolution',
yaxis_title=cryptn+' Price')
# X-Axes
#Show
#fig.show()
fig.write_image("dbot/dbimages/fig1.png")
#graa(data)