Home  /  Products  /  Stata 9  /  User interface

This page contains only historical information and is not about the current release of Stata. Please see our Stata 18 page for information on the current version of Stata.

ORDER STATA
ORDER STATA

Graphics and GUI

Stata’s enhanced GUI includes multiple Do-file Editors, multiple Viewers, multiple Graph windows, and multiple windowing preferences. Under Windows, you have complete flexibility in positioning windows—you can even stack windows to create tabbed all windows or set windows to autohide.

Seven new plot types are now provided for handling paired-coordinate data, and two new types are provided for time-series and panel data.


User interface

Stata 9 has a number of new features in the graphical user interface (GUI) that are shared across all platforms, such as multiple Viewer and Graph windows. There are also some significant improvements that affect only Windows, such as dockable windows. Most GUI features are documented in the Getting Started manual.

  • New versions of Stata are available:

    • Stata for Intel Itanium-based PCs running 64-bit Windows.

    • Stata for x86-64 standard systems, including those based on AMD Opteron chips, Athlon-64 chips, and Intel Xeon emt64 chips, running 64-bit Windows.

    • Stata for Intel Itanium-based PCs running 64-bit Linux.

    • Stata for x86-64 standard systems running 64-bit Linux.

  • Stata for Windows and Stata for Macintosh now have automatic update checking (nothing is ever downloaded without your confirmation). The first time you start Stata and every 7th day afterward, you will be prompted whether to check for updates.

    To control how often you are prompted, or to turn the feature off, select Prefs > General Preferences, and select Internet; or you can type set update_interval # or set update_query off at the Stata prompt; see [R] update .

  • Stata now allows multiple Viewer windows so that you can, for example, simultaneously view the help for several commands and the results from several logs or search queries.

    There are several ways to open another Viewer window.

    • While viewing something in a Viewer, hold down the shift key, and click on any link. A new Viewer will appear displaying the contents of the link.

    • Right-click on the link, and choose Open Link in New Viewer. That does the same thing.

    • Click with the middle mouse button on the link. That also does the same thing.

    • Right-click anywhere in an open Viewer, and choose Open New Viewer. This will open a new Viewer displaying help contents.

    See 5. Using the Viewer in the Getting Started manual.

  • The Viewer also has the following new features:

    • It supports links within documents, including help files. You will see this feature used extensively in Stata’s online help.

    • It has the ability to search for text within the window. Click on the find icon that looks like a pair of binoculars at the top right of the Viewer.

    • It now remembers its position in the document when you click Refresh.

    In addition, both the Viewer and Results windows no longer underline links when they are displayed on a white background. You can change this by selecting Prefs > General Preferences.

  • Stata now allows multiple Graph windows. The existing name() option of graph now creates a named graph and displays it in its own window of the same name.

    Graph-management commands do what you would expect with the named windows; graph drop drops the graph and closes its window; graph rename renames both the graph and its window; and so on. Note that closing a Graph window does not delete the underlying graph and the graph can be redisplayed with graph display.

  • The Window menu now supports multiple Viewer and Graph windows:

    • You can switch to specific Viewers or Graphs from this menu.

    • Menu item Window > Viewer > Close All Viewers closes the Viewers.

    • Menu item Window Graph > Close All Graphs closes the graphs.

  • There are a number of enhancements to the toolbar:

    • The Open button now has a menu that shows recently opened datasets, and it allows you to reopen those datasets with a click. This even includes datasets loaded over the web from File > Example Datasets... or with webuse.

    • The Print button has a new menu that lets you select the window to print.

    • The Viewer button lets you switch to any Viewer or close all Viewers.

    • The Graph button lets you switch to any Graph or close all Graphs.

    • The Do-file Editor button lets you switch to any Do-file Editor (Windows and Macintosh).

  • A number of new features and improvements are available under the File menu:

    • Recently opened datasets can now be reopened by selecting File > Open Recent and recently opened do-files or ado-files can likewise be reopened from the Do-file Editor’s File > Open Recent.

    • File > Print lets you select the window to print.

    • All the datasets shipped with Stata and all the datasets used in the examples in the manuals can be browsed and loaded by selecting File > Example Datasets....

  • Stata now allows multiple Do-file editors under Windows and Macintosh. See 14. Using the Do-file Editor in the Getting Started manual.

  • Contextual menus for common tasks, such as setting preferences, copying to the clipboard, and printing, are now available in all windows; right-click in the window to access them.

  • You can now define multiple windowing preferences and switch easily among those preferences. For example, you might use small fonts and large Review and Variables windows for your normal work but use large fonts with hidden Review and Variables windows for presentation. Access this new feature by selecting Prefs > Manage Preferences.

  • The Data Editor has several enhancements:

    • The contents of string variables and variables with value labels are now shown in different colors so that they can be easily distinguished.

    • Variables with value labels can now be displayed as either the values of the variables or the labels.

    • For variables with value labels, you now may change the value of a variable by right-clicking on the cell and selecting Select Value from Value Label. You may then select a value and label from a list.

    • You may now associate an existing value label with a variable by right-clicking on the variable’s column and selecting a value label from Assign Value Label to Variable.

    • You may now define or modify value labels from within the Data Editor. Right-click in the editor, and select Define/Modify Value Labels....

    • You can now access and modify the preferences for the Data Editor by right-clicking in the editor and selecting Preferences....

  • Dialogs have new features:

    • Keyboard shortcuts for Copy, Paste, and Cut now work.

    • Anywhere that you need to select a variable or variables for a varlist, you may now select those variables from a drop-down list (Windows and Macintosh).

    • The new copy button will copy the command built by the dialog to the clipboard. The button appears just right of the refresh button at the bottom left of each dialog. It works just like Submit, but rather than executing the command, the command is pasted.

    • Pressing the Return key now works the same as clicking OK; pressing Shift+Returt is the same as clicking Submit. Pressing the Escape key works the same as clicking Cancel.

    • Pressing the space bar when the keyboard focus is on a radio button works the same as clicking on the radio button.

    • Keyboard arrow keys now work with dialog spinner controls.

    • Estimation-command dialogs are laid out better, with the model specification always appearing on the Model tab. You can also now select standard error (SE) types with a single click in the SE/Robust tab (which includes bootstrap and jackknife SEs as options for most estimators).

    • The twoway graph dialog boxes are laid out better, with easier selection of the plottype (scatter, line, range bar, etc.) and the addition of the new paired-coordinate time-series plottypes.

    In addition, the manual and online documentation does a better job of describing the options and controls available on a dialog. The option entries in the manual and online are grouped into categories that match the tabs on the dialog.

  • Stata for Windows has vastly improved flexibility for managing your work environment:

    • Most windows—the dockable ones—can now be docked with the main Stata window or with each other. By dragging a dockable window over another dockable window, you may create either a single-paned window, containing both the original windows with a separator in between or a single window with tabs for each. The Viewer, Command, Review, and Variables windows are all dockable.

      In addition, any of these windows can either be attached (docked) to the main Stata window or detached and made free floating. Each also has a pin icon in the title bar that makes the window always shown, makes it roll up into its title bar when undocked, or makes it shown only as a tab when docked. For an overview of these features, see 4. The Stata user interface in the Getting Started manual.

    • Most windows can be moved outside the main Stata window. These include the Graph, Viewer, Browse, and Edit windows and include all dialogs.

    • The toolbar can be detached and repositioned.

    • Double-clicking the Results window, when it is docked, merges it with the main Stata window as the primary document. This saves some screen real estate, and we suggest you try it. Double-click again to undo it.

    • A number of new window preferences under the Windowing tab on Prefs > General Preferences... let you control how windows behave and how they dock. You can lock paned windows so that they cannot be resized, turn on or off docking, turn on or off the docking guides, make all windows floating, make the contents of Viewers persistent so that they maintain their contents between Stata sessions, and even turn off all the advanced windowing features to lock your current settings.

    • As with Stata on all other platforms, you can now save multiple windowing preferences and choose the one most appropriate for what you are doing, e.g., working at home, giving a presentation, etc.

    If you are fond of the way Stata for Windows worked prior to Stata 9, or if you like to maximize your Stata window, we suggest you select from the menu Prefs > Manage Preferences > Load Preferences > Maximized. Even so, we recommend you try using the new layout without maximizing the Stata window.

  • You may now copy the contents of the Review window to the Clipboard. Right-click in the window to access the contextual menu.

  • help now displays in the Viewer window; New command chelp displays in the Results window. help also has two new options:

    • nonew displays help in the topmost viewer rather than in a new one.

    • name(viewername) displays the help in the specified viewer. If that name does not exist, a new viewer will be created with that name.

  • You may now define and access notes for a variable by right-clicking on the variable name in the Variables window. Right-clicking on an empty space allows you to define and access notes for the dataset.

  • The Do-file Editor has a new SMCL preview button on its toolbar that displays the current file in the Viewer as rendered SMCL.

  • (Windows and Macintosh) You can now copy selected text as an HTML table using Edit > Copy Table as HTML.

  • (Unix) The minimize keyboard shortcut <Ctrl>-m has been added to all windows.

  • (Unix) You can now use the Window menu’s keyboard shortcuts from any window.

  • (Macintosh) You can now increase or decrease the font size in a window by pressing Apple + and Apple -.

  • (Macintosh) The ability to undo or redo multiple actions has been added to the Do-file editor.

  • (Macintosh) You can now have Stata automatically bring all windows to the front when it is active. The setting is under Prefs > General Preferences....

  • (Macintosh) You can now have Stata automatically snap windows to the edge of the main Stata window or to the edge of the screen when you move or resize them. The setting is under Prefs > General Preferences....

  • (Macintosh) You can move all of Stata’s currently open windows simultaneously by holding down the Control key while dragging one of the windows. This will also bring all of Stata’s open windows to the foreground.

  • (Macintosh) The toolbar may be a floating window or may be anchored to the menubar. The advantage of making the toolbar float is that it takes up less room on the screen and can be moved. Access this feature using Window > Toolbar.

