2
$\begingroup$

I'm plotting data using circles. I am assigning the radius of the circles to be the value of the data each circle represents. Since the data values get too large to successfully plot in this way I would like to replace this linear mapping between data and radius with a logarithmic mapping, i.e. make the radius of the circle the natural log of the value it represents.

This seems straightforward, apart from values below 1 where the radius becomes negative.

To get around this I am mapping zero data to zero radius, data values below e to a radius of 1, and every other data value to its natural log.

The data is the output of a General Ecosystem Model and the goal of the visualization is to provide a simple view onto the model through time, allowing the user to choose between things like biomass or average age as the sizing factor.

What is the standard practice for dealing with small values when drawing graphical content proportional to the natural log of the data it represents?

$\endgroup$
4
  • 3
    $\begingroup$ One answer is that the precise method for proportional circles seems rarely documented, but I have never seen this proposal before. If radius is proportional to size, even as a first approximation, areas are proportional to size squared and so there is major bias. Radius proportional to square root is therefore suggested. $\endgroup$
    – Nick Cox
    May 3, 2015 at 15:16
  • 2
    $\begingroup$ A real problem with this method, very popular in some circles [!], is that it requires a rather narrow range to be possible at all. With e.g. 100-fold range, either the largest circles are ridiculously large or the smallest circles are not visible. Using anything other than proportionality makes a mockery of the supposed principle that circle size is a simple function of magnitude. $\endgroup$
    – Nick Cox
    May 3, 2015 at 15:17
  • $\begingroup$ Good point about r^2, but using the square root of the logarithm there will be still be oddities for small values in (0, 1) since I'll be after the square root of a negative number. $\endgroup$
    – dumbledad
    May 3, 2015 at 15:20
  • 3
    $\begingroup$ I am suggesting root as an alternative to logarithms. I don't support the use of logarithms here at all, but if you were determined then something like log(1 + magnitude) would fudge your problem. $\endgroup$
    – Nick Cox
    May 3, 2015 at 15:23

1 Answer 1

2
$\begingroup$

Unfortunately Nick Cox answered most of this question in the comments, but here's what I would do:

  1. Make the area, not the radius, proportional to the absolute value of your data
  2. Color or hatch the circles according to sign, or use upside down and right side up triangles instead of circles

If there are too many small values to make the circles comparison useful, don't be afraid to use a second plot that makes the comparison easier. It's tough to make better tecommendations without more detail about your data and your goals

$\endgroup$
2
  • $\begingroup$ I've added some detail about my data and my goals. Just to be clear the negative values are not in the data, they arise from taking the log of the data (e.g. ln(0.5) = -0,69...) $\endgroup$
    – dumbledad
    May 5, 2015 at 7:51
  • $\begingroup$ Understood, and log(1 + magnitude) remains as a suggestion to avoid that. $\endgroup$
    – Nick Cox
    May 5, 2015 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.