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$ 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$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.