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: Plot


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: Plot
Date   Mon, 28 Mar 2011 14:24:54 +0100

Oliver and Rebecca have made this question much clearer -- and
incidentally exposed that Stata users don't all use the dialogs.

I agree with them in thinking that the "Plot 1", "Plot 2", etc.
material is entirely specific to the dialogs. The nearest equivalent I
can think of is that you could use local macros to hold particular
parts of the graph command, as in

sysuse auto
local sc "scatter mpg weight"
local lf "lfit mpg weight"
twoway `lf' || `sc'

but this seems a long way from what Max seeks.

On Mon, Mar 28, 2011 at 2:07 PM, Rebecca Pope <[email protected]> wrote:
> On Mon, Mar 28, 2011 at 7:49 AM, Oliver Jones
> <[email protected]> wrote:
>> But using the dialog box you don't have to click on "Edit" to figure out
>> what type of plot the plots are. Below the box "Plot definitions:" which
>> contains the list of plots, a line shows up telling me what kind of plot
>> e.g. plot 2 is.
>
> Oliver,
> Thanks for posting about the plot definition below the definition box.
> I don't use the dialog box often for -twoway- and I'm embarrassed to
> admit that I never noticed the text changing from the instructions to
> the definition.
>
> Max,
> Do you still need names for the plots that show up in the definitions
> box if you can see what they are below that?  I know it will still be
> cumbersome to click each individual plot to see what it contains, but
> this seems to be a bit more workable than I thought.
>
> Rebecca
>
>
>
> On Mon, Mar 28, 2011 at 7:49 AM, Oliver Jones
> <[email protected]> wrote:
>> Hi,
>> ok now I understand the problem!
>>
>> First: I don't think it is possible to give names to individual plots.
>> Second: I think so because it is not possible using the command line.
>> Third: I'm not sure about the dialog box, because I never use it.
>>
>> To illustrate what I mean, here is an example:
>>
>>
>> ******** Begin example *********
>>
>> sysuse auto
>> twoway (scatter price mpg, sort) (lfit price mpg), name(my_little_graph)
>>
>> ******** Begin example *********
>>
>> The basic structure is:
>> twoway (plot 1) (plot 2) ..., name(name_you_choose)
>>
>> That is why I believe it is not possible to assign names to plots.
>> But using the dialog box you don't have to click on "Edit" to figure out
>> what type of plot the plots are. Below the box "Plot definitions:" which
>> contains the list of plots, a line shows up telling me what kind of plot
>> e.g. plot 2 is.
>>
>> Best
>> Oliver
>>
>> Am 28.03.2011 14:16, schrieb Rebecca Pope:
>>>
>>> It's even better than that. On the "Overall" tab of the dialog box for
>>> -twoway-, there is an option for naming your graph. Or, if you want to
>>> edit the command, I recommend using the "copy command" function from
>>> the dialog box, rather than just submitting it, especially if you have
>>> a lot of data to graph. "Copy" is available in Stata 11. I can't speak
>>> to prior versions.
>>>
>>> As I read Max's question though, he's looking at his "Plots" tab and
>>> seeing the following:
>>> Plot 1
>>> Plot 2
>>> Plot 3
>>> Plot 4
>>> etc
>>>
>>> in the box labeled "Plot definitions:". But, with several plots
>>> defined, it is difficult to know what he has defined and which Plot #
>>> contains what variables. My guess is that Max wants to be able to name
>>> his plots (using auto.dta as an example):
>>> Price to Weight
>>> MPG to Weight
>>>
>>> so when he needs to enable or disable each plot, he doesn't have to
>>> click "Edit" on each plot to remind himself of how it is defined.
>>>
>>> Unfortunately, I don't know how to do this so the best I can recommend
>>> is keeping a list in a research notebook. As far as I can tell,
>>> nothing displayed with -help name_options- gives any guidance on plot
>>> names. It says "Option name() specifies the name of the graph being
>>> created." This doesn't appear to help Max, who say says in his
>>> original post that he already knows how to name the graph. I don't see
>>> any documentation of how to employ -name()- to change the displayed
>>> name of plots in the dialog box. If it exists, it appears to be
>>> undocumented. Maybe Nick or Oliver can help with that.

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