如何删除图表底部的小时间选择器?
How to remove the small time picker at the bottom of the plotly chart?
如何删除图表的底部区域?
谢谢
此代码是关于“没有 Rangeslider 的烛台”一章中关于 Candlestick-Plots 的官方 ploty-website 的副本。
重要的变化是这一行 fig.update_layout(xaxis_rangeslider_visible=False)
:
import plotly.graph_objects as go
import pandas as pd
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv')
fig = go.Figure(data=[go.Candlestick(x=df['Date'],
open=df['AAPL.Open'], high=df['AAPL.High'],
low=df['AAPL.Low'], close=df['AAPL.Close'])
])
fig.update_layout(xaxis_rangeslider_visible=False)
fig.show()
如何删除图表的底部区域? 谢谢
此代码是关于“没有 Rangeslider 的烛台”一章中关于 Candlestick-Plots 的官方 ploty-website 的副本。
重要的变化是这一行 fig.update_layout(xaxis_rangeslider_visible=False)
:
import plotly.graph_objects as go
import pandas as pd
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv')
fig = go.Figure(data=[go.Candlestick(x=df['Date'],
open=df['AAPL.Open'], high=df['AAPL.High'],
low=df['AAPL.Low'], close=df['AAPL.Close'])
])
fig.update_layout(xaxis_rangeslider_visible=False)
fig.show()