4
$\begingroup$

I would like to label the units of the vertical axis on a BoxWhiskerChart, but haven't figured out how to do so. I tried AxesLabel and I tried giving the data units, but neither worked for me in version 11.1.1

BoxWhiskerChart[Quantity[RandomReal[{0, 10}, {100}], "USDollars"], 
 AxesLabel -> {"Test"}]

BoxWhiskerChart

How can I label the vertical axis?

$\endgroup$
3
  • 1
    $\begingroup$ You must use FrameLabel -> {"", "Test"}, RotateLabel -> False, as you have a Frame not axes. $\endgroup$ Commented Dec 1, 2017 at 12:09
  • $\begingroup$ @JoséAntonioDíazNavas Thank you! If you post that as an answer I'll accept it. $\endgroup$ Commented Dec 1, 2017 at 19:03
  • 1
    $\begingroup$ I you want to see the units as a label, you could use FrameLabel->Automatic. $\endgroup$
    – Carl Woll
    Commented Dec 1, 2017 at 20:48

2 Answers 2

4
$\begingroup$

Try with FrameLabel->{"", "Test"}, RotateLabel -> False, therefore:

BoxWhiskerChart[Quantity[RandomReal[{0, 10}, {100}], "USDollars"], 
FrameLabel -> {"", "Test"}, RotateLabel -> False]

enter image description here

$\endgroup$
3
$\begingroup$

Also:

Labeled[BoxWhiskerChart[Quantity[RandomReal[{0, 10}, {100}], "USDollars"]], 
  Style["Test", 12, "Panel"], Left, RotateLabel -> True]

enter image description here

Panel[BoxWhiskerChart[Quantity[RandomReal[{0, 10}, {100}], "USDollars"]], 
 "Test", Left, RotateLabel -> True, Appearance -> "Frameless"]

enter image description here

$\endgroup$

Your Answer

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

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