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 at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: axis label


From   Scott Merryman <scott.merryman@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: axis label
Date   Wed, 27 Oct 2010 09:24:40 -0500

sysuse auto, clear
twoway fpfit price mpg ||        ///
      fpfit trunk mpg, yaxis(2) ///
      by(foreign, r1title(trunk))

Thanks to Maarten for providing a reproducible example.

Scott


On Wed, Oct 27, 2010 at 9:13 AM, Maarten buis <maartenbuis@yahoo.co.uk> wrote:
>
> --- On Wed, 27/10/10, Fred Dzanku wrote:
>> when I try plotting the following graph adding the "by"
>> option the second y-axis label never appears.
>> What am I doing wrong?
>>
>> ----------------------------------------------
>> twoway fpfit povgap  aglabprw [pw=hwt],             ///
>>        c(l) lwidth(medthick) lpattern("solid")   || ///
>>        fpfit povsev  aglabprw [pw=hwt],  c(l)       ///
>>        lwidth(medthick) lpattern("longdash")        ///
>>        yaxis(2) xtitle("{bf:Output}")               ///
>>        ytitle("{bf:Income}")                        ///
>>        ytitle("{bf:All}", axis(2))                  ///
>>        legend(label(1 "{bf:my game}")               ///
>>               label(2 "{bf:his game}"))             ///
>>        by(zone, row(1))
>
>
> I see what you mean. Here is an example of this phenomenon that
> everybody can reproduce:
>
> *------------ begin example ----------------
> sysuse auto, clear
> twoway fpfit price mpg ||        ///
>       fpfit trunk mpg, yaxis(2) ///
>       by(foreign) ytitle("trunk", axis(2))
> *------------- end example -----------------
>
> This is not an answer, but it usually helps potential answerers to
> have an example that reproduces the problem.
>
> Hope this helps,
> Maarten
>

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