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]

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


From   Scott Merryman <[email protected]>
To   [email protected]
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
<[email protected]> 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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index