Difference between revisions of "Graph settings"

m (Chart Type tab)
m
 
Line 193: Line 193:
 
== Graph Style Templates ==
 
== Graph Style Templates ==
  
[[Graph Style Templates|Graph style templates]] let you save the settings for a graph into a named template, so you can reuse it for other graphs. For example, can create a set of templates to provide a consistent visual style for a model, or for all models created by your organization.  
+
[[Graph Style Templates|Graph style templates]] let you save the settings for a graph so you can reuse it for other graphs. You can define a set of templates to provide a consistent visual style for a model, or for all models created by your organization.
  
 
== Export graph image type ==
 
== Export graph image type ==

Latest revision as of 21:22, 27 September 2019


Graph setup dialog

The Graph setup dialog lets you set many styles and options for a graph (or chart). The fastest way to view the dialog is to double click on a graph window. You can also select Graph Setup... from the Result menu.

The graph setup dialog has six tabs. All tabs show the template panel and these three buttons:

Apply: Apply any changes to settings to the current graph, and close the dialog.

Set Default: Save any changed settings on the current tab as the default for all graphs, and close the dialog. It does not save any settings that that you might have made in other tabs, or any changes made to this tab in previous opening of the Graph setup dialog. Changing a default will affect all graphs in the model that use the default for these settings. It will not affect graphs for which you have made graph settings that override the default.

Cancel: Close the dialog without changing or saving anything.

It contains five tabs to view and change graph settings and options, plus a Preview tab to see what the graph will look like with recent changes. You can't (yet) change the colors used for graph lines, filled areas, or bars in the Graph setup dialog. You can do this by right-clicking on a colored element of a graph (or the color in the Key), to show a help menu from which you choose "Changes series color.." option.

Chart Type tab

This tab shows options for modifying the style and arrangement of the graph:

Chart type.png

Line style:

  • Line segments join the data points
  • Line segments, with a symbol at each data point.
  • A symbol at each data point with no lines.
  • A pixel at each data point, with no lines.
  • A histogram or step function, with a vertical line and horizontal line from each data point to the next.
  • A bar centered on each x value, with height showing the y value. Forces the graph to be discrete.

Swap horizontal and vertical axes: Check this box to exchange the x and y axes, so that x axis is vertical and y axis is horizontal. If x values are discrete with long labels, swapping axes gives a more easily legible bar graph.

3-D effects: Check to use three-dimensional style to view graphs. for bar graph line style, it will offer the choice of Box or Cylindrical shapes for the bars.

Line style settings: Displays when you select a line style showing lines.

  • Area fill: Check to fill in the area beneath each line with a solid color. If there are multiple lines, the Graph will have a Key index. The fill areas are drawn from last to first element of the Key index -- which works well if the y values are sorted from smallest to largest over the key index. Otherwise, some values will obscure others.
  • Transparency: Drag the cursor to change transparency of fill colors between opaque and transparent. Some transparency lets you see fill lines and areas that might be behind others.
  • Line thickness: Select the thickness of lines to display. (Does not apply for styles without lines.)
  • Use separate color/symbol keys: Check if to get two key indexes, one indicated by color and the second by symbol type or size.
  • Allow variable symbol size: Check to have the size of symbols vary with their value.
  • Symbol size: Enter a number to specify size of symbols in typographic points.
  • Min symbol size and Max symbol size: If you check Allow variable symbol size, use these fields to specify the range of symbol sizes from smallest and largest.
  • Where steps transition: (new to Analytica 5.3) Appears only when the Step line style is selected. Controls where the steps makes its transition between two adjacent points. Left transitions immediately after the first point, Mid transitions at the midpoint, and Right transitions and the end of the interval. When plotting a histogram in PDF view, you should have this set to Mid (the default). Note that if your data is not strictly increasing from left to right and you select Left, it might not correspond to your left -- it will transition immediately after each point in the order of your data series.


Bar graph settings: Displays when you select Bar graph line style:

  • Stacked bars: Check to show bars stacked one on top of the other over the Key index, instead of side by side. The values for each bar are cumulated over the Key index.
  • Variable origin: Check if you want to set the origin (starting point) for each bar other than zero (the default). The graph will then display a Bar Origin menu to let you select the Bar origin.
  • Bar overlap: With stacked bars, they overlap 100%. You can specify partial overlap between 0 and 100%.

Axis Ranges tab

This tab lets you control the display of each axis, including scaling, range, and tickmarks:

