-------------- help for gc --------------Graph Carousel --------------
Usage 1: Creating Graphs for the Carousel . gc <graph command>
Usage 2: Showing Graph Carousel
. gc
Other Utilities
Clear our carousel . gc clear
Rebuild carousel . gc rebuild
Using Graph Carousel
Graph Carousel is a wrapper program that allows you to create graphs either at the command line or in a .do file and then view the graphs afterward using a pushbutton carousel graph viewer.
You add graphs to the carousel by typing gc followed by any Stata command that creates a graph (e.g. graph, scatter, histogram). For example, below we will read in the "hsb2" data file and add three graphs to the carousel.
. use https://stats.idre.ucla.edu/stat/stata/notes/hsb2 . gc scatter read write . gc scatter read math . gc scatter read science
We can then view them like this.
. gc
and we are shown the first graph (scatter read write) and are shown a next and previous button to rotate among the graphs.
If you wish to clear out the carousel, you can type
. gc clear
This is useful if you use gc in a .do file, then you may wish to start your .do file with the gc clear command.
If you have quit Stata, and later start Stata, you can use the gc rebuild command to rebuild the carousel from where you last left it.
Details
By default, the graphs are stored in the temporary directory used by Stata. After you run gc, it creates a global macro variable called gc_tempdir that stores the location of where the files will be stored. Before you invoke gc you could assign this global macro variable to a directory of your choosing and that directory would be used, e.g.
. gc clear . global gc_tempdir c:mygraphs . gc scatter read write . gc scatter read math . gc scatter read science
Note the temporary directory must be followed by a slash (or backslash).
It is not recommended that you change the temporary directory after you have made one or more graphs without issueing a gc clear command. This will probably confuse gc and lead to unpredictable behavior.
If you have comments or suggestions, please email Michael Mitchell at mnmatucla.edu .
Author ------
Michael N. Mitchell Statistical Computing Group UCLA, Academic Technology Services mnmatucla.edu