tag:blogger.com,1999:blog-1693014329567144872.post9088819157260510440..comments2023-08-27T06:49:20.658+01:00Comments on The Glowing Python: How to make Bubble Charts with matplotlibJustGlowinghttp://www.blogger.com/profile/17212021288715206641noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-1693014329567144872.post-85662374479487175022018-11-14T02:13:30.293+00:002018-11-14T02:13:30.293+00:00Yep. I've seen it. I'm still using Classic...Yep. I've seen it. I'm still using Classic Python 2.5 though.Shawn Driscollhttps://www.blogger.com/profile/05570554975738301255noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-10276874181762826722018-11-05T09:32:51.159+00:002018-11-05T09:32:51.159+00:00Hi Shawn. Another place to start - I know I am lat...Hi Shawn. Another place to start - I know I am late with this comment - is with the seaborn.scatterplot(). This is a super powerful tool that can make vary size and color by categorial or numeric value. It was developed quite recently.Anonymoushttps://www.blogger.com/profile/17976763631817948326noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-89742051150045401102017-09-17T07:40:17.235+01:002017-09-17T07:40:17.235+01:00Thanks for this article. I was looking for a way t...Thanks for this article. I was looking for a way to get started doing bubble charts using Python.Shawn Driscollhttps://www.blogger.com/profile/05570554975738301255noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-88430970874766974022013-11-09T19:08:00.035+00:002013-11-09T19:08:00.035+00:00At least as of matplotlib 1.3.1, the marker size f...At least as of matplotlib 1.3.1, the marker size for scatter plots is already scaled by area (see <a href="http://matplotlib.org/api/axes_api.html?highlight=scatter%20plot#matplotlib.axes.Axes.scatter" rel="nofollow">scatter plot documentation</a>) Using the square root gives the incorrect marker sizes..Zainhttps://www.blogger.com/profile/04242909365137676168noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-49617341081795328122013-09-12T23:32:51.545+01:002013-09-12T23:32:51.545+01:00Thank you for this useful piece of code! Simple an...Thank you for this useful piece of code! Simple and clean. <br /><br />If you learn of a nice way to deal with legends - please update!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-90589929677903941512013-06-01T15:18:21.603+01:002013-06-01T15:18:21.603+01:00I believe there's no built way to that. You co...I believe there's no built way to that. You could use a subplot which shows some bubbles aligned with the number which is represented by the size of the bubble.JustGlowinghttps://www.blogger.com/profile/17212021288715206641noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-23475122879694900472013-06-01T13:10:32.529+01:002013-06-01T13:10:32.529+01:00How do you add a bubble plot legend in matplotlib ...How do you add a bubble plot legend in matplotlib where the Legend shows a representation of the bubble sizes... i.e. say 1million - 5 million - 10million - 15million bubble sizesAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-45929413977477580032012-11-16T21:31:39.213+00:002012-11-16T21:31:39.213+00:00I use the square root to scale the area.I use the square root to scale the area.JustGlowinghttps://www.blogger.com/profile/17212021288715206641noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-40486761316957867602012-11-16T21:29:52.147+00:002012-11-16T21:29:52.147+00:00if data[8] is population, don't you want area....if data[8] is population, don't you want area.append(data[8]) instead of the square root? It seems to me that each person in the population should represent a certain area and, therefore, the area of the circle would be proportional to the population, not sqrt(population).Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-39183307574239647272011-11-27T20:46:35.028+00:002011-11-27T20:46:35.028+00:00Neat.
Looking at your code for slicing up the CSV...Neat.<br /><br />Looking at your code for slicing up the CSV file, I think you might want to check out pandas, a package for handling tabular data like this: http://pandas.sourceforge.net/Thomas Khttps://www.blogger.com/profile/09256253053387790281noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-403156110201065252011-11-24T04:15:16.796+00:002011-11-24T04:15:16.796+00:00Pretty cool! It is amazing what matplotlib does th...Pretty cool! It is amazing what matplotlib does this days!dsignhttps://www.blogger.com/profile/12000513261415036955noreply@blogger.com