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]

[no subject]



What bites is not your -tabplot- syntax, or so I imagine, but what it
implies. The way that -separate()- works is that a separate call to
-twoway rbar- is set up for each distinct colour and each of those is
associated with several options. Clearly I didn't try to see what the
limit really was and my implication in the help that you can have  up
to 20 distinct colours is unduly optimistic. My guess is that what
fails is the final call to -twoway-: in essence -tabplot- is just a
busy helper setting up the stage before the drama is enacted by
-twoway-, but the -twoway- syntax implied by -tabplot- can be too much
for -twoway- to handle.
Nick .
________________________________________
From: Beede, David N
Sent: Sunday, July 08, 2012 11:05 AM
To: Beede, David N; [email protected]
Subject: RE: -tabplot- and number of options limit

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