Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: SV: RE: RE: RE: RE: SV: how do I overlay two linkplot graphs?: now trying -xtline-


From   "Kim Lyngby Mikkelsen (KLM)" <[email protected]>
To   <[email protected]>
Subject   st: SV: RE: RE: RE: RE: SV: how do I overlay two linkplot graphs?: now trying -xtline-
Date   Thu, 13 Dec 2007 20:08:35 +0100

I think Nick Cox were ahead of himself, because part of what -linkplot-
does is -separate- by(`link'), so if you do not start out separate your
Score variable, and simply run Nicks codes without the -?- (ie.:
linkplot Score Character, link(GRP)), I think you get what Nick think
you want. But is this actually what you want?

Did you try the codes suggested by Spiess, Sven Oliver? 
That seems to me to be what you want.

If you want to add more lines to the same graph this way, try:

line score cha if grp==1 & task ==1 || line score cha if grp==1 & task
==2 || line score cha if grp==2 & task ==1 || line score cha if grp==2 &
task ==2 

the above command will draw 4 lines; 2 lines for grp==1, and 2 lines for
grp==2 

You can increase the numbers of lines drawn by repeating the command
intersecting -||- between separate line commands, but you graph will
start looking messy with more that 8 lines or so.

Instead of the -line- command you might want to use -tw connected- or
the -scatter- command with the -connect line- option. Try it out.

Regards Kim
_______________________________________________________

Nick Cox
========================

You're correct. Sorry about that example. I need to
fix -linkplot- so that it behaves as I want in that situation. 

Spiess, Sven Oliver

Doesn't work with the ?-wildcard for me. ("no observations")
I can replace it with the respective 1 or 2 but of course that won't
overlay the graphs.
What am I missing?

Nick Cox
 
> This is a lot clearer. In addition to direct attacks using -twoway-
> explicitly,
> 
> separate Score, by(Task)
> 
> then
> 
> linkplot Score? Character, link(GRP)
> 
> but that would be a mess.
> 
> To get a slide show, assuming prior use of -separate- as above,
> 
> forval i = 1/203 {
> 	linkplot Score? Character if GRP == `i', link(GRP) asyvars
> ///	subtitle(GRP `i')
> 	more
> }
> 

*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index