Knowledge Base – Statistica Graph Customization
What types of graph customizations are available in STATISTICA?
Various graph customization facilities are available when a graph window is active (i.e., after a graph has been created). There are two major types of graph customizations:
- Interactive graph customization. The customization options in STATISTICA graphics include hundreds of features and tools that can be used to adjust every detail of the display and associated data processing. Options are arranged in a hierarchical manner. Those used most often are accessible directly via shortcut menus by right-clicking on the respective element of the graph. A complete set of available features for any given graph are available in the Graph Options dialog, accessible by double-clicking in the graph.
- Permanent settings and automation options. The initial settings of graph features can be easily adjusted so that the default appearance and behavior of STATISTICA graphs will match your specific needs and/or will require very little intervention on your part. Four different ways to make these adjustments are via (1) the Options dialog, (2) Graph Styles, (3) User-defined graphs, and (4) STATISTICA Visual Basic.
What is the Options dialog?
Perhaps the most straightforward way to adjust the default appearance of graphs is by accessing the Graphs Display and Graphs Settings options panes of the Options dialog (accessible by selecting Options from the Tools menu).
- The Graphs Display options pane contains options to change the default color and size of various graph objects (e.g., markers, lines, areas, surface colors):
- The Graphs Settings options pane contains options to set defaults for the general appearance of the graph (e.g., fitted functions, axis proportions, document styles):
Most commonly used settings can be easily adjusted here, and the results will be reflected in the default styles that will be used by the system, and as such, they will be automatically saved in the STATISTICA configuration file (e.g., different settings can be used for different projects).
What are User-Defined Graphs?
New types of graphs can be defined in a variety of ways and can be added to the menus, dialogs, or toolbars. If a custom graph that you intend to use repeatedly is not built from the starting point, but is based on one of the Graphs menu graphs and is produced by some combination of the existing graph customization options, you can create a customized graph. It can be added to the Graphs menu as a new type of graph by clicking the Add As User-defined Graph to Menu button on the Options 2 tab of the graph specification dialog. All user-defined graph specifications will be saved automatically in the STATISTICA configuration file (e.g., different sets of custom graphs can be used for different projects). For further details, see the documentation for the Configurations options pane of the Options dialog.
How can I use STATISTICA Visual Basic to customize graphs?
There are no limits to how customized your STATISTICA custom graphs can be, because STATISTICA Visual Basic (with all its custom drawing tools and library of graphics procedures) can be used to produce virtually any type of graphics. The custom developed displays or multimedia output can be assigned to STATISTICA toolbars, menus, or dialogs and become a permanent part of “your” STATISTICA application.
Can I record STATISTICA Visual Basic macros for graphs?
Yes, macro recording enables you to access programmatically almost every aspect and virtually every detail of the functionality of the STATISTICA. Even the most complex graphs can be recorded into STATISTICA Visual Basic (SVB) macro programs.
For example, suppose you create a line plot and want to change the line color and thickness. Open the Graph Options dialog, and then modify the line options in the Plot General options pane. Select the Record Macro check box at the bottom of the Graph Options dialog, and click the OK button to generate a macro containing the specific changes.
What is the Graph Options dialog?
The Graph Options dialog contains nodes that address all of the relevant customizable features for a particular graph. The nodes are grouped in clusters containing logically related items. The options in the Graph Options dialog are an all-inclusive “superset” of options accessed by double-clicking specific graph features.
Access the Graph Options dialog directly by selecting Graph Options from the graph Format menu, or by double-clicking the background (e.g., the area outside the axes) of a graph, or by selecting Graph Properties (Graph Options) from any graph shortcut menu.
How do I add a new plot to an existing graph?
Click the Add new plot button in the Plot: General options pane of the Graph Options dialog (accessible from the Format menu). The New plot(s) dialog is displayed in which you can specify the plot to be added. You can also add a new plot directly to the Graph Data Editor.
How can I adjust the margins of a graph?
STATISTICA has two types of graph margins:
- Margins within the graph area. Click the Set graph area button on the Graph Tools toolbar to adjust the space between the edge of the plotting area (i.e., the borders of the graph window) and any graph components or custom graphic objects. This can be accomplished by clicking the Set Graph Area button and either 1) dragging the resizing squares that appear around the edges of the graph window or 2) drawing a rectangle in the place where you want the graph to be.
- Printout margins. The printout margins (the width of the distance between the edge of the paper and the beginning of the graph area) can be adjusted in the Print Preview dialog (accessed from the File menu).
How can I change the proportions of the Graph window?
Via the Document Size and Scaling dialog (accessible by clicking the Graph Actual Size/Scaling button on the toolbar) to change the current graph’s aspect ratio (i.e., the ratio of its vertical to horizontal dimensions). Note that the global default graph aspect ratio can be modified in the Graphs: Settings options pane of the Options dialog (accessible via the Tools menu).
How do I produce sequences of graphs from lists of variables?
Most of the graph specification dialogs accessible from the Graphs menu allow you to select lists of variables in instances where a single variable is sufficient to define a graph. When such a list of variables is specified, STATISTICA cycles through the list and produces one graph for each variable (e.g., a histogram or a line plot).
“Cascades” of graphs requested from output dialogs.
Most of the output (results) dialogs in those statistical procedures that process lists of variables allow you to generate “cascades” of graphs for each (or each combination) of the variables in the current list. For example, such graphs can be produced from descriptive statistics, correlations, frequencies, cross-tabulations, breakdowns, and other procedures.
How do I specify properties for point markers?
Controls for modifying point markers for the various plots are located on the General dialog accessible by right-clicking on a point marker and selecting General Plot Options from the shortcut menu. You can also access these controls in the Plot: General options pane of the Graph Options dialog (accessible via the Format menu). Note that point markers (and fonts) can be increased or decreased using the Increase Font or Decrease Font toolbar buttons, respectively.
How do I specify area properties?
The quickest way to modify area properties (e.g., patterns, colors, etc.) is to right-click on the area you want to modify, and select Pattern from the shortcut menu to display the Area Properties dialog. Use the options in this dialog to change the area color, pattern, and style in the graph. The default patterns, colors, and modes of display of consecutive plots and other components of the graphs are determined by the current selections in the Graphs: Display options pane of the Options dialog (accessible from the Tools menu). Note that the Area Properties dialog can also be accessed from the Plot: General and Plot: Bars options panes of the Graph Options dialog.
After specifying a pattern in the Area pattern options, you can select a different color for the area Foreground and Background with these options.
Instead of specifying area patterns and color using the options described above, you can select the style you want to use for the area from the Area style box on the toolbar.
How do I specify line properties?
The quickest way to modify line properties (e.g., size, colors, etc.) is to right-click on the line you want to modify, and select Pattern from the shortcut menu to display the Line Properties dialog. Use the options in this dialog to change the line width, pattern, and color in the graph. The default patterns, colors, and modes of display of consecutive plots and other components of the graphs are determined by the current selections in the Graphs: Display options pane of the Options dialog (accessible from the Tools menu). Note that the Line Properties dialog can also be accessed by clicking the Line button in the Plot: General options pane of the Graph Options dialog.
Instead of specifying line patterns and color using the options described above, you can select the style you want to use for the line from the Line style box on the toolbar.
Can I control the resolution of fit lines?
Yes. Use the Resolution option in the Fitting dialog (accessible by right-clicking on the fitted line and selecting Fitting from the shortcut menu). Once a fitted function has been determined, the fit is approximated with segments on the x-axis. The Normal fit line is composed of 200 segments, and the number of segments increases in exponential fashion as you select Medium, High, Very High, or Perfect. Note that this option is only beneficial for fits with high curvature (i.e., a straight line fit will not be improved by this option, but a high-level polynomial fit will be). Selecting a higher number of points will result in a smoother appearance of the fitted function in the graph; however, selecting a higher number of points will also slightly slow down the graphing procedure.
What are Graph Styles?
All of the numerous features that affect the appearance of the graph (from the color of the font in the footnote to the global features of the graph document) can be saved as individual “styles.” These styles can be given custom names and later be reapplied using simple shortcuts (such as pressing a specific key combination or clicking a button on a custom toolbar). An intelligent system internally manages these thousands of styles and their combinations in STATISTICA and helps you achieve your customization objectives with a minimum amount of effort. All user-defined or modified styles will be saved automatically in the STATISTICA configuration file (e.g., different sets or systems of styles can be used for different projects).
How can I create a Style from a custom graph title format?
First, create a graph with custom title text. For example, open the Adstudy.sta data file, and select Scatterplots from the Graphs menu to display the 2D Scatterplots creation dialog. Select variables, and type a title (e.g., Hotel Guest Survey) in the Custom title box on the Options 1 tab of the 2D Scatterplots dialog. Click the OK button to produce the graph.
Next, double-click the custom title at the top of the graph to display the Titles/Text dialog. Change the font type, size, color, etc. as desired. Note that the specified changes are applied immediately to the title displayed in the text box in the dialog.
Finally, click the Styles button in the Titles/Text dialog to display the Graphics Styles dialog, and either right-click in the Styles for Title box or click the ellipsis button. From the resulting menu, select Save As to display the Save As dialog, and enter a name for the style you have just created (e.g., surveytitle). Then click the Save button to store your custom title style for later use. Close the Graphics Styles dialog and click the OK button in the Titles/Text dialog to apply the formatting features to the custom title on the current graph.
How can I apply a saved Style to a graph title in a new graph?
To apply the formatting captured in a saved style, click the title to which you want to apply the style. The current style name (most likely Default Top Title) will appear in the Graphics Styles box on the left side of the Graph Tools toolbar. Click in the Graphics Styles box and select the desired style (e.g., surveytitle created in the example in the previous section). The highlighted title will instantly switch to the selected style.
Does altering the graph defaults on the Options dialog affect Graph Styles?
Only the default graph styles will be affected by changes made on the Graphs: Display and Graphs: Settings options panes of the Options dialog (accessible via the Tools menu). All other user-defined styles will not be affected these changes. Default system graph styles change to mirror the current system graph settings (as specified in the Graphs: Display and Graphs: Settings options panes) without any need from you to manually update them. Conversely, user-defined graph styles will retain all of their internal settings, despite any changes made to the Graphs: Display and Graphs: Settings options panes.
If I save a graph with customized Styles, how will this graph appear on a colleague’s computer?
The graph will appear exactly as it did on your computer. Although every aspect of your graph’s customization is encapsulated within graph styles, all customization applied to your graphs are fully portable. In fact, your colleague can then save the styles within your graph into his/her system by doing the following: click on the background of the graph, and then right-click on the Graphic Styles box on the toolbar. In the shortcut menu that is displayed, select the Save As command.
The Save As dialog is then displayed. Use this dialog to specify the name for the new graph style and click the OK button. In this manner, the graph style that was originally installed on your system has now been ported to your colleague’s system in a few simple steps, using a graph as a “carrier” (see the next topic).
Can I transfer a Graph Style from one system to another?
Yes, you can use the graph itself as a “carrier” of the graph style from one system to another.
Apply the desired graph style to an appropriate graph. Next, save the graph and then open it on the other system. Click the background of the graph, and then right-click on the Graphic Styles box on the toolbar. In the shortcut menu that is displayed, select the Save As command to display the Save As dialog. Specify the name for the new graph style and click the OK button. Now the graph style is part of the other system’s graphics library. This is a quick and recommended means of porting a graph style.
What do the letter icons represent in the Graph Styles Manager?
Graph styles address the properties of graph objects (e.g., size, color, thickness, and pattern of lines; size, shape, and color of point markers; colors and patterns used for definition of areas; size, color, and fonts for labels, titles, and scales), which are applicable to graphs.
Letter icons represent these properties of objects specified for the graph.
- Attributes and properties. There are two general classes of items for which a style can be created: attributes and properties. An attribute (designated with an A) is an object that affects the simple appearance of the graph, such as colors, line patterns, font sizes, font names, etc. A property (designated with a P) of a graph is an aspect of the graph that is not directly visible, such as what kind of plot to make, or what scale type to use.
- Style collections. There are two additional classes of styles, collections of attributes (AA) and collections of properties and/or attributes (S). All the elements of a collection of attributes are simple attributes, A. All the elements of a collection of properties and/or attributes are either properties (P) or collections of attributes (AA).
- User-defined styles. Any type of style that you create and save into your system will be denoted with a pencil on the icon, whether it is an attribute or property.
How do I customize the layout and format of an axis?
Right-click on the respective axis and select Scaling from the shortcut menu to display the Scaling dialog, which contains customization facilities for all features of the current axis.
Note that the applicable features of the axis can be copied to other axes by clicking the Copy axis specs to button in the Scaling dialog. The Copy axis specs to dialog will be displayed, where you can copy the features to either the corresponding (i.e., the opposite) axis or all other axes. The main scaling features of the axes can also be adjusted here, as well as in the Graph Options dialog.
How do I replace numeric scale values with text labels?
In the Axis: Scale Values options pane of the Graph Options dialog, select the Use text labels from data set check box. Note that if the variable plotted on this particular axis does not have text labels, you can create custom labels instead in the Axis: Custom Units options pane of this dialog. Here you can create custom labels using an editable custom labels spreadsheet in which you can enter the appropriate numeric values (determining where the text labels are to be placed on the axis) and the corresponding text value labels.
For example, if the values were entered as in the dialog shown above, then the label Low would be placed in the location of 1 on the axis, label Medium in the location of 2, etc.
Can I insert a scale break?
Yes. You can place one or more true scale “breaks” in a graph axis in order to “cut out” (i.e., “compress”) certain areas of the graph space:
To do this, right-click on the axis in which you want the break to appear and select Scaling from the shortcut menu. In the resulting Scaling dialog, click the More button and add a new break by clicking the Add new scale break button.
Use the From and To boxes to adjust the break location. STATISTICA will place the break in the specified location of the scale after you click the OK button in the Scaling dialog. These options are also available in the Axis: Scaling options pane of the Graph Options dialog. Note that you can add more than one scale break to an axis.
Can I adjust the number of minor units?
STATISTICA will adjust the number of minor units to the current step size value. However, you can adjust the number of minor units (as well as the default style and size of minor tickmarks) for each of the axes in the Axis: Minor Units options pane of the Graph Options dialog (accessible from the Format menu). You can specify the number of tickmarks to use or have STATISTICA select the optimum number of minor tickmarks. The length and orientation of the tickmarks are also specified. Thickness and color of the tickmarks is addressed in the Axis: General options pane.
Can I specify custom locations for tickmarks?
You can specify custom units (including their text labels, display format, and size of tickmarks) in the Axis: Custom Units options pane of the Graph Options dialog.
What is the difference between manual and auto scaling?
When the axis scaling is set to Manual in the Mode option, then the minimum, maximum, and step size for the axis are determined by the current values of the Minimum, Maximum, and Step size (as specified in the respective options in the Range group in the Axis: Scaling options pane of the Graph Options dialog). If the Mode is set to Auto (i.e., automatic), STATISTICA will automatically determine the scaling based on the range of values to be plotted.
Titles, Legends, and Custom Text
Is all graph text editable?
Yes. There are two different types of text in graphs. The first is normal editable text that you can change in the Titles/Text dialog (by double-clicking on a title). The second is text that is automatically created and updated by STATISTICA, (e.g., graph legends, functions, statistics). This second type of text (and/or symbols) consists of separate “active objects” (e.g., the point marker symbol in a legend) that are automatically updated by STATISTICA. You can always insert new text in between active objects. Note that you can also selectively disconnect any active object from auto updating and therefore be able to edit it (but, of course, lose the auto-updating feature) by right-clicking on it and selecting Disconnect Object(s) from Graph from the resulting shortcut menu.
Can I customize the location and format of the legend?
By default, when a graph is created, the legend is fixed (unmovable), which means that its position is automatically determined and the graph is moved to the left in the window to leave space for the legend. If you want to edit the text or reposition the movable legend in the graph, right-click on the legend and select Title Properties from the shortcut menu.
What other types of legends are automatically created in graphs?
In addition to the standard legend (which identifies patterns and colors used to mark individual plots in the graph), there are also other more specialized types of fixed legends.
- Contour legends identify the levels in surface or contour plots.
- Icon legends identify the assignment of icon features to specific variables.
- Selection legends identify the case selection conditions used to classify cases into multiple subsets shown on the graph.
How can I add a title to a graph?
In every graph, there are five standard graph title positions: Title and Subtitle (both at the top of graph), Left, Right, and Footnote.
They can be edited in the Titles/Text dialog, accessible by double-clicking on a specific title. For example, the following dialog [accessed by double-clicking on the line TITLE: Histogram (Hurrdata.sta 7v*209c)] shows the top title from the graph displayed above.
The titles can also be edited in the Graph: Titles/Text options pane of the Graph Options dialog.
Can I enter a symbol into a graph title?
Yes, you can easily enter symbols and special characters into a graph title. First, double-click on the title of the graph to display the Titles/Text dialog. Change the font to Symbol, and position the cursor at the point where you want the special character(s) to be inserted. You can then enter the symbol(s) into the title.
Another way to retrieve these characters is to use the Character Map program that comes installed with Microsoft Windows. This application enables you to copy these characters to the Clipboard and then paste them into your title.
Can I convert the standard titles into movable text?
You can convert a standard title into a movable (floating) title via the Graph: Titles/Text options pane of the Graph Options dialog. In the Advanced options group, change the Status to Floating.
How do I place a graph title or a footnote in a fixed position?
You can convert the standard title or any custom text into one of the standard graph text positions (e.g., a Footnote). You can also convert it into movable text (see above) and then fix it in the desired location. After the floating title is created, click the Text object properties button in the Graph: Titles/Text options pane to display the Text Object Properties dialog. Here, you can position the title or footnote in the desired location.
If you intend for the text to stay in a particular place in the graph area regardless of future changes to the graph scales or graph location (within the graph area), clear the Dynamic check box in the Coordinates (left-upper) group box. This will keep the text in the absolute window coordinates regardless of the changes to the graph (e.g., in 5% of the window width and length from the upper-left corner). See also the previous topic.
How do I rotate text?
You can select the orientation (Horizontal, Vertical, Reversed horizontal, or Reversed vertical) of floating text objects (custom text and moveable legends) in the graph in the Orientation group box of the Text Object Properties dialog (accessible from the Graph: Titles/Text options pane of the Graph Options dialog). You can also rotate the text by specifying the rotation angle (from 0 to 359° or 0 to -359°) in the Angle box.
Alternatively, you can interactively rotate the text by selecting it in the graph and then dragging one of the handles (small black squares) in the desired direction,
or by pressing the PAGE DOWN and PAGE UP keys to rotate text objects selected in the graph clockwise or counterclockwise, respectively, in 5° increments. To rotate in 1° increments, hold down the CTRL key while pressing PAGE DOWN or PAGE UP. The rotation of text objects takes place around the object’s anchor point.
The position of the anchor point can be adjusted in the Text Object Properties dialog.