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: Access to commands for alterations made using Graphics Gditor


From   "Paul O'Brien" <[email protected]>
To   [email protected]
Subject   Re: st: Access to commands for alterations made using Graphics Gditor
Date   Mon, 20 Sep 2010 20:54:38 +0100

the best description of this was sent to me by Luis Armando Galvis off list (thanks). he pointed me to this page: http://www.survey-design.com.au/tips.html

as it is buried in the page i have copied it here:
=============
> Getting Stata's Graph editor commands into Stata graphs
> Stata has a great graph editor. However, after you have modified your graph the editor will not produce the normal Stata code for this graph. However, it is possible to retrieve the editing commands if they have been recorded using the Stata graph editor recorder, adding gr_edit at the start of each editor line and then adding this to the initial graph code. Now you have the code to reproduce the graph.
> 
> Example:
> Assume that you have run the following
> sysuse auto, clear
> histogram mpg
> Then click on the Start Graph Editor icon and pressed the Start recording icon. Then altered the color of the histogram bins. Then stop the recorder and saved the record on the hard disk with a suitable name and path. Then opened the record (just saved) in Stata's do editor.
> the line:
> plotregion1.plot1.style.editstyle area(shadestyle(color(gs7))) editcopy
> was retreived and gr_edit added to the from of this.
> 
> the complete file would look like:
> sysuse auto, clear
> histogram mpg
> gr_edit plotregion1.plot1.style.editstyle area(shadestyle(color(gs7))) editcopy
> 
> this is run and will produce the original graph complete with the edit.
> 
> Alternatively you could save the recording and include it as follows:
> sysuse auto, clear
> histogram mpg, play(hist1) //hist1 is the name of the recording
> 
> Also see:
> http://www.stata.com/statalist/archive/2008-07/msg00932.html
> help graph play 
==================

now, the question is how to translate this line:

gr_edit plotregion1.plot1.style.editstyle area(shadestyle(color(gs7))) editcopy

into a command. 

this is a very simple one, changing colour. are there general rules?

paul



On 20 Sep 2010, at 16:37, Paul O'Brien wrote:

> i would love to be able to inspect, and later use, the commands issued in the Graphics Editor.
> 
> i know i can record the changes, but i want to see the commands.
> 
> is this possible?
> 
> paul
> 
> -------------------------------
> Dr Paul O'Brien
> Raymede Clinic
> Westside Contraceptive Services
> Central London Community Healthcare
> Exmoor St
> London
> W10 6DZ
> UK
> +44 (0)20 8962 4450
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> *
> *   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/

-------------------------------
Dr Paul O'Brien
Raymede Clinic
Westside Contraceptive Services
Central London Community Healthcare
Exmoor St
London
W10 6DZ
UK
+44 (0)20 8962 4450










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