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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Help me with my thesis
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

BrEngineer

Brazil
2 Posts

Posted - 08/28/2024 :  5:24:33 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi, guys. I'm new to the forum and have recently started using OriginPro 8.5.
I need some help to continue writing and producing my master's research.

I need to merge these two graphs into one. Each graph has two Y axes (one for tensile strength, represented by the column chart, and the other for Young's modulus, represented by the line chart). I would like to combine them into a single graph, where I will have double columns and two lines. In other words, four graphs together: two column charts and two line charts.





Are these my data in the worksheet? Are they arranged correctly?







I need something like this, but with a dual column-and bar chart:


Edited by - BrEngineer on 08/28/2024 5:36:44 PM

snowli

USA
1379 Posts

Posted - 08/29/2024 :  09:30:31 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,

You don't need to plot each separately and then merge. You can use Origin's Plot Setup dialog to plot it.
See the video on this FAQ about how to plot data from different sheet.
https://www.originlab.com/doc/Quick-Help/Plot-MultiCols-from-DIff-WKS

For your case:
1. Activate one of the worksheet and make sure nothing is selected in sheet.
2. select Plot: Multi-panel,Multi-Axis: Double Y menu --> Since nothing selected, Plot Setup dialog will open for you to specify what to plot.
3. Expand the top panel and bottom panel so you can freely pick sheets (top panel) to plot and which layer to add them to (bottom panel).
4. Pick the two sheets on top panel
5. In middle panel, pick plot type:column/bar. pick A as X, B as Y and C as YErr.
6. Click Add. --> It will add them as column/bar plots in layer1 at bottom. For column/bar plots, when they are grouped, they will be side by side (the effect you want)
7. Then select layer2 in bottom panel to set what to add to layer 2.
8. Still with those two sheets selected on top panel, in middle panel, chooes Plot Type: Line. pick A as X, D as Y and E as YErr.
9. Click Add --> It will add them as line plots in layer2.
10. Click OK.
You can further double click plot to cusotmize plot color, etc. in Plot Details dialog.
The drawback is that the lines center at 1, 2, 3 instead of centered on top of each bar



Since Origin 2023, we support double Y plot in single layer, which is much easier than before
https://www.originlab.com/doc/Quick-Help/create-double-y
Also you can plot Ds as column/bar but set them to hide bars and only show connected lines so they are on top of each column made by Bs.
https://originlab.com/doc/Quick-Help/Add-Connect-Line-Column
E.g. see the following.
I still used plot setup, first plot Bs from both sheets as column/bar, then plot Ds as column/bar. Then set Ds to plot against right Y. Then turn the D bars off, and only show connect lines.


So please consider upgrading.

Thanks, Snow
Go to Top of Page

BrEngineer

Brazil
2 Posts

Posted - 08/30/2024 :  9:41:55 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Dear Snow, thank you very much!

I updated my Origin and was able to plot the graph exactly as in the second method you taught me.

Now I have other questions:

If I want to modify the graph that you taught me and I plotted, can I create a graph like the one below?


Where I would have a single column centered on the first data set and the others are normal grouped bars (as previously taught)? Remembering that this is still the previous case, I only modified the first column (leaving just one centered).


Additionally, can I label the X axis (of each bar grouping) with textual values instead of just numeric ones? For example: Neat / 1 / 2 / 3? I’ve already tried setting the column as categorical, but it didn’t recognize that it should keep the text. I’ve also tried modifying it directly in the plotting settings, and nothing worked. Is there a way to do this?



Or all textual, like this


Edited by - BrEngineer on 08/30/2024 9:58:40 PM
Go to Top of Page

snowli

USA
1379 Posts

Posted - 09/03/2024 :  09:11:07 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,

Regarding having a single column centered on the first data set, i may need to check with others how to do so.

As to show tick labels as text in X column, please set column X as Text before plotting the graph. E.g. double click column A header. In the Column Properties dialog, set Format as Text.

Thanks, Snow

Go to Top of Page

snowli

USA
1379 Posts

Posted - 09/03/2024 :  09:33:46 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
For showing 1st column at same bar, while others side by side, i am thinking you can add a new column to use as X location, while use column A for tick label.
1. Set the new x location column as X (it's numeric).
2. Highlight B, C and F in book1 and plot column plot.
3. Highlight B, C, F in book2, mouse over right edge of column F and drag it into graph. See this FAQ of how to drag https://www.originlab.com/doc/Quick-Help/Add-Data-to-Layer
--> Two column plots show in graph but ungrouped. Each has its own X.
4. Double click any column to open Plot Details.
5. Select each "Tensile Strength" plot on left panel, go to Spacing tab to change "Gap between bars" as e.g. 60.
6. Change fill color, pattern.
7. Go to Display tab to turn on connect line.
8. To change 1st bar color, u can ctrl+double click to select the single bar to change the fill color, etc.

See the attached opju
https://my.originlab.com/ftp/forum_and_kbase/Images/doubleY_FirstBar.opju

I also jiraed this issue ORG-29730 for our team to check if this can be improved.

Thanks, Snow
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000