Creating Styles
There are two ways a new Personal Style can be created. You can use the iTool's Style Editor or you can select one or more visualizations within your iTool view (or the view itself) and create a new style. Both of these options are discussed here.
Creating a Style from the Current Visualization
You can create a new style by selecting one or more visualization objects within the view (or by selecting the entire view). A new style created in this manner will contain all property settings of the selected objects (or all objects in the view if nothing was selected).
Creating a Style From All Items in a View
The following example shows how to create a new style from all items in a view:
- From the IDL Command Line, plot a simple line graph within iPlot:
- From the iPlot window, select one or more visualization objects or the entire view within the window. Then select: Edit → Style → Create Style from Selection...
- Enter a name for your new style (in this example it is named MyNewStyle1) in the Create Style from Selection dialog shown in the following figure.
- Now you can select between creating the new style using the selected items or using all items in the view. In this instance, choose Create using all items in view.
- Select OK and the iTools Style Editor appears.
- You can now expand the newly named style to view its properties. Under MyNewStyle1, select Plot and change the Color to your preference as shown here:
- Change the Symbol to Asterisk.
- Now, from the Style Editor window, select the Axis object and change the color.
- Select File → Save to save changes to MyNewStyle1.
- Next, from the iPlot window, select Edit → Style → Apply Style and select MyNewStyle1 from the Apply Style dialog that appears. Your new style, which contains changes to your line style color, plot symbol type (asterisks) and color of plot axes, is applied to the plot object.
Note
If multiple items of the same class are within a container (e.g. the axes container), the first one within the container will be used when creating the style.
Creating a Style From Selected Items
The following example shows how to create a new style from selected items within an iTool view:
- From your existing iPlot window, select the text annotation tool (the letter A on the top of the window on the annotation toolbar).
- Click anywhere in the window you wish to add a title for your plot. Type in "My Plot".
- Double-click on your new text annotation, and the Visualization Browser appears. Here you can edit the properties of your annotation. Change the text font, size, and color.
- With your text annotation "My Plot" is selected (a box appears around the title when selected), select Edit → Style → Create Style from Selection...
- Enter a name for your new style in the Create Style from Selection dialog shown in the following figure.
- Name your new style NewTextStyle1. Now you can select between creating the new style using the selected items or using all items in the view. In this instance, choose Create using selected items.
- Select OK and the iTools Style Editor appears.
- Since we have already set our text options as we want them to appear, you can close the Style Editor.
- Now open a new iPlot window and add a new title (for example, "My New Plot") using the text annotation tool.
- Select Edit → Style → ApplyStyle and select to apply NewTextStyle1. This applies the personal text style to the new annotation.
For details on applying a style to selected items or to all items within a view, or when launching an iTool, see Applying Styles. For information on modifying existing styles, see Editing Styles.
Note
If nothing is currently selected, then the Visualization Layer within the current view will be used when creating the style.
Creating a Style from Multiple Selected Items
Within an iTool view, you can select one or more visualization objects or annotations (or a combination of the two) to be included in a new Personal Style. To select one object or annotation simply click on the item. To select multiple items, select the first and then, holding down the Ctrl key, click on the other items.
Changes to the properties of the object or annotation can be made prior to creating a new style (by double-clicking on the item and altering the properties in the Visualization browser) or after creating a new style (within the iTools Style Editor).
Note
If multiply items of the same class are selected (say two axes), the first one selected will be used when creating the style.
Creating a New Style from the Style Editor
The Style Editor can be used to manually create a new style and specify the values of individual properties. Options are available in the Style Editor to duplicate existing styles, or to copy items from one style to another.
The following example shows how to create a new style using the iTool's Style Editor:
- First, open any iTool window and import some data.
- From the iTool window, select Edit → Style → Style Editor... The iTools Style Editor window appears.
- You will see My Styles, System Styles, and Current Style listed. Select Current Style and right-click and select Duplicate. A Copy of Current Style appears under My Styles and is named Copy of Current Style.
- Select the Copy of Current Style and rename it to your desired name in the right-hand side of the Editor.
- You are now able to make any changes within the new style by expanding the new style's object tree and making changes to the properties of individual visualization objects.
- When finished, select File → Save.
Note
From the iTool window you can also select File → New Style.
Note
To avoid confusion, styles should be given unique names. You may not name a style the same name as an IDL system style.
Note
For more information on how to populate the new style with properties, see Editing Styles.
Working with the Current Style
The Current Style contains the properties that will be used to create new visualizations in the current tool. The Current Style can be found in the iTools Style Editor. The Current Style can be modified by:
- Changing individual property values. These changes can be copied into another style, or applied to a visualization when the Current Style item is selected.
- Updating the Current Style when applying style modifications. See Applying Styles for details.
- Updating the Current Style from a style in the Style Editor. Select a Personal or System style and select Update Current Tool Style from the context menu or Apply menu.
Note
The Current Style is not saved between IDL sessions or between iTools. Because of this, one use of the Current Style can be as a practice area to define new styles. Changes can be made to the Current Style and then used to create your desired style. You can then save this new style under a new name. The new style can be set as the "Default style" in the Preferences. For more information on setting a default style, see Setting the Default Style.
Copying an Existing Style
Any existing style can be copied within the Style Editor. This is useful when you want to change only a few style properties while maintaining the majority of a style's existing properties. Simply click on the style name and choose Edit → Copy or Edit → Duplicate. Alternately, you can right-click on the style and choose Duplicate (or Copy and then Paste). A style named "Copy of style name" is then added in the My Styles folder of the Style Editor.
Note
Styles may be named and renamed as you wish.