Axis Ranges2.png
  • Autoscale: Uncheck this box if you want to specify the range for the axis, instead of letting Analytica select the range automatically to include all values.
  • Max and Min: The maximum and minimum values of the range to use when you have unchecked Autoscale.
  • Include zero: Check if you want to include the origin (zero) in the range.
  • Approx. # ticks: Specify the number of tick marks to display along the axis. Analytica may not match the number exactly, in the interests of clarity.
  • Reverse order: Check if you want to show the values ordered from large to small instead of the default small to large.
  • Categorical: Treat this axis as categorical. Usually, Analytica figures out the quantity is categorical without help. Occasionally, if the values are numerical, you may want to control it yourself.
  • Log scale: Check if you want to display this on a log scale. This is useful for numbers that vary by several orders of magnitude. It uses a "double log" scale with zero if the values include negative and positive numbers.

Set default: If you have changed settings for an axis that is an index of the variable being graphed, clicking this button will apply these changes to that index for all graphs that use that index. For example, if the scale is the Index Time, you can use this to change the Time scale (e.g. start and end year) for every graph that displays a value over Time -- unless you want to override that default in another graph.

Style tab

The style tab lets you modify the display of the style and color of the grid, frame, and tick marks, and where to display the key.

Style2.png

Grid: Select the radio button to control the display of the grid over the graphing area. You can also select the color. A light or medium gray is often a good choice.

Frame: Select the radio button to control the display of the lines framing the graphing area. You can also select the color for the frame. It is usually best to have the Frame the same color as the Grid, or a darker shade of the same color.

Tick marks: The top radio buttons control where to show tick marks. The lower ones control how they are displayed.

Display key: Select radio button to control where to display the Key on the graph. Select the Border check box to display an outline rectangle around the key.

Text tab

The Text tab lets you change the font, size, style, and color for text on the graph for each of these types of text: Axis titles, Axis labels -- i.e. numbers or text identifying points along each axis, Key title, and Key labels -- i.e. identifying values in the Key:

Text.png

Font: Select the font family. Graphic designers recommend using the same font for all text, which you can easily do by leaving all except Axis titles as "(Same as axis titles)".

Size: The size in typographic points. Set to 0 if you want that type of text to not display.

Color: Select the color.

Font image3.png

Axis Label Rotation: Enter a number from -90 to 90 degrees to rotate the labels for each axis. For example, for a bar graph with many long labels along the horizontal axis, they won't all fit. By rotating them by 45 or 90 degrees, you can make them all fit without getting truncated.

Adapt displayed font sizes to graph height: If you check this box, it will use larger or smaller fonts when you make the graph window larger or smaller. This can be useful when you give a demo and want to expand graphs so they are easily readable to people at the back of the room. The font sizes accord with those specified at the default graph height of 300 pixels.

Background tab

This tab lets you control the fill color, gradient, or pattern on the graph background. The main area covers the entire graph window (exclusive of the top area containing indexes). The plot area is the rectangle showing the graph values. If you leave or set the Fill to "None" for the Plot area or Key area, they will show the same Fill (if any) as the Main area.

Background2.png

Fill: Select from:

  • None: No fill. Default to blank (white) background.
  • Solid: Use a solid fill with the selected Color 1.
  • Gradient: Use a gradient of color, going from Color 1 to Color 2, in the direction you specify in Gradient style.
  • Hatch: Use a hatched fill using the selected Hatch Style with Color 1 and Color 2.

Graphic designers recommend avoiding Hatch backgrounds, and using solid or gradient backgrounds with pale colors, if at all. The data should not be overwhelmed by the background.

Preview tab

This tab shows the graph using the current settings so that you can see their effects before you decide to Apply or Cancel them:

Preview2.png

Changing color of lines, bars, or areas

Analytica uses a default series of colors to identify different lines, areas, or bars when viewing an array with two or more dimensions. The Key identifies which index values applies to each color. You can change the color of a line, area, or bar by right clicking on the colored element (or on the corresponding color in the Key). Select Change Series Color..., the last option in the right-click menu. In this dialog, you can select from one for the standard colors, or select another from "More colors...".

When you've got the new color you want, click "Apply" to change the color in this graph, or "Set default" to set this color as the default for all graphs in the model. (It will not affect the color of graphs whose color is changed from the default in the past or future.)

To change the colors of several items, repeat these actions for each item.

XY comparison or XY Coordinate sources

XY comparison lets you plot one variable on vertical (Y) axis against the other on the horizontal (X) axis.

Graph Setting Associations

