*! version 1.7 of help file 4Mar2021

help for displaygphVersion 1.51 25May2021

Title

displaygph - Utility to rapidly display or combine previously created graphs in tabbed windows

Syntax

displaygph
[pattern]
[
,
memory
gph
detail
combine[(name)]
notegphs
noaltshrink
saving(path,[replace])
findgph(path)
dropall
]

[pattern] is a template for the names of the graphs to be displayed.
The default -pattern- is "*", which means "display all graphs".

Description

displaygph rapidly displays the graphs in memory or saved
to the current or a specified folder. Each graph appears in its own tabbed window unless
the -combine- option is selected, in which case all the graphs are displayed
as thumbnails in a single tab.

displaygph is a wrapper for graph display, graph use,
graph combine and graph save.
It is useful in the situation in which the user's Stata session
has created and written to memory or disc several different graph files
and would like to recall some or all of them to display in tabbed windows.
With the saving option all the graphs in memory specified by the [pattern]
can be saved to disc with this single command.

Aternatively, displaygph with the combine(name) option
enables the user to easily create a single one-page image displaying only the
thumbnail versions of the individual graphs in memory or on disc.
Such an image can be useful as an index or menu of a set of created graphs.
The page of thumbnails might show tiny versions of as many as 20 or 30 graphs
and can itself be printed or saved.

Options

memory display the graphs currently in memory (the default)

gph display the graphs that are stored as *.gph files in the current folder
or, if findgph() is specified, in that folder.

detail list a detailed description of each graph

combine[(name)] display all the listed graphs as thumbnails in a single window.
The default name of the combined graph is "__combined". Optionally the user can specify a graph name.

notegphs is only relevant when the option combine[(name)] is also specified.
The option notegphs adds a note to the combined graph which lists the names
of the included graphs.
When the number of graphs being combined exceeds four or five, the names
of some of the graphs may be hidden to the right of the margin in the combined image.
To enable displaygph to show all the graph names in the note,
find and optionally install the user-contributed program linewrap by clicking
here.

noaltshrink is only relevant when the option combine[(name)] is also specified.
When displaygph combines graphs, by default it specifies
graph combine's altshrink option, which preserves the aspect ratios of tiny thumbnail images.
The displaygph user can suppress this behavior by specifying the option noaltshrink.

saving(path,[replace] [asis]) save all the graphs in memory to the folder specified by the path.
This option is useful if the user has previously generated named graphs but not saved them to disc.
displaygph can then display all the named graphs and, with the saving option
save them all to a specified folder. With the combine[(name)]
option specified, the saving(path,[replace] [asis]) option also saves
the combined graph. Ths suboptions replace and asis behave as described
in the help file for the graph save command.

findgph(path) instead of searching for previously saved gph files in the
current directory, which is the default, the findgph option instructs displaygph
to search at the location specified by path.

dropall clear graphs from memory and close the graph window prior to displaying
and/or combining -gph- files from the disc. Requires the option gph.

Examples

After constructing and naming a series of graphs, executing displaygph without options
simply posts all the named graphs in memory to Stata's tabbed Graph Window.

sysuse auto

histogram price, name(hist_price, replace)

scatter price mpg, name(sctr_price_mpg, replace)

displaygph

Alternatively, executing displaygph with the combine option displays the
same graphs all in a single combined image. When there are many graphs in memory,
this amounts to making a single image containing a "thumbnail" of each graph.

displaygph , combine

Author

Mead Over,
Center for Global Development, Washington, DC 20036 USA. Email:
MOver@CGDev.Org if you observe any
problems.