Layer Examples
- Using layers to create two separate plots.
- Using layers to show a graph with separate y
axes on the right and left
1. Using layers to create two separate plots
- We start with the original graph, shown below, with two plots of ion density
and two of electron density. The goal is to show the ion and electron density
plots on different graphs, for ease of viewing, but with the same x axis for
both.
![](images/layers_example1_orig.jpg)
- Double clicking on the graph, or selecting Layers | Properties, brings up
the Layer Properties dialog,
which shows the four graphs in the layer:
- To remove the electron density graphs from Layer 1, we can double click
on them or select them and press the '<<' button. The plots will then
be available, but not shown in any layer:
- We click on the 'Apply' button to apply the changes and on the 'New' button
to make a new layer:
- We add the plots to the new layer by double clicking on them (or by selecting
them and clicking on the '>>' button.
- We want the two layers to be one above the other, so we set the X Offset
to 0 and the Y Offset to 100.
- To avoid the text obscuring any of the plots, we hide the X tick labels
and axis title.
- We want the X axis to be shared between the two layers, but axis data can
only be shared with a layer with a higher number, so we click on 'Apply' and
choose Layer 1 in the combol box in the upper right.
- In the 'Share X axis data with:' combo box, we select Layer 2 and click
on 'OK'.
- We now have two layers offset from one another, but the lengths of the axes
result in the second layer being partially out of the window. To resize the
plots, we select the menu item Graph | Size/Position:
- By reducing the 'Vertical Min' from 15% to 10% and reducing the 'Vertical
Max' from 85% to 50%, we can fit both layers on the same window.
- After some rescaling, the final graph is shown below:
2. Using layers to show a graph with separate
y axes on the right and left
- We start with a graph showing plots of two different quantities - temperature
and density. Clearly, each plot needs a separate y axis.
- Double clicking on the graph, or selecting Layers | Properties, brings up
the Layer Properties dialog.
- We remove the density plot from Layer 1 by double clicking on it and pressing
the 'Apply' button.
- We make a new layer by pressing the 'New' button:
- We add the density graph to the new layer by double clicking on it.
- We want the layers to be coincident, so we set both the X Offset and the
Y Offset to 0.
- Only one X axis need be drawn, so we hide the X axis for Layer 2.
- As for Example 1, we want to share the X axis data between the layers, so
we click on the 'Apply' button, select Layer 1 in the combo box in the upper
right, and select Layer 2 in the 'Share X axis data with:' combo box and press
the 'OK' button.
- We want the Y axis for Layer 1 (the temperature plot) to be shown on the
left. First we make sure that Layer 1 is the active layer by clicking on the
'1' button on the toolbar or by selecting Layers
| Active Layer and choosing Layer 1 from the Active Layer combo box.
- We then access the Axes Properties
dialog by clicking on the axes tool button, double clicking on one of
the axes or by selecting Axes | Properities:
- With the Y axis selected, we set the Axis Position to be 'Left'
- We repeat the procedure for Layer 2 to set the Y axis to be on the right:
- We edit the legends to remove the
common zone information, and instead put the zone information into a new
text box.
- Finally, we edit the right hand Y axis
title to rotate the text by 270°:
Copyright © 2000-2024
Prism Computational Sciences, Inc. |
VISRAD 19.3.0 |