kunifujiwara commited on
Commit
a4cef1b
·
1 Parent(s): ee6e4be

modify pages

Browse files
Files changed (1) hide show
  1. Home.py +2 -1
Home.py CHANGED
@@ -57,7 +57,7 @@ def create_colormap_legend(vmin, vmax, cmap, n_colors):
57
  cbar = fig.colorbar(plt.cm.ScalarMappable(norm=norm, cmap=cmap), cax=ax, orientation='horizontal',
58
  spacing='proportional', boundaries=bounds, format='%.0f')
59
  cbar.set_ticks(bounds)
60
- ax.set_title("緑被率 %", fontsize=10, pad=10)
61
 
62
  buf = io.BytesIO()
63
  plt.savefig(buf, format='png', dpi=300, bbox_inches='tight')
@@ -196,6 +196,7 @@ def app():
196
  # Display the legend in the middle column
197
  with right_spacer:
198
  st.image(f"data:image/png;base64,{legend_img}", caption="Color Scale", use_column_width=True)
 
199
 
200
  if st.checkbox("Show raw data"):
201
  st.write(gdf_filtered[['CITY_NAME', 'S_NAME', selected_attribute]])
 
57
  cbar = fig.colorbar(plt.cm.ScalarMappable(norm=norm, cmap=cmap), cax=ax, orientation='horizontal',
58
  spacing='proportional', boundaries=bounds, format='%.0f')
59
  cbar.set_ticks(bounds)
60
+ # ax.set_title("緑被率 %", fontsize=10, pad=10)
61
 
62
  buf = io.BytesIO()
63
  plt.savefig(buf, format='png', dpi=300, bbox_inches='tight')
 
196
  # Display the legend in the middle column
197
  with right_spacer:
198
  st.image(f"data:image/png;base64,{legend_img}", caption="Color Scale", use_column_width=True)
199
+ st.markdown("<h4 style='text-align: center;'>緑被率 %</h4>", unsafe_allow_html=True)
200
 
201
  if st.checkbox("Show raw data"):
202
  st.write(gdf_filtered[['CITY_NAME', 'S_NAME', selected_attribute]])