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 on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: Graph editor: Change order of subgraphs in bygraph ?


From   Scott Merryman <scott.merryman@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Graph editor: Change order of subgraphs in bygraph ?
Date   Wed, 17 Aug 2011 08:13:44 -0500

This appears to work in swithing the location of graph 4 with graph 1:

sysuse sp500,clear
xtile g= date, n(4)
twoway bar change date , by(g,  rescale  ) xlabel(, labsize(*.7))
graph save Graph "C:\Documents and
Settings\scott.merryman\Desktop\Graph.gph",replace

Then open up the Graph.gph file in an editor.

Edit the lines 447-451 that start with __NOLOG__:

__NOLOG__ .graphs[1] =.__Map.K820a880.ref
__NOLOG__ .graphs[2] =.__Map.K82de008.ref
__NOLOG__ .graphs[3] =.__Map.K8338df8.ref
__NOLOG__ .graphs[4] =.__Map.K8392de0.ref

to

__NOLOG__ .graphs[4] =.__Map.K820a880.ref
__NOLOG__ .graphs[2] =.__Map.K82de008.ref
__NOLOG__ .graphs[3] =.__Map.K8338df8.ref
__NOLOG__ .graphs[1] =.__Map.K8392de0.ref

save the file as Graph_new.gph and open the file in Stata

graph use "C:\Documents and Settings\scott.merryman\Desktop\Graph_new.gph"

Scott


On Wed, Aug 17, 2011 at 4:36 AM, Jesper Lindhardsen
<JESLIN01@geh.regionh.dk> wrote:
> Hi Listers,
>
> I've been sent a graph (.gph format created with Stata 11) consisting of 4 subgraphs (a twoway bar graph created with byoptions on subcat with 4 categories). Unfortunately, I need to change the order of appearance - not just insert holes or render down instead of across. I cannot find an option to do this in the graph editor. Am I missing something or do I have to ask the sender to change the underlying categry coding ??
>
> Using Stata version 11.1 on windows XP.
>
> Best regards,
> Jesper

*
*   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