The UCLA Academic Technology Services website has some excellent tutorials showing how to use the new GUI features:

Graphics

  • Stata now allows multiple Graph windows. The existing name() option now creates a named graph and displays it in its own window. See User interface below.

  • New command sunflower draws sunflower density-distribution plots; see [R] sunflower.

  • graph twoway has two new plottypes for plotting time-series data, tsline and tsrline: see [TS] tsline and [G] graph twoway tsline.

  • Graphs have better axis labels when graphing dates.

  • graph twoway has seven new options that are useful when plotting time-formatted variables: tscale(), tlabel(), tmlabel(), ttick(), tmtick(), tline(), and ttext(); see [G] axis options, [G] added line options, and [G] added text options.

  • graph twoway has seven new plottypes for plotting paired-coordinate data—data with 4 variables, where two variables form a starting x–y point and the other two variables form an ending x–y point. The new plottypes are

    plottype Description
    twoway pcarrow plots a directional arrow for each observation’s paired coordinates
    twoway pcbarrow plots a two-headed arrow for each observation’s paired coordinates
    twoway pcspike plots a line or spike for each observation
    twoway pccapsym plots a line with symbols at each end for each observation
    twoway pcscatter plots both pairs of x–y variables as a scatter, using a common style
    twoway pci immediate form of paired coordinate plots; plots the specified coordinate pairs
    twoway pcarrowi immediate form of pcarrow
    See [G] graph twoway pcarrow, [G] graph twoway pcbarrow, [G] graph twoway pcspike, [G] graph twoway pcapsym, [G] graph twoway pcscatter, [G] graph twoway pci, and [G] graph twoway pcarrowi.

  • graph twoway, graph bar, graph box, and graph dot have new option aspectratio() that controls the aspect ratio of a plot region; see [G] aspect option.

  • graph display has new option scale() that allows all text, symbols, and line widths to be rescaled when a graph is redisplayed; see [G] graph display.

  • graph export supports new export formats TIFF, PNG (portable network graphics), and TIFF previews for EPS files. See [G] graph export.

  • New option preview() with graph export embeds a preview of the graph so that it can be viewed in publishing applications; see [G] graph export and [G] eps options.

  • graph now supports CMYK output to Postscript and Encapsulated Postscript (EPS) files. CMYK stands for Cyan-Magenta-Yellow-blacK and is popular in the printing industry. See [G] graph export and [G] ps_options.

    palette color has the new option cmyk, specifying that color values be reported in CMYK; see [G] palette.

  • graph box can now label outside values using option marker(); see [G] graph box and [G] marker label options.

  • graph bar has new options over(, reverse) and yvaroptions(reverse) to specify that the categorical scale be reversed, to run from maximum to minimum; see [G] graph bar.

  • graph twoway has new option pcycle() that specifies the maximum number of plots that may appear on a graph before the pstyles recycle to the first style; see [G] advanced options.

  • graph combine has new option altshrink that provides alternate sizing of the text, markers, line thickness, and line patterns on the individual combined graphs; see [G] graph combine.

  • graph has improved control over whether the largest and smallest possible grid lines are drawn. This control is provided by improving the actions of the existing suboptions [no]gmin and [no] gmax; see [G] axis label options.

  • graph bar, graph dot, graph box, and graph pie have new option allcategories specifying that the legend include all over() groups, not just groups in the sample specified by if and in. See, for example, [G] graph bar.

  • graph and all other commands that draw graphs have new options for changing the color of objects and changing the appearance of lines:

    • Options lstyle(), lcolor(), lwidth(), and lpattern() are now accepted anywhere cl attribute and the bl attribute were allowed. Specifically, the new options replace the following original options:

      new options original options
      lstyle() clstyle(), blstyle()
      lcolor() clcolor(), blcolor()
      lwidth() clwidth(), blwidth()
      lpattern() clpattern(), blpattern()
      The new options can be applied to all lines—lines connecting points, lines outlining bars, lines around text boxes, etc. The original option names continue to work but are undocumented.

    • New option fcolor() changes area fill colors and can be used anywhere bfcolor() or afcolor() were allowed. bfcolor() and afcolor() continue to work but are undocumented.

    • New option color(arg) sets all of a plot’s colors; it is the equivalent of specifying mcolor(arg), lcolor(arg), and fcolor(arg).

  • The syntax of the ROC curve commands is now consistent across all the ROC commands—roctab, roccomp, rocgold, and rocplot—with some new options added and some old options changing names. The original options continue to work but are undocumented. See [R] roctab and [R] rocfit postestimation.

  • Existing commands fracplot and lowess have new option lineopts() that replaces the confusingly named rlopts().

  • Option plot(), available on many graph commands, has been renamed addplot(). addplot() allows twoway plots, such as scatters, lines, or function plots to be added to most statistical graph commands.

  • Command kdensity has new option epan2 providing an alternate Epanechnikov kernel; see [R] kdensity. Accordingly, sts graph and stcurve now allow kernel(epan2) for specifying this new kernel.

  • The base margin for histogram graphs is now zero.