T O P I C R E V I E W |
Neena1695 |
Posted - 03/23/2023 : 11:12:03 AM Hello Origin Users,
I have a question regarding bar graph display in the below pic

Any help please, thank you! Neena |
7 L A T E S T R E P L I E S (Newest First) |
ryanchen |
Posted - 05/04/2023 : 10:49:09 PM 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 |
Cecilia_syy |
Posted - 03/24/2023 : 03:38:39 AM 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 |
snowli |
Posted - 03/23/2023 : 3:54:40 PM 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 |
Neena1695 |
Posted - 03/23/2023 : 3:40:25 PM 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 |
snowli |
Posted - 03/23/2023 : 2:08:31 PM 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
|
Neena1695 |
Posted - 03/23/2023 : 11:27:37 AM https://my.originlab.com/ftp/forum_and_kbase/Images/Nterm_ext_300%20vs%20600.opju |
snowli |
Posted - 03/23/2023 : 11:23:13 AM 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 |
|
|