Statalist


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

Re: st: Maximum number of options in graph line


From   "Scott Merryman" <scott.merryman@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Maximum number of options in graph line
Date   Fri, 24 Aug 2007 07:33:16 -0500

twoway line dtosynth_10000 year, lw(medthick) lc(black))  ///
  ||  line dtosynth_???? year , lw(vthin ..)  lc(gs14 ..)  ///
  || , legend(off)


Scott

On 8/24/07, Davide Cantoni <davide.cantoni@gmail.com> wrote:
> Dear all,
>
> I am trying to draw a line graph with several plots, 65 to be precise,
> on Stata 9.2 for Mac. Is there any maximum number of options that one
> can specify in terms of lcolor() or lwidth()? My impression is that
> Stata accepts only options for up to 20 plots, because the following
> code runs as it should:
>
> twoway (line dtosynth_10000 year, lw(medthick) lc(black)) ///
> (line dtosynth_65 dtosynth_69 dtosynth_90 dtosynth_144 /// 4
>  dtosynth_177 dtosynth_197 dtosynth_253 dtosynth_300 /// 8
>  dtosynth_303 dtosynth_321 dtosynth_422 dtosynth_477 /// 12
>  dtosynth_483 dtosynth_535 dtosynth_559 dtosynth_574 /// 16
>  dtosynth_599 dtosynth_618 dtosynth_627 dtosynth_2203 year /// 20
>  , lw(vthin vthin vthin vthin vthin vthin vthin vthin vthin vthin  /// 10
>  vthin vthin vthin vthin vthin vthin vthin vthin vthin vthin) /// 20
>  lc(gs14 gs14 gs14 gs14 gs14 gs14 gs14 gs14 gs14 gs14 /// 10
>  gs14 gs14 gs14 gs14 gs14 gs14 gs14 gs14 gs14 gs14)) /// 20
>  , legend(off)
>
> [Interpretation: I want one line graph to be bold and thick, and all
> other 65 comparison units to be very thin and grey. The numbers after
> /// just help me keeping track of the number of plots]
>
> But as soon as I add one more y-variable to be plotted against year
> (let alone 45 more) and add the corresponding values for lwidth and
> lcolor, Stata does not obey my lcolor() and lwidth() options any more,
> but makes all 21 lines in different colors and standard thickness.
>
> Is there any way to avoid this, or to write the code above in a
> smarter way? Thanks for your attention,
>
> Davide
> *
> *   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index