[問題] 如何繪製有x軸的 Bubble Chart

看板Python作者 (Z)時間1年前 (2023/04/21 22:12), 1年前編輯推噓2(207)
留言9則, 4人參與, 1年前最新討論串1/1
在這期經濟學人看到這張圖, https://i.imgur.com/h11QEh2.png
網頁 https://tinyurl.com/3bjx94jn 想問要如何繪製這種圖? (希望是互動式圖) 我目前有用 plotly.express.strip , 但不能調整點的大小跟顏色, 故想問問有什麼其他工具或套件可以用嗎? 謝謝~ -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.112.150.176 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1682086339.A.9A7.html

04/21 22:31, 1年前 , 1F
matplotlib.pyplot.scatter()
04/21 22:31, 1F

04/21 22:31, 1年前 , 2F
matplotlib找一些範例自己刻
04/21 22:31, 2F

04/21 22:34, 1年前 , 3F
主要是想做成互動式圖表,所以沒用matplotlib
04/21 22:34, 3F
※ 編輯: folksuite (140.112.150.176 臺灣), 04/21/2023 22:35:30

04/21 22:35, 1年前 , 4F
想要interactive就plotly或bokeh
04/21 22:35, 4F

04/21 22:36, 1年前 , 5F
對噢,還有Bokeh,我找找看,謝謝~
04/21 22:36, 5F

04/21 22:45, 1年前 , 6F
plotly應該也有scatter可以用 都試試
04/21 22:45, 6F

04/21 22:49, 1年前 , 7F
Altair應該有
04/21 22:49, 7F

04/21 23:39, 1年前 , 8F

04/21 23:40, 1年前 , 9F
比較接近的方式,不過還在想要怎麼jitter,讓點不重疊
04/21 23:40, 9F
文章代碼(AID): #1aGfd3cd (Python)
文章代碼(AID): #1aGfd3cd (Python)