3
$\begingroup$

I actually already found my answer on the question, however it is not working. see BoxWhiskerChart with logarithmic axes

I want to create a boxwiskerchart with a logaritmic axes. But when I try ScalingFunctions with "Log" I do not get the results I am suppose to get. Sometimes it does not work at all. And sometimes I get the wiskers upside down. What am I doing wrong?

data = RandomVariate[RayleighDistribution[RandomInteger[500]], {8, 50}];
BoxWhiskerChart[data, "Outliers", ChartStyle -> 56]

enter image description here

BoxWhiskerChart[data, "Outliers", ChartStyle -> 56, ScalingFunctions -> "Log"]

enter image description here

Also using Log10 does not work

BoxWhiskerChart[data, "Outliers", ChartStyle -> 56, ScalingFunctions -> "Log10"]

enter image description here

$\endgroup$
  • 1
    $\begingroup$ Seems to be an issue of Mma v9. No such problems in Mma v10. $\endgroup$ – Karsten 7. Jul 29 '14 at 12:25
  • $\begingroup$ I am using mathematica 9.0. So it is not possible to do use the 'ScalingFunctions' on a box plot in this version? $\endgroup$ – Wiebe Jul 29 '14 at 12:30
  • $\begingroup$ Are there other options to do it in version 9.0? $\endgroup$ – Wiebe Jul 29 '14 at 12:48
  • $\begingroup$ You can do it in the WolframProgrammingCloud. $\endgroup$ – Karsten 7. Jul 31 '14 at 23:50
1
$\begingroup$

Here is a method that will work in version 9, although it requires you to install the CustomTicks package. Here is a BoxWhiskerChart using the normal linear scaling:

SeedRandom[420];
data = RandomVariate[
   RayleighDistribution[RandomInteger[500]], {8, 50}];
bwc = BoxWhiskerChart[data, "Outliers", ChartStyle -> 56]

Mathematica graphics

Here is the log-scaled chart you get from version 10,

BoxWhiskerChart[data, "Outliers", ChartStyle -> 56, 
 ScalingFunctions -> "Log10"]

Mathematica graphics

And here is the bootstrapped log-scale chart from version 9:

<< CustomTicks`
BoxWhiskerChart[Log10@data, "Outliers", ChartStyle -> 56, 
 FrameTicks -> {{LogTicks[10, 1, 4], 
    StripTickLabels[LogTicks[10, 1, 4]]}, {Automatic, Automatic}}]

Mathematica graphics

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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