Difference between revisions of "Customization of Graph Colors"

 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
You can change the color used for a data point, curve or bar on a graph by right clicking on it in the graph, or on its corresponding item in the key, and selecting '''Change Series Color...''' on the right-mouse context menu. This brings up the following dialog.
+
[[Category: Graphs]]
  
[[image:Change Series Color.png]]
+
__TOC__
  
Select a new color and press OK and the color far that data series will use the new color.
 
  
= Designing a Color Series =
+
You can change the color used for a data point, curve or bar on a graph by right clicking on it in the graph, or on its corresponding item in the key, and selecting '''Change Series Color...''' on the right-mouse context menu. This brings up the following dialog.
  
''new to [[Analytica 4.6]]''.
+
:[[image:Change Series Color.png]]
  
From the '''Change Color Series''' dialog, you can view the current series of colors using the dropdown.
+
Select a new color and press '''OK''' and the color far that data series will use the new color.
  
[[image:Series Color Items.png]]
+
== Designing a Color Series ==
  
Along the right edge, you can see the current sequence of colors. The labels for your current color dimension display, allowing you to see which color is used for each label. You can select a label, select a new color for it on the left, then select another label and repeat. Once you have the series as you like it, press '''OK'''.
+
From the '''Change Color Series''' dialog, you can view the current series of colors.
  
If you leave the radio button at '''General color sequence, this graph only''', your changes apply only to the current graph. The graph of other variables will be unaffected. If you love your color series, you may want to use the radio button to make it the '''Default color sequence far all graphs.''' If you do that, all other graphs in your model will use this color series, except of course, those graphs where you've customized the colors.
+
:[[image:Change Series Color.png]]
  
= Undoing customizations =
+
In the top left half, you can see the current sequence of key labels and colors. The labels for your current color dimension display, allowing you to see which color is used for each label. You can select a label, select a new color for it on the left, then select another label and repeat. Once you have the series as you like it, press '''OK'''.
  
