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

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

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

enter image description here

$\endgroup$
2
$\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, privacy policy and cookie policy

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