Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Post-editing of graphs by code?


From   "Tobias Pfaff" <tobiaspfaff@uni-muenster.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Post-editing of graphs by code?
Date   Thu, 24 Jul 2008 14:45:46 +0200

Thanks Scott! I hadn't downloaded all the Stata 10 updates and was thus not
aware of the Graph Recorder.

The code I was looking for is hidden in the .grec files. In my do-file, I
can now remove the unwanted notes from the combined graph using code. This
avoids opening the graph editor and using the cumbersome point-and-click
method:

gr_edit .plotregion1.graph1.note.draw_view.setstyle, style(no)
gr_edit .plotregion1.graph2.note.draw_view.setstyle, style(no)
gr_edit .plotregion1.graph3.note.draw_view.setstyle, style(no)

I don't really get why Stata doesn't provide documentation for this
graph-editing code. In my opinion, this gives Stata the ultimate flexibility
for creating and editing graphs. The -graph addplot- was unfortunately too
restricted for my needs. And the graph recorder is also not as flexible as
coding can be.

Cheers,
Tobias


-----Ursprüngliche Nachricht-----
Date: Wed, 23 Jul 2008 08:55:52 -0500
From: "Scott Merryman" <scott.merryman@gmail.com>
Subject: Re: st: Post-editing of graphs by code?

Why not use the Graph Recorder and then use the -play()- option to
replicate the graphs?

Michael Mitchell's "A Visual Guide to Stata Graphics, 2nd ed.", has an
great chapter on using the Graph Editor. See:

http://www.stata.com/bookstore/vgsg.html


You could also use -graph addplot- to perform some editing as well:

. scatter mpg price, name(gr1, replace)

. graph addplot, title(foo)

Scott


*
*   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   |   What's new   |   Site index