Graph Style Templates
What's new in Analytica 4.0? >
You can store graph style settings in a Graph Style Template, and then use the template in specific graphs without having to individually select and define color, font and style combinations. Because the template is an Analytica object, you can maintain several graph style templates within a single model, and even create libraries of graph style templates.
Selecting a Pre-Existing Graph Style Template
To select a pre-existing style template for a graph, bring up the Graph Setup dialog and select the template name in the "Style Template" pulldown at the top of the window.
When you select a template in the pulldown, the settings for that template are immediately reflected in the graph setup controls. The "Set Default" button changes to read "Set Template".
You can then modify individual style settings if the template style is not perfect.
Apply Button
Pressing Apply saves any modifications you have made since the template was selected in the current variable's graph setup. Settings that were not modified are only in the template, so if the template settings change, so will your graph's appearance.
Defining a New Graph Style Template
From the Graph Setup dialog, select the "New Template" option from the "Style Template" pulldown. Enter a name. When you press the "Set Template" button, a new template object is created. This object is initially a child of your top-level model or module, but has no visual depiction on the diagram view. It can be seen in the outliner view.
Any settings you have defined for this graph, or since the template was created, are then saved into the new style template.
The newly created template begins with any settings that have already been specified. So, for example, if you had selected a pre-existing template, modified some settings, and then created a "New Template", the new template will have the settings of the original template plus the modifications. If you continue to modify it before you press "Set Template", those settings will also be part of the new template.
The new template doesn't actually exist until you press the "Set Template" button. So, if you press Apply or Cancel to leave the dialog, the template will not be created. To correct this mistake, re-open graph settings on the same graph (which now has the settings you wish to comprise the template), select "New Template" again and enter a name, and press the "Set Template" button.
Renaming a Style Template
With a style template selected in the graph setup, click in the combo box area to enter edit mode. Type the new name. The text here is actually the title attribute for the style, the underlying identifier is not renamed.
Modifying a Style
Bring up a graph, select the style, and adjust the graph's appearance to your liking. Press "Set Template". All style settings that had ever been changed, either by the template, or while adjusting the graph, will become part of the template. (Those that have never been touched will remain inherited from the global default).
If you want to control exactly which styles are set in the template, create a new variable (which therefore has no pre-existing style settings), graph something (e.g., Time^2) and then bring up the graph setup dialog, select the style, make only those changes you want in the Template and press "Set Template". You can delete the variable afterwards, the template will remain.
If you re-select "New Template" before pressing "Set Template", you will create a new template that consists of the settings found in the old template, modified by settings made for the current variable or modified since the dialog has been open.
Moving a Style Template
If you want to move the style template object, for example, if you'd like to locate it in a particular linked module, this must be done using the Typescript Move command.
Deleting a Style Template
Deleting a style template can only be done in the outliner window or typescript. If any graphs use the template, the link to the template will be removed and those graphs will lose the settings from the template.
Global Default
The "Global Default" option displays initially in the "Style Template" pulldown. This indicates that no style template is used, so any settings not explicitly set are inherited from the global defaults (system variables, associated index, etc). The "Set Default" button can be used to change the global defaults used by all non-template graphs.
To Stop using a template
If you have a graph that uses a template, and you wish to unlink it from the template, change the "Style Template" pulldown back to "Global Default". A question is asked: "Do you want to transfer the settings from Template XXX to this variable's graph setup?". Answering no will dump all settings that come from the template. Answering Yes will leave these settings in place.
Associations
Graph settings having an index association will apply only to the specific index, even when stored in a template. For example, suppose you set up a graph having Richter_Magnitude on the X-axis, and you set this X-axis to be log-scaled. Next, suppose you store this setting in a template. When you use this template for another graph, you will not necessarily get a log-scaled X-axis -- the log-scaling will apply IF the X-axis is Richter_Magnitude. Since this setting was stored in a template, rather than in the Global Default, graphs not using this template will not log-scale Richter_magnitude.
Index-range settings (auto-scale, manual settings, log-scaling, reverse order, categorical, include zero) apply only to the specific index, even if stored in a template.
Line style settings also have the same associations as usual, even if stored in a template. Therefore, if you set the line style for a discrete prob mass plot, this line style will apply to discrete line style plots. A single template may contain different line styles for each of the graph view clusters.
Enable comment auto-refresher