Graph Setting Associations enable intelligent transitions when multi-dimensional results are pivoted and when the graphing mode (Mid, Bands, PDF, etc) is changed.

For example, axis range settings are associated with a particular index, so if the graph is pivoted, the setting follows the pivot and isn't suddenly applied to a horizontal axis where it no longer makes sense.

Line style settings are associated with a combination of graph view mode and categorical / continuous distinction. Thus, it is possible to have a probability mass plot draw as a bar graph, a sample as a scatter plot, and bands as a line plot, all with a single graph setting.

Associations also impact how how settings transfer when "Set Default" is used.

Graphing Dimensions and Roles

A general and flexible system of graphing dimensions and graphing roles allows a very rich space of chart types to be created using only a few elementary building blocks. The mechanism also allows many dimensions to be reflected on a single graph.

A computed value or an index can serve as a graphing dimension. Graphing dimensions are then assigned to graphing roles, and the user can easily pivot the graphing roles to alter the assignment of dimensions to roles. By assigning graphing dimensions to roles, a user can view many dimensions at once, and compare multiple values on the same graph.

Selectable graphing roles include X-axis, Y-axis, combined Color/Symbol Key, and Bar Origin, and may soon include Symbol Size and separate Color and Symbol Keys.

Selecting Data for Graphing

The structure of data used to create a plot is now much more flexible. A Comparison Index can be used to plot data that is organized in columns, without having to break the data into multiple variables. Multiple external variables can be merge into the plot as graphing dimensions. In a Scatter Plot, you can pivot both X and Y axes to explore multi-dimensional data from many "angles".

Categorical and Continuous Plots

The Discrete vs. Continuous distinction is determined by the Domain Attribute, and determines whether probability plots are density and cumulative density plots (continuous) or probability mass and cumulative probability (discrete) plots.

The Categorical vs. Continuous distinction determines how a graphing axis is laid out. Continuous dimensions require numeric values. The determination of whether a graphing dimension is categorical or continuous is partially determined by the domain attribute, but the values actually occurring in the dimension, by the chart type (bar or non-bar chart), and by the Categorical checkbox in the axis range setting.

Analytica maintains separate line-style settings for categorical and continuous plots. (The running axis of a plot, usually x-axis, determines whether the plot is continuous or categorical). Thus, by pivoting a continuous dimension to the x-axis to replace what was a categorical dimension, a graph may change from a bar graph to line graph, for example.

Richer Plots Types

You can create a wide variety of chart styles by combining some of these features, including:

Bar Chart variations
  • Stacked Bars
  • Segmented Bar charts
  • Horizontal Tornado Plots
  • Gantt Charts (schedule charts)
  • Candle bars (High-close-open-low stock charts)
Scatter plot variations
Line plot variations
  • Standard (continuous) line plots
  • XY parametric plots
  • Log Plots (axis log scaling)
  • Sideways plots

Graph Appearance Settings

These settings let you modify the production of "board room quality" charts. These include:

  • Control of background fills/patterns (solid, gradient, hatch).
  • Full control of fonts (color, face, size, bold, etc)
  • Location of Key.
  • Grid and tic styles
  • Axis label rotations
  • Three-D effects (solid bars, ribbons)
  • Filled line graphs (w/ transparency control)

Graph Style Templates

Graph style templates let you save the settings for a graph so you can reuse it for other graphs. You can define a set of templates to provide a consistent visual style for a model, or for all models created by your organization.

Export graph image type

You can export a graph as an image file in most common formats, including BMP, JPEG, TFF, PNG, and Enhanced Windows Metafile (EMF):

  1. Display the graph the way you want.
  2. Select Export... from the File menu, to open a file browser dialog Save Graph Image as....
  3. If you want to change the defaults, edit the File name and select the Save as type -- i.e. the file format.
  4. Click Save.

You can export a graph as an image file in most common formats, including BMP, JPEG, TFF, PNG, and Enhanced Windows Metafile (EMF).

Setting graph appearance at run-time

Graph appearance settings can also be set at run-time, by using the TextReplace operation on the GraphSetup attribute. Let's say we need a variable Y with the values of variable X, and with a Baroverlap attribute as defined by the variable desired_overlap in the model. The definition of variable Y can be:

 Var script := "GraphSetup " & (identifier of self) & ":" & 
       Textreplace(graphsetup of self, "(Baroverlap:)\d+", "\1" & desired_overlap, re: 1); 
 EvaluateScript(script); 
 X

This changes the overlap whenever desired_overlap changes.

See Also

Comments


You are not allowed to post comments.