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

Re: st: multiple graphs

From   Daniel Stegmueller <>
Subject   Re: st: multiple graphs
Date   Sat, 14 Jun 2008 22:21:57 +0200

You can get the behavior you want (several graphs in one window using tabs) by setting the autotabgraphs option.
See - help autotabgraphs -.

I can't give you more details, since its only available on windows...


moleps islon <>:
You could write a little program to generate temporary names for your
graphs easily enough. E.g.

prog nn
syntax anything [, *]
tempfile n
loc name="G"+reverse(substr(reverse("`n'"),5,7))
`anything', name(`name') `options'

sysuse auto, clear
nn sc mpg wei
nn sc gear wei

On Sat, Jun 14, 2008 at 12:00 PM, moleps islon <> wrote:

it works. However I find the multiple graph thing rather cumbersome.
The essence is that you have to give each graph a separate name.

However I think it would be more userfriendly to have a graph
routine/window automatically giving new tabs labeled graph1...2..3..4
etc.etc in case one doesnt invoke the name option.

On Sat, Jun 14, 2008 at 5:54 PM, Martin Weiss
<> wrote:
This creates three tabs with three distinct graphs for me:

sysuse auto, clear

loc vars "price mpg weight"

foreach var of loc vars{
      hist `var', name(mygr`var', replace)

What happens when you run this code?

Zitat von moleps islon <>:

But shouldn't there be an option somewhere in stata to let me have
mutiple graphs under induvidual tabs in the graph window? Or several
graph windows?

On Sat, Jun 14, 2008 at 5:32 PM, Martin Weiss
<> wrote:

in the options to the graph, say -save(mygraph1, replace)- and possibly
-nodraw- if all you want is to -gr combine- afterwards...

Zitat von moleps islon <>:

How do I instruct stata to retain the different graphs while running a
do file? From the looks of it stata closes the graph window before
starting a new graph command. I've turned on the mutiple graphs tab in
*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index