Hi All,
I have the following dataset:
The box-whiskers plot is a very nice way of graphing a distribution of multiple variables/groups in one group. To that end, I use the commadn:
Generally, speaking, the syntax for the hbox is something along the lines of:
wherein y1 and y2 represent different groups with the same underlying variable x. Put differently, y1 and y2 are conditional distributions of x for the two distinct groups. In my code, however, I have two distinct variables x1 and x2, which I am able to graph together because their scales are similar. Although I obtain the graphs, I get a legend for each of the different variables (x1 and x2), and no label on the y axis. What I would like instead is to have a label on the y-axis itself, correspond to x1 and x2. Is this possible?
Thanks!
I have the following dataset:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(x1 x2) 5 3 4 21 1 3 4 21 41 3 5 1 2 2 4 4 32 32 31 32 end
The box-whiskers plot is a very nice way of graphing a distribution of multiple variables/groups in one group. To that end, I use the commadn:
Code:
graph hbox x1 x2.
Code:
graph hbox y1 y2, over(x)
wherein y1 and y2 represent different groups with the same underlying variable x. Put differently, y1 and y2 are conditional distributions of x for the two distinct groups. In my code, however, I have two distinct variables x1 and x2, which I am able to graph together because their scales are similar. Although I obtain the graphs, I get a legend for each of the different variables (x1 and x2), and no label on the y axis. What I would like instead is to have a label on the y-axis itself, correspond to x1 and x2. Is this possible?
Thanks!
Comment