Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ p = figure(title="Scatter Plot with Image Hover", tools="pan,box_zoom,wheel_zoom
|
|
30 |
<div><img src="@image" ></div>
|
31 |
</div>
|
32 |
""")
|
33 |
-
p.circle('x', 'y', size=
|
34 |
|
35 |
# Add color bar
|
36 |
color_bar = ColorBar(color_mapper=color_mapper['transform'], width=8, location=(0, 0),
|
@@ -39,19 +39,7 @@ p.add_layout(color_bar, 'right') # Position the color bar to the right
|
|
39 |
|
40 |
st.set_page_config(layout='wide')
|
41 |
|
42 |
-
# Add custom CSS to adjust layout
|
43 |
-
|
44 |
-
#st.markdown("""
|
45 |
-
# <style>
|
46 |
-
# .bokeh-chart-container {
|
47 |
-
# margin-left: -100px; /* Adjust the value as needed */
|
48 |
-
# }
|
49 |
-
# </style>
|
50 |
-
# <div class="bokeh-chart-container">
|
51 |
-
#""", unsafe_allow_html=True)
|
52 |
-
|
53 |
# Display the Bokeh figure in Streamlit
|
54 |
st.bokeh_chart(p,use_container_width=True)
|
55 |
|
56 |
-
|
57 |
-
#st.markdown("</div>", unsafe_allow_html=True)
|
|
|
30 |
<div><img src="@image" ></div>
|
31 |
</div>
|
32 |
""")
|
33 |
+
p.circle('x', 'y', size=7, source=source, color=color_mapper) # Apply the color mapper
|
34 |
|
35 |
# Add color bar
|
36 |
color_bar = ColorBar(color_mapper=color_mapper['transform'], width=8, location=(0, 0),
|
|
|
39 |
|
40 |
st.set_page_config(layout='wide')
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
# Display the Bokeh figure in Streamlit
|
43 |
st.bokeh_chart(p,use_container_width=True)
|
44 |
|
45 |
+
|
|