Undestand and inverse the scaling policy of burtin exemple (bokeh gallery)

Hello,

I felt in love with the following example https://bokeh.pydata.org/en/latest/docs/gallery/burtin.html

But I’m new to bokeh and python, so I don’t understand how the scaling policy of drogs bars, bacteria labels and radius axis are coded. How can I put the maxim value on the external circle (so instead of 0.1 put 1000 on the external circle) and then make the bars of drogs proportional to the values, for example Mycobacterium tuberculosis, 800, has the higher bar of penicillin than Salmonella, 10. And also to have the absolute size of drogs, so I can see the relation between , let’s say, Mycobacterium, 800 and Salmonelle 10; that the first one is 80 times bigger then the latter.

When I inversed maxr and minr as following

maxr = sqrt(log(100 * 1E4))

minr = sqrt(log(100000 * 1E4))

I obtained the values on the radial axis, as I wanted : from the lowest on the internal axis to the highest on the external.

But I don’t know how to adapt the code in order to adapt my bar plots (corresponding to the drogs values) , as well as the labels corresponding to the clusters of these bars (bacterias names)

Thank you in advance for your help !

Hi,

I am afraid I don't really have much to say that can be of specific help. I added that example several years ago as a demonstration of Bokeh's flexibility. But I just cribbed the example from, IIRC, this d3 version:

  http://mbostock.github.io/protovis/ex/antibiotics-burtin.html

The comment there is just "Burtin's radius encoding is, as far as I can tell, sqrt(log(mic))." So you would simply have to figure out what useful or relevant scaling endpoints are for your specific data.

THAT said, while Burtin's famous chart is visually interesting, I am not sure I consider it "good" from a visualization POV. There's no real reason for the data to be plotted on a radial axis, for instance, and the inverse scaling could be avouded with a subtitle "(smaller is better)" or other means. If you are going purely for visual interest, then OK, but if your aim is to present quantitative data in the most comprehendible way, I'd suggest investigating simpler presentation. (Just my $0.02)

Thanks,

Bryan

···

On Dec 13, 2018, at 14:41, [email protected] wrote:

Hello,

I felt in love with the following example https://bokeh.pydata.org/en/latest/docs/gallery/burtin.html
But I'm new to bokeh and python, so I don't understand how the scaling policy of drogs bars, bacteria labels and radius axis are coded. How can I put the maxim value on the external circle (so instead of 0.1 put 1000 on the external circle) and then make the bars of drogs proportional to the values, for example Mycobacterium tuberculosis, 800, has the higher bar of penicillin than Salmonella, 10. And also to have the absolute size of drogs, so I can see the relation between , let's say, Mycobacterium, 800 and Salmonelle 10; that the first one is 80 times bigger then the latter.

When I inversed maxr and minr as following
maxr = sqrt(log(100 * 1E4))
minr = sqrt(log(100000 * 1E4))

I obtained the values on the radial axis, as I wanted : from the lowest on the internal axis to the highest on the external.

But I don't know how to adapt the code in order to adapt my bar plots (corresponding to the drogs values) , as well as the labels corresponding to the clusters of these bars (bacterias names)

Thank you in advance for your help !

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/5160c941-5995-4898-9012-89fc423dfd9b%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.