Hide modebar from plots
This commit is contained in:
parent
db0182faed
commit
c120781f03
@ -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)
|
@ -13,4 +13,4 @@ line_chart = LineChart(
|
|||||||
y = data['Close'],
|
y = data['Close'],
|
||||||
name = 'SPX'
|
name = 'SPX'
|
||||||
)
|
)
|
||||||
plot(line_chart).show()
|
plot(line_chart)
|
6
plot.py
6
plot.py
@ -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})
|
Loading…
Reference in New Issue
Block a user