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: Categorical axis labels with -graph dot- and -by-


From   Scott Merryman <scott.merryman@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Categorical axis labels with -graph dot- and -by-
Date   Wed, 12 Sep 2012 19:36:06 -0500

You can use the graph editor to hide the axis labels on the third graph:

sysuse nlsw88, clear
graph dot wage, over(occ )  by(race, rows(2) holes(2))
gr_edit .plotregion1.grpaxis[3].draw_view.setstyle, style(no)
gr_edit .plotregion1.plotregion1[1].GraphEdit,
cmd(_set_graphstyle_remake supgroup_gap 20pct)


Scott


On Wed, Sep 12, 2012 at 10:03 AM, David W. Harless <dwharles@vcu.edu> wrote:
> I'm having a problem getting exactly the graph I want with -graph dot- and
> the -by- option.  Here is an example using the nlsw88 data set:
>
> sysuse nlsw88, clear
> graph dot wage, over(occ ) by(race, rows(2) holes(2))
>
> I'd like to have the categorical axis labels (the occupations) shown only
> once in each row (not be repeated as they are in the example graph for the
> "other" race).
>
> I haven't found a way to do this in the documentation for -graph dot- or
> -graph hbar-. I have read the manual's advice about use of -over- rather
> than -by- with dot or hbar graphs, but in my situation -by- looks to be
> right among other reasons because I have two -over- categories and two yvars
> I wish to plot.
>
> Thank you,
> Dave Harless
>
*
*   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