awacke1 commited on
Commit
34d9eb1
·
1 Parent(s): a5ecce7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -16
app.py CHANGED
@@ -7,22 +7,6 @@ import plotly.graph_objects as go
7
  st.set_page_config(page_title="Plotly Graphing Libraries",layout='wide')
8
 
9
 
10
- st.markdown("# WebGL with many gifts, traces")
11
- fig = go.Figure()
12
- trace_num = 10
13
- point_num = 5000
14
- for i in range(trace_num):
15
- fig.add_trace(
16
- go.Scattergl(
17
- x = np.linspace(0, 1, point_num),
18
- y = np.random.randn(point_num)+(i*5)
19
- )
20
- )
21
- fig.update_layout(showlegend=False)
22
- #fig.show()
23
- st.plotly_chart(fig, use_container_width=True)
24
-
25
-
26
  st.markdown("WebGL Rendering with 1,000,000 Points")
27
  import plotly.graph_objects as go
28
  import numpy as np
@@ -44,6 +28,23 @@ fig.add_trace(
44
  st.plotly_chart(fig, use_container_width=True)
45
 
46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  st.markdown("# Treemaps: https://plotly.com/python/treemaps/")
48
  df = px.data.gapminder().query("year == 2007")
49
  fig = px.treemap(df, path=[px.Constant("world"), 'continent', 'country'], values='pop',
 
7
  st.set_page_config(page_title="Plotly Graphing Libraries",layout='wide')
8
 
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  st.markdown("WebGL Rendering with 1,000,000 Points")
11
  import plotly.graph_objects as go
12
  import numpy as np
 
28
  st.plotly_chart(fig, use_container_width=True)
29
 
30
 
31
+
32
+ st.markdown("# WebGL Graph - ScatterGL")
33
+ fig = go.Figure()
34
+ trace_num = 10
35
+ point_num = 5000
36
+ for i in range(trace_num):
37
+ fig.add_trace(
38
+ go.Scattergl(
39
+ x = np.linspace(0, 1, point_num),
40
+ y = np.random.randn(point_num)+(i*5)
41
+ )
42
+ )
43
+ fig.update_layout(showlegend=False)
44
+ #fig.show()
45
+ st.plotly_chart(fig, use_container_width=True)
46
+
47
+
48
  st.markdown("# Treemaps: https://plotly.com/python/treemaps/")
49
  df = px.data.gapminder().query("year == 2007")
50
  fig = px.treemap(df, path=[px.Constant("world"), 'continent', 'country'], values='pop',