How can I plot a single candlestick given data as
Input
high , open , low , close
[ 18009.800781 , 18004.019571 , 17970.900391 , 17978.850098]
Output as :
How can I plot a single candlestick given data as
Input
high , open , low , close
[ 18009.800781 , 18004.019571 , 17970.900391 , 17978.850098]
Output as :
Candlestick has a vertical position. A single one can be defined as follows:
import plotly.graph_objects as go
fig= go.Figure(go.Candlestick(
x=[0],
open=[18004.019571], high=[18009.800781],
low=[17970.900391], close=[17978.850098]))
fig.update_layout(width=200, height=400, template="plotly_white",
xaxis_rangeslider_visible=False, xaxis_visible=False, yaxis_visible=False)
Save this image as:
fig.write_image("candlestickv.png", width=200, height=400, scale=1)
and with a tool for rotating images, rotate it to get:
thanks it helped ; can somone look into this query as well
Unfortunately go.Candlestick
has no attribute that allows setting its width.