question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bubble size should scale area, not radius

See original GitHub issue

Issue Summary

The size of bubbles seems to be applied directly as the diameter of the bubble. This means that doubling the size makes the bubble area quadruple, which is visually misleading if you are plotting a quantity, which I expect is the common case.

Steps to Reproduce

Select some data with a simple query like SELECT 1, 2, 50 UNION ALL SELECT 3, 4, 100, and plot it as a bubble chart. The bubble with size 100 will be four times the size of the bubble with size 50.

I would expect the radius to be set as the square root of the size, which would make the area and perceived size scale linearly with size. For example, this is how matplotlib does it.

Technical details:

  • Redash Version: 8.0.0-beta+b27489
  • Browser/OS:
  • How did you install Redash: Helm chart

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
susodapopcommented, Dec 12, 2019

This looks like a pretty simple change. Plotly supports the sizemode attribute for Bubble charts. The options are diameter and area.

Plotly doc: https://plot.ly/python/reference/#scatter-marker-sizemode

I changed it on a local build…

Diameter

diameter

Area

area

1reaction
kravets-levkocommented, Dec 23, 2019

@deecay It could be default for new charts, but migration should keep old behavior for all existing ones.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scaling to radius or area? - From data to Viz
When working with 2d objects, the scaling must be done using the area and not the radius. Furthermore, note that areas are a...
Read more >
A Complete Guide to Bubble Charts | Tutorial by Chartio
Bubbles in a bubble chart should be sized with area corresponding to value, not diameter. Depending on how you are creating your bubble...
Read more >
Right versus wrong bubble size - FlowingData
Bubbles are correctly sized by area (proportionate to the square root of the radius ). Much better. The lesson: graphs and charts might...
Read more >
Approach to scale the size of investment with a wide extreme ...
First off, since you are most likely specifying the radius or diameter of the bubble, you need to take the square root of...
Read more >
Bubble size distribution (density vs. bubble radius) in open ...
... of the bubble size distribution as a function of bubble radius is also different for bubbles smaller and larger than the Hinze...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found