Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

Re: st: tabplot option

From   Nick Cox <>
To   "" <>
Subject   Re: st: tabplot option
Date   Mon, 28 Oct 2013 17:57:45 +0000

-tabplot- is from SSC. Please remember to explain the source of
user-written programs.

It doesn't offer that.

Consider as an alternative.

sysuse auto
ssc inst catplot
catplot foreign rep78, percent(foreign)
catplot foreign rep78, percent(rep78)

Horizontal bars often look better than vertical bars with text angled
at 45 degrees.

As the code above shows, -catplot- is also from SSC.


On 28 October 2013 17:22, Danae Roumis <> wrote:
> Is there an option for -tabplot- to use the -by(var2)- option and output just one plot rather than have side by side plots for each value of var2?
> For example, my code,  is:
> tabplot var1 if var1 >0, by(var2, title("Title")                        ///
>                 subtitle("Subtitle", size(small)) note(""))              ///
>                 percent(var2)  xtitle("")                                                ///
>                 xlabel(, labsize(vsmall) angle(45))                             ///
>         showval(offset(0.1) format(%2.0f)) barw(.75)
> I don't actually want them to be overlaid but instead of the -by(var2)- option, I'm wondering if there is something analogous to -over(var2)- such that I can have one plot area with 2 adjacent bars representing each of the var2 categories, for each of the many var1 categories. I'm using Stata12. Any pointers much appreciated.

*   For searches and help try:

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