Hide modebar from plots

This commit is contained in:
moshferatu 2023-12-31 06:12:37 -08:00
parent db0182faed
commit c120781f03
3 changed files with 5 additions and 5 deletions

View File

@ -15,4 +15,4 @@ candlestick_chart = CandlestickChart(
lows = data['Low'], lows = data['Low'],
closes = data['Close'] closes = data['Close']
) )
plot(candlestick_chart).show() plot(candlestick_chart)

View File

@ -13,4 +13,4 @@ line_chart = LineChart(
y = data['Close'], y = data['Close'],
name = 'SPX' name = 'SPX'
) )
plot(line_chart).show() plot(line_chart)

View File

@ -3,7 +3,7 @@ from plotly.graph_objects import Figure
from plotly.subplots import make_subplots from plotly.subplots import make_subplots
from typing import List from typing import List
def plot_with_subplots(subplots: List[List[Chart]]) -> Figure: def figure_with_subplots(subplots: List[List[Chart]]) -> Figure:
num_rows = len(subplots) num_rows = len(subplots)
num_columns = len(subplots[0]) num_columns = len(subplots[0])
@ -28,5 +28,5 @@ def plot_with_subplots(subplots: List[List[Chart]]) -> Figure:
return figure return figure
def plot(chart: Chart) -> Figure: def plot(chart: Chart) -> None:
return plot_with_subplots([[chart]]) figure_with_subplots([[chart]]).show(config={'displayModeBar': False})