vayu.plotly_utils¶
Requires the vayulib[data] extra.
plotly_utils
¶
line
¶
line(
series: Series,
index: Series = None,
name: str = None,
width: float = 1,
color: str = None,
dash: str = None,
shape: str = None,
gl: bool = True,
**kwargs
)
Helper function to create line plots from a pandas series.
Source code in vayu/plotly_utils.py
scatter
¶
scatter(
series: Series,
index: Series = None,
name: str = None,
color: str = None,
size: int = 10,
symbol: str = "circle",
gl: bool = True,
**kwargs
)
Helper function to create scatter plots from a pandas series.
Source code in vayu/plotly_utils.py
subplot
¶
subplot(
columns: int = 1,
rows: int = 1,
secondary: bool = True,
shared_xaxes: bool = None,
vertical_spacing: float = None,
**kwargs
)
Helper function to create subplots with secondary y-axis support.
Source code in vayu/plotly_utils.py
insert_title
¶
insert_title(
fig,
title,
x=0.01,
y=0.99,
center: bool = False,
size: int = 20,
bgcolor: str = "rgba(255, 255, 255, 0.7)",
color: str = "black",
font_family: str = "Courier New, monospace",
)
Insert title in the figure.