Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Query on graphing


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: Query on graphing
Date   Thu, 7 Jun 2012 09:16:54 +0100

As Dan implies, it's just a scatter plot so far as Stata is concerned.

In this case, a convenience command is -stripplot- (SSC).

clear

input date turnout
 1979 63
 1984 59
 1989 58
 1994 57
 1999 49
 2004 46
 2009 43
end

stripplot turnout , separate(date) ms(O) ///
mfcolor(green*2 green green*0.5 yellow orange red red*2) vertical ///
mla(date date date date date date date) mlabpos(9 ..) legend(off) ///
xsize(2) mlabcolor(black ..) yla(, ang(h)) ///
ytitle("") title(Turnout in European elections) ///
subtitle(% of total electorate) scheme(economist) ///
mlcolor(black ..)  mlw(*.2 ..)  ///
yla(40(5)65) xli(1, lstyle(grid))

For a plainer version, try

stripplot turnout, vertical mla(date) mlabpos(9)

Nick

On Thu, Jun 7, 2012 at 9:00 AM, Lythgoe, Dan <[email protected]> wrote:
> Amani, this code should do it, just repeat lines two and three for all of the other years:
>
> clear
> input ///
> year xvar
>        1979 1
>        1984 1
>        1989 1
>        1994 1
>        1999 1
>        2004 1
>        2009 1
> end
>
> tw (line year xvar , c(L) lcolor(gray) lwidth(1)) ///
>        (scatter year xvar if year==2009, c(L) lcolor(gray) lwidth(1) msymbol(O) msize(3) mfcolor(red) mlcolor(black) mlwidth(0.5) ///
>        mlabel(year) mlabposition(9) mlabcolor(black) mlabsize(3)) ///
>        , graphregion(color(white)) yscale(reverse)


SIYAM, Amani

> Thanks for your suggestion. I am actually interested in the plot type whether it is doable in Stata rather than the scheme.

Abhimanyu Arora

> You might want to check out the graphing schemes.
> There is actually one especially for graphs as in the Economist called -economist-.

On Thu, Jun 7, 2012 at 9:26 AM, SIYAM, Amani <[email protected]> wrote:

>> I am curious about a graph I saw in The Economist (Figure 2, in the article http://www.economist.com/node/21555927).
>>
>> Can someone tell me whether it was/can be generated by Stata?

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index