If you've customized the color series for a particular graph, and you decide you don't like it and want to go back to using the model default, click the '''Default color sequence for all graphs'''. It will ask you whether you want reset your customized colors to use the default, which you do, so you'll answer '''Yes'''. Your color customization for the graph will be deleted.
+
If you leave the radio button at '''To this graph only''', your changes apply only to the current graph. The graph of other variables will be unaffected. If you love your color series, you may want to use the radio button to use it '''As the default for all graphs.''' If you do that, all other graphs in your model will use this color series, except of course, those graphs where you've customized the colors.
  
= Color Templates =
+
== Undoing customizations ==
  
''new in [[Analytica 4.6]]''
+
If you've customized the color series for a particular graph, and you decide you don't like it and want to go back to using the model default, click the '''As the default for all graphs'''. It will ask you whether you want reset your customized colors to use the default, which you do, so you'll answer '''Yes'''. Your color customization for the graph will be deleted.
  
If you create a color scheme that you really like, instead of making it a default, you can alternatively package in a [[Graph Style Template]]. Once you do this, you can select the template from the Graph Setup dialog when viewing other result graphs. In addition to the color sequence, you can also package other stylistic settings from the Graph Setup dialog, such as background colors, font choices, grid styles, key locations, and so on.
+
== Color Templates ==
  
So add a color sequence to a [[Graph Style Template]], you must select the template for the graph you are viewing before bring up the '''Series Color dialog'''. While viewing the graph, double click on the graph to bring up '''Graph Setup'''. You can select a [[Graph Style Templates|Style Template]]] from the pulldown at the bottom. If you are starting a template, select '''New Template''' and enter a name for the template. Press the '''Set Template''' button to start using this template for this graph.
+
If you create a color scheme that you really like and want to reuse not just for a particular index, you can include it in a [[Graph Style Template]]. You can also include other style options from the '''Graph Setup''' dialog in the template. You can then apply the template from the '''Graph Setup''' dialog to other graphs.  
  
[[image:Style Template Selection.png]]
+
To include a color scheme in a template:
 +
# Display a graph with the Key index.
 +
# Double-click the graph to open the '''Graph Setup''' dialog.
 +
# From the bottom of that dialog, select a [[Graph Style Templates|Style Template]]] from the pulldown menu. Or if you are starting a template, select '''New Template''' and enter a name for the template. Press '''Set Template''' button to start using this template for this graph.
  
Next, right click on a curve, bar, data point, or key item and select '''Change Series Color...'''. At the bottom, the third radio button provides an option to set the color series for the template.
+
:[[image:Style Template Selection.png]]
  
[[image:Color Series Template Radio.png]]
+
# Right-click on a curve, bar, data point, or item in the Key and select '''Change Series Color...'''.
 +
# Select the colors you want for the items in the Key.
 +
# Select the third radio button and click '''OK''' to include these colors in the current template.
  
With this selected, pressing '''OK''' causes this to become the new color series for the template. Any graph in your model that uses this template will use these colors. Graphs that don't use the template will be unaffected.
+
:[[image:Color Series Template Radio.png]]
  
= Color Associations =
+
Now any graph using this template will use these colors. It won't affect graphs that don't use this template.
  
''new in [[Analytica 4.6]]''
+
== Color Associations ==
  
 
It is helpful to maintain a consistent color scheme throughout your model. You may have specific colors in mind for particular items that show up in your key, and you want to keep these consistent throughout your model. For example, for you may want to always use Yellow for <code>Energy_technology="Solar"</code>, black for <code>"Coal"</code>, blue for <code>"Hydroelectric"</code>, red-orange for <code>"Geothermal"</code>, and cyan for <code>"Natural gas"</code>. These don't apply to every graph, and not even to every pivot of the same graph, you want to use these colors for these items.
 
It is helpful to maintain a consistent color scheme throughout your model. You may have specific colors in mind for particular items that show up in your key, and you want to keep these consistent throughout your model. For example, for you may want to always use Yellow for <code>Energy_technology="Solar"</code>, black for <code>"Coal"</code>, blue for <code>"Hydroelectric"</code>, red-orange for <code>"Geothermal"</code>, and cyan for <code>"Natural gas"</code>. These don't apply to every graph, and not even to every pivot of the same graph, you want to use these colors for these items.
Line 45: Line 49:
 
To accomplish this, you can associate a color sequence with an index. In this example, you define a color sequence for the <code>Energy_technology</code> index. You do this by selecting the following radio button:
 
To accomplish this, you can associate a color sequence with an index. In this example, you define a color sequence for the <code>Energy_technology</code> index. You do this by selecting the following radio button:
  
[[image:Color Series Index Assoc.png]]
+
:[[image:Color Series Index Assoc.png]]
  
 
Once you've associated a color series with an index, the same colors are used in any graph in the model that uses this index as the color key. Also, if the index is a slicer for the graph and there is no other color key, it will determine the color of the curve displayed. Hence, you'll see a consistent coloration for the items in this index across the whole model.
 
Once you've associated a color series with an index, the same colors are used in any graph in the model that uses this index as the color key. Also, if the index is a slicer for the graph and there is no other color key, it will determine the color of the curve displayed. Hence, you'll see a consistent coloration for the items in this index across the whole model.
  
= Using colors from another index =
+
== Using colors from another index ==
 +
 
 +
Large models often have several indexes that contain many of the same values. For example, in a model of electric power plants, you might have an Index <code>Energy_technology</code>, containing <code>'Coal', 'Gas', 'Hydro', 'Wind', 'Solar'</code> along with Indexes <code>Renewable_technology</code> containing  <code>'Hydro', 'Wind', 'Solar'</code> and <code>Fossil_technology</code> containing <code>'Coal', 'Gas'</code>. Index <code>Sorted_technology</code> might contains all the labels in <code>Energy_technology</code> in a different order <code>'Wind', 'Solar',  'Hydro', 'Gas', 'Coal'</code> sorted by increasing dispatch cost.  It's helpful to your users to use consistent colors for each technology in graphs that use these indexes. For example <code>'Hydro'</code> should always be blue, <code>"Solar"</code>  yellow, and <code>"Coal"</code> black.
 +
 
 +
You can do this conveniently by specifying the color scheme you want for a superset Index that contains all the labels used by any of these overlapping Indexes -- in this case, <code>Energy_technology</code> contains all the technologies. You do this in the usual way: Display a graph using this Index in the Key. Right-click on a color in the Key or graph, and select '''Change series Color...''' as above. Make sure to select radio button '''Color sequence associated with Index Energy_technology''' before you click "OK".
  
''new in [[Analytica 4.6]]''
+
Then, you can associate each of the other indexes, <code>Renewable_technology, Fossil_technology, and Sorted_technology</code>, with this superset index: For each subset index,
 +
# display a graph with that index as its key.
 +
# Right-click on a key value or curve, and select '''Change series Color...''' from the menu.
  
It is common for multiple indexes to exist in the same model with the same items, or different subsets of the same items. For example, in addition to <code>Energy_technology</code>, you may have <code>Renewable_technology</code>, <code>Sorted_technology</code>, and <code>Selected_technology</code>. Since these all contain different subsets or orderings of the same index items, it is desirable to use the same coloration for all of them. For example, <code>"Hydroelectric"</code> should be blue regardless of which of these indexes is the key, and regardless of whether it is the first or third item in the index.
+
:[[image:Color Series Superset Index.png]]
  
The final radio button enables you to manage a consistent color association across multiple indexes. To use this, you should identify one index that contains the maximal superset of items (i.e., it contains all energy technologies). Define a color association for this index, so that every item has an associated color. To do this, you will need to have a graph that uses this maximal index, so that you can get to the '''Series Color dialog'''.
+
# Now, select the radio button '''By using the colors of a superset index for Index <name>'''.  
 +
# It immediately shows a dialog '''Select an Index that is a superset of <name>'''. Select the superset index for which you specified the general color scheme -- e.g. <code>Energy_technology</code>.  
 +
# Click '''OK''' in the Index dialog to accept the superset index.
 +
# Click '''OK''' in the '''Change series Color...''' dialog to apply the relevant colors from the superset index.
  
Next, for each of the other "subset" indexes, bring up a graph that uses the index as the key, select a curve and bring up the '''Color Series dialog'''. Now, select the last radio button.
+
:[[image:Color Series Picking superset.png]]
  
[[image:Color Series Superset Index.png]]
+
Repeat this for each subset index to define tje associated superset. Any Graph that uses the subset index in its Key will now use the standard colors you set for the superset index for all key labels that it has in common. This also works if the subset actually contains ''all'' the values of the "superset", perhaps reordered, as in <code>Sorted_technology</code>.  After associating a superset index in this way, any change to the color scheme of the superset will change the corresponding colors in any graph using a subset index.
  
when you select the radio, the index chooser appears. Select the superset index (the one containing all the items).
+
If a "subset" index contains any labels not in its "superset" -- i.e. it isn't a perfect subset -- it will warn you, and use a default color for these labels.
  
[[image:Color Series Picking superset.png]]
+
== History of Change Color Series ==
  
If the index you select does not contain all the elements of your index, you will be warned. When the item isn't in the master superset index, it will not be possible for Analytica to use a consistent coloration. For those items, it will select the color from the general color sequence for the graph. You should simply ensure that isn't an issue by only selecting a superset index that contains all the items (exactly, case sensitive) as your current Key index.
+
The '''Change color series''' dialog was introduced around Analytica 4.3.
 +
Other features, including color associations, color templates, and using colors from another index were introduced in [[Analytica 4.6]].
  
Repeat this for each related index. Once these superset assignments are configured, any changes you make to the colors are reflected in all graphs using any of these indexes as the key.
+
==See Also==
 +
* [[Changing Series Colors]]
 +
* [[Graph Style Templates]]
 +
* [[Disassociating a Graph Template]]
 +
* [[Graph Setting Associations]]
 +
* [[Graph settings]]

Latest revision as of 21:59, 4 April 2016



You can change the color used for a data point, curve or bar on a graph by right clicking on it in the graph, or on its corresponding item in the key, and selecting Change Series Color... on the right-mouse context menu. This brings up the following dialog.

Change Series Color.png

Select a new color and press OK and the color far that data series will use the new color.

Designing a Color Series

From the Change Color Series dialog, you can view the current series of colors.

Change Series Color.png

In the top left half, you can see the current sequence of key labels and colors. The labels for your current color dimension display, allowing you to see which color is used for each label. You can select a label, select a new color for it on the left, then select another label and repeat. Once you have the series as you like it, press OK.

If you leave the radio button at To this graph only, your changes apply only to the current graph. The graph of other variables will be unaffected. If you love your color series, you may want to use the radio button to use it As the default for all graphs. If you do that, all other graphs in your model will use this color series, except of course, those graphs where you've customized the colors.

Undoing customizations

If you've customized the color series for a particular graph, and you decide you don't like it and want to go back to using the model default, click the As the default for all graphs. It will ask you whether you want reset your customized colors to use the default, which you do, so you'll answer Yes. Your color customization for the graph will be deleted.

Color Templates

If you create a color scheme that you really like and want to reuse not just for a particular index, you can include it in a Graph Style Template. You can also include other style options from the Graph Setup dialog in the template. You can then apply the template from the Graph Setup dialog to other graphs.

To include a color scheme in a template:

  1. Display a graph with the Key index.
  2. Double-click the graph to open the Graph Setup dialog.
  3. From the bottom of that dialog, select a Style Template] from the pulldown menu. Or if you are starting a template, select New Template and enter a name for the template. Press Set Template button to start using this template for this graph.
Style Template Selection.png
  1. Right-click on a curve, bar, data point, or item in the Key and select Change Series Color....
  2. Select the colors you want for the items in the Key.
  3. Select the third radio button and click OK to include these colors in the current template.
Color Series Template Radio.png

Now any graph using this template will use these colors. It won't affect graphs that don't use this template.

Color Associations

It is helpful to maintain a consistent color scheme throughout your model. You may have specific colors in mind for particular items that show up in your key, and you want to keep these consistent throughout your model. For example, for you may want to always use Yellow for Energy_technology="Solar", black for "Coal", blue for "Hydroelectric", red-orange for "Geothermal", and cyan for "Natural gas". These don't apply to every graph, and not even to every pivot of the same graph, you want to use these colors for these items.

To accomplish this, you can associate a color sequence with an index. In this example, you define a color sequence for the Energy_technology index. You do this by selecting the following radio button:

Color Series Index Assoc.png

Once you've associated a color series with an index, the same colors are used in any graph in the model that uses this index as the color key. Also, if the index is a slicer for the graph and there is no other color key, it will determine the color of the curve displayed. Hence, you'll see a consistent coloration for the items in this index across the whole model.

Using colors from another index

Large models often have several indexes that contain many of the same values. For example, in a model of electric power plants, you might have an Index Energy_technology, containing 'Coal', 'Gas', 'Hydro', 'Wind', 'Solar' along with Indexes Renewable_technology containing 'Hydro', 'Wind', 'Solar' and Fossil_technology containing 'Coal', 'Gas'. Index Sorted_technology might contains all the labels in Energy_technology in a different order 'Wind', 'Solar', 'Hydro', 'Gas', 'Coal' sorted by increasing dispatch cost. It's helpful to your users to use consistent colors for each technology in graphs that use these indexes. For example 'Hydro' should always be blue, "Solar" yellow, and "Coal" black.

You can do this conveniently by specifying the color scheme you want for a superset Index that contains all the labels used by any of these overlapping Indexes -- in this case, Energy_technology contains all the technologies. You do this in the usual way: Display a graph using this Index in the Key. Right-click on a color in the Key or graph, and select Change series Color... as above. Make sure to select radio button Color sequence associated with Index Energy_technology before you click "OK".

Then, you can associate each of the other indexes, Renewable_technology, Fossil_technology, and Sorted_technology, with this superset index: For each subset index,

  1. display a graph with that index as its key.
  2. Right-click on a key value or curve, and select Change series Color... from the menu.
Color Series Superset Index.png
  1. Now, select the radio button By using the colors of a superset index for Index <name>.
  2. It immediately shows a dialog Select an Index that is a superset of <name>. Select the superset index for which you specified the general color scheme -- e.g. Energy_technology.
  3. Click OK in the Index dialog to accept the superset index.
  4. Click OK in the Change series Color... dialog to apply the relevant colors from the superset index.
Color Series Picking superset.png

Repeat this for each subset index to define tje associated superset. Any Graph that uses the subset index in its Key will now use the standard colors you set for the superset index for all key labels that it has in common. This also works if the subset actually contains all the values of the "superset", perhaps reordered, as in Sorted_technology. After associating a superset index in this way, any change to the color scheme of the superset will change the corresponding colors in any graph using a subset index.

If a "subset" index contains any labels not in its "superset" -- i.e. it isn't a perfect subset -- it will warn you, and use a default color for these labels.

History of Change Color Series

The Change color series dialog was introduced around Analytica 4.3. Other features, including color associations, color templates, and using colors from another index were introduced in Analytica 4.6.

See Also

Comments


You are not allowed to post comments.