# How do I chart ratios, not proportions?

How can I draw a chart for a ratio, not a proportion, when sometimes the ratio is infinity?

Context: I am looking at prescribing of drug A and drug B. I have been drawing bar charts showing prescribing of drug A, per 1000 prescriptions of drug B, over time.

This works great, except when prescriptions of drug B drop to zero. Then I have a problem with my chart, because the proportion is infinity.

How can I visualise the ratio over time, while handling this problem?

• Does prescribing of drug A ever drop to 0? – EdM Apr 13 '16 at 16:32

• +1. I think this is a good graphical solution. But statistically if small $b$ is a problem then $\log(b/a)$ might be better, particular as there is no mention of $a = 0$. You still have a problem with zeros, which would then be plotted separately below the trace, as lower than any other observed. A more heterodox alternative is to plot $b/a$ on square root or cube root scale. – Nick Cox Apr 13 '16 at 16:42
• Some people would work with $\log[(b + 0.5)/(a + 0.5)]$ but you would need to explain that scale. – Nick Cox Apr 14 '16 at 12:01