-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy path_basic.py
More file actions
28 lines (18 loc) · 593 Bytes
/
Copy path_basic.py
File metadata and controls
28 lines (18 loc) · 593 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
import plotly.graph_objects as go
from ridgeplot._types import PlotlyTemplate
def main(
template: PlotlyTemplate | None = None,
) -> go.Figure:
import numpy as np
from ridgeplot import ridgeplot
rng = np.random.default_rng(42)
my_samples = [rng.normal(n, size=900) for n in range(6, 0, -2)]
fig = ridgeplot(samples=my_samples, template=template)
fig.update_layout(height=400, width=800)
return fig
if __name__ == "__main__":
fig = main()
fig.show()