You can save the graph in a variety of standard image formats using graph export: gph file but other programs won't be able to use it. If you just click the save button on the graph window, the graph will be saved as a Stata. If your instructor asks you to put your graph in a Word document, right-click on the graph and choose Copy, then open your Word document and paste it in the proper location. If you're working in the SSCC computer lab you'll need to use GoPrint to pay for your printing. If your instructor asks you to print the graph and hand in the paper copy, click the button that looks like a printer at the top of the graph. If this were a homework assignment, your next task would be to get this graph to your instructor. The histogram command is discussed in Histograms. The options used tell Stata that educ is a discrete variable and thus the histogram should have a bin for each value, and that the y-axis should be labeled with percentages. This will create a histogram of the educ (years of education) variable. The answer will depend on what your instructor asks you to turn in.Īs an example, go to the U:\SFS folder you created in Managing Stata Files and create a new do file called usegraphs.do as described in Doing Your Work Using Do Files.
#Histogram stata how to
We'll talk about how to create various graphs in the statistical sections of Stata for Students, but in this article we'll discuss what to do with a graph once you've created it. If you are new to Stata we strongly recommend reading all the articles in the Stata Basics section. This article is part of the Stata for Students series.