<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>delma</author_name>
  <author_url>https://blog.hatena.ne.jp/delma/</author_url>
  <blog_title>Take Your Time</blog_title>
  <blog_url>https://delma.hatenablog.com/</blog_url>
  <categories>
    <anon>streamlit</anon>
  </categories>
  <description>streamlitアプリでユーザーの選択によって表示するグラフを変えたい。 例えば、selectboxやradioにはon_changeという引数があるので、 def draw(item_name): ax.plot(df.query(f&quot;item == {item_name}&quot;)) return ax item_name = st.selectbox(item_name, options = [&quot;food&quot;, &quot;furniture&quot;, &quot;drink&quot;], on_change=draw, args = (item_name)) fig = flt.figure() ax = fig.add_s…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdelma.hatenablog.com%2Fentry%2F2022%2F09%2F28%2F105601&quot; title=&quot;st.selectboxやst.radioとグラフを連動させる - Take Your Time&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-09-28 10:56:01</published>
  <title>st.selectboxやst.radioとグラフを連動させる</title>
  <type>rich</type>
  <url>https://delma.hatenablog.com/entry/2022/09/28/105601</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
