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]

st: RE: -tabplot- and number of options limit


From   "Beede, David N" <[email protected]>
To   "Beede, David N" <[email protected]>, "[email protected]" <[email protected]>
Subject   st: RE: -tabplot- and number of options limit
Date   Sun, 8 Jul 2012 11:05:32 -0400

Yes, Nick, that was exactly it - originally I intended to give each industry
its own color and then abandoned that idea, but I forgot to drop the -separate()- 
option.  When I did drop -separate()-, -tabplot- worked for all 20 bars (now all with the same color).  
Thank you for your insight into the problem. 

Still - notwithstanding the silliness of separate colors for each bar - I'm curious 
about why -tabplot- ran up against the option limit, given that the "limitless option" option was
used in the ado file for -tabplot-.

For what it's worth, here is the exact syntax that hit the limit:

   local i 1
   local barcolorlist ""
   foreach mcolor in teal blue bluishgray brown cranberry cyan dkgreen dknavy ///
      dkorange erose emerald forest_green gold gray green khaki lavender lime ltblue ltbluishgray {
       local barcolorpiece " bar`i'(color(`mcolor'))"
       local barcolorlist `barcolorlist'`barcolorpiece' 
    local ++i
   } 
    tabplot speed`z'`x' categnew if 1 <= categnew & categnew <= 20  [iw=speedfreq], ///
        xscale(alt) percent(categnew) separate(categnew) ///
     showval yscale(reverse) ///
      `barcolorlist' ///
     subtitle("") ///
     ytitle("") ylabel(, labsize(vsmall)) yscale(noline)  ///
     xtitle("") xlabel(, labsize(vsmall)) xscale(noline)  /// 
 graphregion(color(white)) plotregion(color(white)) graphregion(icolor(white)) plotregion(icolor(white))


Note that 1 <= categnew & categnew <= 13 works but 1 <= categnew & categnew <= 14 (and higher) hits the option limit.

And I forgot to mention that -tabplot- is from SSC - sorry about that.

Thanks,
David


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