Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: two way graph, x-axis label


From   Nikolaos Pandis <npandis@yahoo.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: two way graph, x-axis label
Date   Wed, 31 Aug 2011 06:59:02 -0700 (PDT)


Dear Nick,
 
Perfect!
 
Thank you.
 
Nick


----- Original Message -----
From: Nick Cox <njcoxstata@gmail.com>
To: statalist@hsphsun2.harvard.edu
Cc: 
Sent: Wednesday, August 31, 2011 4:42 PM
Subject: Re: st: two way graph, x-axis label

Don't -encode-, -destring-.

Nick

On Wed, Aug 31, 2011 at 2:37 PM, Nikolaos Pandis <npandis@yahoo.com> wrote:

> I am trying to create a twoway line graph of var1 vs year.
>
> I had copied & pasted the dataset from excel and the year was pasted as string.
>
> I used:
>
> encode year,gen(yearno)
>
> and year is converted into a number from 1-17
>
> I would like to :
>
> twoway (line var1 yearno)
>
> but on the x-axis show the actual label of the year like 1995, 2000, 2001 etc, instead of values from 1-17.
>
*
*  For searches and help try:
*  http://www.stata.com/help.cgi?searchhttp://www.stata.com/support/statalist/faqhttp://www.ats.ucla.edu/stat/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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index