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'],
closes = data['Close']
)
plot(candlestick_chart).show()
plot(candlestick_chart)

View File

@ -13,4 +13,4 @@ line_chart = LineChart(
y = data['Close'],
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 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_columns = len(subplots[0])
@ -28,5 +28,5 @@ def plot_with_subplots(subplots: List[List[Chart]]) -> Figure:
return figure
def plot(chart: Chart) -> Figure:
return plot_with_subplots([[chart]])
def plot(chart: Chart) -> None:
figure_with_subplots([[chart]]).show(config={'displayModeBar': False})