The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 How to insert space in Column graph with 2 y axes

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
heyjay Posted - 12/02/2016 : 04:36:35 AM
Origin Ver. and Service Release (Select Help-->About Origin): 2016G Sr1
Operating System: Win 7

Hello everyone,
I would like to create a column graph with 2 different y axes on the same x axis. Therefore I first made a cloumn graph in Layer 1, then added another layer with a seperate y axis.
The graph looks good, but I can't add spaces between these bars.
I read a little in this forum and one reply was to add dummy columns. So I made the first graph with a dummy column and the second as well. The appearance did not change, however.

Can you help me, please?


Jens
5   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 11/14/2017 : 5:36:16 PM
Hello Jens and visitors to this thread,

As Snow mentioned before, now new Origin 2018 version support both "Gap Between Bars (in %)"
and "Overlap (% Negative for gap)" options even in a multiple-layer graph (when the graph page
is set to "Column/Bar/Box Gap/Offset Across Layers"
https://www.originlab.com/doc/Origin-Help/PD-Dialog-Misc-Tab ).
For example, in case of double-Y Column plots, you can very easily do the following:

1) Highlight two Y columns, and choose "Plot> Multi-Y> Double-Y Column" menu to make
double-Y Column graph.
2) Open the "Plot Details" dialog by double-clicking a plot. Choose the dataset under the Layer1,
and select "Spacing" tab.
==> You find the gap controls of "Between %" and "Overlap %", similar to the single-layer group plot


To try this feature, if you have the Maintenance license, you can upgrade right now, and if not,
just download and install the Evaluation version from:
https://www.originlab.com/demodownload.aspx

I hope people find this improvement useful.

--Hideo Fujii
OriginLab
snowli Posted - 12/05/2016 : 12:27:26 PM
Hello,

We have jiraed it to support setting gaps between bars in different layers in future versions.
https://originlab.jira.com/browse/ORG-15765


For now, suppose you want to plot column B and C as column graphs with 2 different Y axis with same x axis, here is an easier workaround:
1. Highlight column B and C and plot column graph.
2. Then in Plot Details, expand Layer 1 node on left panel and uncheck C so only column B is plotted. Click Rescale to show all if needed so Y axis range adjusts based on B values.
3. Choose "Graph: New Layer: Right Y" menu to add a new layer with right Y axis showing.
4. Double click 2 icon to open Layer Contents dialog.
5. Select B and C on the left. Click A button in the middle and choose Column/Bar. Click -> button to add B and C into layer2 as column plot.
6. Now open Plot Details dialog, under Right Y node on the left, uncheck column B so only column C is plotted.
7. U can click Rescale to show all button to resize Y axis according to column C values.
8. Now to set gap between two layers, in Plot Details dialog, select the plot with checkbox. Go to Spacing tab and set Overlap to be negative value, such as -20.
9. You may need to set each plot's pattern, fill color, etc. as well.

Thanks, Snow
Hideo Fujii Posted - 12/05/2016 : 11:41:07 AM
Hi heyjay and others,

The above method can be allied only when the both Y axes are anchored to 0, but it is easy to expand
to more general case using the "Formula" option instead of "Divide by Factor" option, such that:
When you want to set the left axis range to [YLfrom, YLto], and the right axis 
range to [YRfrom, YRto], modify the data values (say column C) for right axis to:
  Cmod = ((col(C)-YRfrom)*rLR)+YLfrom
Then, you can change the tick labels for right Y by the formula:
  axisR = ((x-YLfrom)/rLR)+YRfrom
  Here, x represents axisL, and rLR=(YLto-YLfrom)/(YRto-YRfrom) .
Good luck!

--Hideo Fujii
OriginLab
heyjay Posted - 12/05/2016 : 04:35:51 AM
Wow, thanks for your help! I could have never figured that out, it's so counter-intuitive.

Actually setting the overlap for the layer 1 graph to -30 added enough space for me to leave it at that...
Hideo Fujii Posted - 12/02/2016 : 3:46:14 PM
Hi Jens,

Probably you have made your double-Y column chart by the procedure described at:
http://www.originlab.com/doc/Quick-Help/double-Y-column-plot

As you pointed out, it seems so far there is no gap control between two columns at the same X.
The following may be one possible work-around: (See the sample screenshot below)

1) Comparing the ranges of the first and second dataset, decide the scaling factor of the second dataset, 
  10 for col(C) vs col(B) in this sample.
2) Make another column, which contains the values with the second dataset multiplied by the factor (=col(D)).
3) Make a column plot with the first dataset and the third dataset modified from mthe second dataset.
4) From the Plot Details dialog's Spacing tab, set the gap at the Overlap(%) option with a negative value.(= -30)
5) Select "Graph: New Layer: Right Y" menu to add a right Y axis.
6) In the Plot Details dialog's "Link Axes Scales" tab for RightY layer, set Y linkage to: Custom; Y1=Y1; Y2=Y2;
7) Double-click the axis label of the right Y axis, and enter the scale factor(=10) in 
  the "Divide by Factor" field in the Display subtab under Tick Labels tab in the Axis dialog box. 



There may be a better way.
Hope this helps.

--Hideo Fujii
OriginLab

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000