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
 Bar plot spacing display
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Neena1695

Canada
117 Posts

Posted - 03/23/2023 :  11:12:03 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello Origin Users,

I have a question regarding bar graph display in the below pic


Any help please, thank you!
Neena

snowli

USA
1417 Posts

Posted - 03/23/2023 :  11:23:13 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Please share the opju so we can take a look so we can check the layer are linked with shared X, which layer each plot is in, etc. since though it's 2 panel, there are 6 layers.

Thanks, Snow
Go to Top of Page

Neena1695

Canada
117 Posts

Posted - 03/23/2023 :  11:27:37 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
https://my.originlab.com/ftp/forum_and_kbase/Images/Nterm_ext_300%20vs%20600.opju
Go to Top of Page

snowli

USA
1417 Posts

Posted - 03/23/2023 :  2:08:31 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Neena,

This is because our column bar width is decided by number of rows in the data. For 1st layer, there are 18 rows, while for 4th layer, there are 26 rows of data they have different bar width.

So for now, u will have to remove the lock in column M&N (e.g. set recalculation to None). Then enter some x and y values in column N and M of 300 ns_newA1_Mar22 sheet (2nd to last) so there are 26 x values. E.g. u can enter 1 for all extra rows of N, and 0 for all extra rows in M.

I jiraed this ORG-26737 for developer to check if there is easy way to make them the same for linked layers with straight 1:1 X.


BTW, does bars in all 6 layers need to be the same?

Thanks, Snow
Go to Top of Page

Neena1695

Canada
117 Posts

Posted - 03/23/2023 :  3:40:25 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you for helping me out!

Putting those values to make 26 rows surprisingly did not work.
I need the bars to look similar for just visual purposes.
For now, I have adjusted spacing for each layer individually.

Thank you,
Neena
Go to Top of Page

snowli

USA
1417 Posts

Posted - 03/23/2023 :  3:54:40 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Not sure why then. See layer 1 and 4 in this attached opju. I added 1 and 0 in rows from 19 to 26 of column N and M.

https://my.originlab.com/ftp/forum_and_kbase/Images/Nterm_ext_300%20vs%20600_mod.opju


BTW, could you comment if bars in all these layers should be the same width, e.g. including 2, 3, 5, 6?


Thanks, Snow
Go to Top of Page

Cecilia_syy

65 Posts

Posted - 03/24/2023 :  03:38:39 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Neena,
there is a workaround for this case. You can try follow steps to plot a trellis plot with 3*2 panels. All bar width in such graph will be consistent.

  • Select column I to N in 300 ns_newA1_Mar22 and Select column I to N in 300 ns_newA2_Mar22, and copy column to same sheet

  • Add Sheet Name user parameter in above sheet to indicate source

  • Stack column with above sheet, Group Identifier is Comments and SheetName, stack into subgroup=2

  • Plot trellis plot with column F and C in stacked result, set column E as Horizontal, column D as Vertical.


You can format a little bit to get following result:
https://my.originlab.com/ftp/forum_and_kbase/Images/Nterm_ext_300%20vs%20600_modified.opju

Thanks
Cecilia
Go to Top of Page

ryanchen

1 Posts

Posted - 05/04/2023 :  10:49:09 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Neena,
We added following oc function to set same column width for linked layers with X straight 1:1 in Origin 2023b which had been released last week.
int okutil_make_same_bar_width(GraphLayer *pSrcGl, GraphLayer *pDstGl);

Example:
Open https://my.originlab.com/ftp/forum_and_kbase/Images/Nterm_ext_300%20vs%20600_modified.opju and run following oc code.
void test_Make_Same_Bar_Width()
{
	GraphLayer gl = Project.ActiveLayer();
	if( !gl )
		return;	
	GraphPage gp = Project.ActivePageBase();
	GraphLayer glDst = gp.Layers(3);
	okutil_make_same_bar_width(&gl, &glDst);
	gp.Refresh(); 
}

You can upgrade Origin to try if needded.

Thanks, Ryan

Edited by - ryanchen on 05/06/2023 01:59:52 AM
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