# st: Twoway area graphs

 From Knag Anne-Christine To Subject st: Twoway area graphs Date Tue, 03 Jul 2007 10:07:49 +0200

```Thanks for the help with my beamplots! I have another question on order. I
want to create 9 overlaid two-way area graphs by experiment and treatment.

twoway (area all dos, sort) (area dead dos, sort), by(experiment treatment)

Experiment is either 1 or 2. Treatment is C, L, M, H, E. So the groups are
1C. 2C, 1L, 2L, 1M, 2M etc. There is no group 1H.

The syntax above gives me the 9 plots ordererd like this:

1C, 1E, 1L
1M, 2C, 2E
2H, 2L, 2M

But what I want is :
1C, 2C
1L, 2L
1M, 2M
, 2H
1E, 2E

Is this arrangement possible?

Thanks,
AC

On 7/2/07 6:40 PM, "Nick Cox" <n.j.cox@durham.ac.uk> wrote:

> from SSC.
>
> Nick
> n.j.cox@durham.ac.uk
>
> Nick Cox
>
>> -order-.
>>
>> You may want to label the values of -order-
>> with the values of -tank-.
>>
>> In your case, you can do this using -ylabel()-
>> or using -label- beforehand or by installing -labutil-
>> from SSC and using -labmask- beforehand.
>>
>> beamplot pre_l, over(order) ytitle("") xtitle ("Pre-spawning
>> length (cm) ") by(sex) yla(1 "5" 2 "1" <etc.>)
>
>> Knag Anne-Christine
>>
>>> More questions about beamplot (which produces really nice
>>> plots by the way).
>>> How can I order the y-axis so that tank goes: 5 1 6 2 7 3 8 9
>>> 2 3 4 5 6 7 8 9
>>>
>>> I have tried the following
>>> generate order = 1 if tank == 5
>>> replace order = 2 if tank== 1
>>> replace order = 3 if tank== 6
>>> replace order = 4 if tank == 2
>>> replace order = 5 if tank== 7
>>> replace order = 6 if tank== 3
>>> replace order = 7 if tank== 8
>>> replace order = 8 if tank== 9
>>> replace order = 9 if tank== 4
>>>
>>> beamplot pre_l, over(tank) ytitle("") xtitle ("Pre-spawning
>>> length (cm) ")
>>> by(sex)
>
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```