Author |
Topic |
|
mwarner
USA
30 Posts |
Posted - 01/20/2004 : 3:55:55 PM
|
Anyone know an easy way to create double Y axis bar graph? Using the typical template path and then changing the line plot to bar plots under plot details does not work as all the bars are on top of each other. |
|
greg
USA
1378 Posts |
Posted - 01/23/2004 : 12:47:52 PM
|
The idea behind the Double-Y template is to plot two datasets with their full Y range (which may be quite different) sharing the same X range. Since Column plots draw their columns down to the X axis, then of course one column would plot on top of another. You need a clearer explanation of exactly what you want, but here is an example of one thing you could do.
Assuming you have already plotted your data using the Double-Y template and changed your plot style to Column/Bar:
Right-click on the Layer2 icon in the upper left of your graph and choose "Layer Properties".
Click the "Link Axes Scales" tab in the Plot Details dialog.
Check the "Custom" option in the X Axis Link.
Enter X1+.5 next to X1 =
Enter X2+.5 next to X2 =
Expand the "Layer2" tree in the left of the dialog so you can see the Data in Layer2. Click on it.
Click the "Spacing" tab and choose a "Gap Between Bars" of 50 or greater. (Greater than 50 will produce additional space as you shall see. You can also enter values not found in the list - like 75.)
Expand the "Layer1" tree in the left of the dialog so you can see the Data in Layer1. Click on it.
Click the "Spacing" tab and choose the same gap you previously chose.
Click OK to complete the modifications.
If you chose 50 for the gap, then there will be no space between bars. If you chose 75 for the gap, then there will be equal distances of Bar1, gap, Bar2, gap, Bar1, gap, etc.
When you are satisfied, you can save this plot as a Template: File : Save Template as.. and call it DOUBLEYBAR for example.
You can then use Plot : Template Library to use this template.
|
|
|
onsight8c
Germany
11 Posts |
Posted - 01/10/2012 : 12:40:14 PM
|
Does this also work with three datasets?
In my case I have six samples and for each sample I measured one frequency and two capacities. So my dataset looks like the following:
A(X) B(Y) C(Y) D(Y) Sample-No. Frequency Capacity-1 Capacity-2 1 aaaa bbb ccc 2 aaaa bbb ccc 3 aaaa bbb ccc 4 aaaa bbb ccc 5 aaaa bbb ccc 6 aaaa bbb ccc
What I'm now trying to do is to get a double y axis bar graph with
x as the sample number axis y_left as the frequency axis y_right as the capacity axis but for both capacities (as Cap-1 and Cap-2 are within the same range)
Is there any chance to do that? Following Greg's tutorial, it works perfect for two Y-values, but not for three...
Thank you in advance for any help!!! |
|
|
Hideo Fujii
USA
1582 Posts |
Posted - 01/11/2012 : 3:22:57 PM
|
Hi,
Please try the following steps:
1) Make individual Column graphs (e.g, Graph1 from column B, and Graph2 from columns C and D)
2) Merge the graphs ("Graph: Merge Graph Windows" menu) into 1x1 arrangement (e.g., to create Graph3).
3) Double-click the plot in the merged graph to show Plot Details dialog. Choose "Layer2" in the left panel of the dialog, and select "Link Axis Scale" tab. Set the layer's link to Layer1, and the X Axis Link to "Straight(1 to 1)". Click "Apply" button. Arrange right Y axis for the second layer to show, and hide the left one.
4) Choose the root node (graph page level, e.g., Graph3) in the left panel of the Plot Details, choose "Miscellaneous" tab, and turn ON the "Column/Bar Gap/Offset Across Layers" check box. Click OK.
5) To merge the legends, choose "Graph: Update Legend" menu, and set the "Update Mode" to "Reconstruct", and "Legend" to "One Legend for All".
Please note that in the new feature "Column Offset Across Layers" (Step 4) of the recent versions has made the steps easier. You can learn this feature at:
http://www.originlab.com/doc/Tutorials/MultiLay-ColumnGraph-Gap
Hope this method helps you.
--Hideo Fujii OriginLab
|
Edited by - Hideo Fujii on 02/10/2016 11:47:53 AM |
|
|
onsight8c
Germany
11 Posts |
Posted - 01/12/2012 : 06:34:56 AM
|
Hello,
thank you so much, it worked just perfectly! That's exactly what I was looking for.
Thank you again!
yours, Boris |
|
|
|
Topic |
|
|
|