Plot : Multi-Curve : Multiple Y Axes...
Create a multi-Y axis plot
Minimum Origin Version Required: 8.1 SR0
The option to hide the graph is available starting with Origin 9.0.
1. plotmyaxes iy:=[Book1]Sheet1!((A,B),(A,C),(A,D),(A,E)) plottype:=scatter; 2. plotmyaxes iy:=Sheet1!((A,B),(A,C),(A,D),(A,E)) ly:=2 my:=1 axiscolor:=0; 3. plotmyaxes iy:=1!((1,2),(1,3),(4,5)) ry:=2 ytitle:=1 topx:=1 gap:=10; 4. plotmyaxes iy:=1!((1,2),(1,3),(1,4),(1,5)) plottype:=custom custom:="200 201" number:="1 2 1";
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
Input | iy |
Input XYRange |
|
Specify the range that contains the data to be plotted. |
Plot Type | plottype |
Input int |
|
Specify the plot type. Option list:
|
Plot Types in Each Layer | custom |
Input string |
|
This variable is only available when the Plot Type is Custom. It specifies the plot types for the plots in each layer. Type the values that represent the desired plot types and separate them by space, embedded in double quotes. Click here to learn the values for the corresponding plot types. Suppose the number of the specified plot types is n for a layer and the actual number of plots in the layer is m. If n is less than m, the first n plots will use the specified plot types and the remaining plots will use the plot type of the nth plot. For example, “200 201” means the first data plot in the each layer is line while the rest of the data plots in the layer are scatter plots. |
Number of Left Y Axes | ly |
Input int |
|
Specify the number of Y axes on the left side. Can be auto-determined or set manually (e.g. plotmyaxes ly:=1;) |
Number of Right Y Axes | ry |
Input int |
|
Specify the number of Y axes on the right. Can be auto-determined or set manually (e.g. plotmyaxes ry:=1;) |
Add Middle Y Axis | my |
Input int |
|
Specify whether or not to add a middle Y axis. |
Number of Plots in Each Layer | number |
Input int |
|
Specify the number of plots in each layer. You can separate layer numbers for different layers by space (e.g plotmyaxes number:="1 4";). |
Link Axis Color to Plot | axiscolor |
Input int |
|
Specify whether to link the color of axis to the corresponding plot. If this is set to 1, the axis and the corresponding plot will be of the same color. |
Show Y Title | ytitle |
Input int |
|
Specify whether or not to show the title of each Y axis. |
Show Top X Axis | topx |
Input int |
|
Specify whether or not to show the top X axis. |
Y Axes Gap (%) | gap |
Input double |
|
Specify the gap between Y axes. Enter a number l here. Then the gap between two adjacent Y axes will be equal to l percentage of the X axis width. |
Hide Newly Created Graph | hide |
Input int |
|
Specify whether to hide the newly created graph. Note that this option is hidden in the dialog. One can only assign its value through Labtalk script. |
This X-Function provides a flexible way to create multi-Y graph with a shared X axis. The Y axes can be arranged at the two sides of the graph, along with one in the middle.
For more information, see Multiple Y Axes Graph in the Origin Help file.
Keywords:double y, linked x