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
 How to change bar width in categorical bar chart
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

thuyvi.co

4 Posts

Posted - 01/04/2023 :  12:23:00 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello everyone,
I tried several tutorials to change the width of my bars in my categorical bar chart. What I want is
- to have the same bar width for each bar and
- to increase the space between the categories so it is easier to distinguish which bar belongs to which category and
- display the bars such that they are not overlapping
Attached you see how the chart looks now.


I am really grateful for any advice!

snowli

USA
1417 Posts

Posted - 01/04/2023 :  12:57:06 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Could you share your project file so we know how your data is organized and try with it?

Are those category info. in one column and data in one column which we refer to as indexed data?

When plotting such data, by Plot: Categorical: Grouped Columns - Indexed, we create an output worksheet as well.

U can add a column for width info.
Then double click the plot to open Plot Details dialog to specify it and adjust other gap settings. It may not be perfect but may work.



Thanks, Snow
Go to Top of Page

thuyvi.co

4 Posts

Posted - 01/05/2023 :  02:11:27 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you so much for your reponse!
I tried to play around with it, but I still don't know how to solve the overlapping of the bars problem. Because whenever I increase the space between the bars, they get so small that you can't see the "filling pattern" anymore.
The file is attached.
Thanks again!

https://my.originlab.com/ftp/forum_and_kbase/Images/DoE%201%20Relative%20Coefficients%20Auswertung_Shared.opju

Go to Top of Page

snowli

USA
1417 Posts

Posted - 01/10/2023 :  11:27:27 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for sharing the opju. I think i understand it better now.

For your data, category info. are in 1st two columns with data in 3rd, we call it indexed data. To plot categorical bar chart, you should choose Plot: Categorical: Grouped Columns - Indexed.
https://www.originlab.com/doc/Origin-Help/grouped-column-index-data
https://www.youtube.com/watch?v=fUUm-YgJX0A

Specify the grouping columns e.g. add A and B.
Then Origin will create categorical bar with A as main level and B as 2ndary level. And a new worksheet is created in same workbook which has data reorganized for the graph.

Each bar will have same width.
By default we color bars differently in each main group. U can see color indexed to column B (based on new sheet).

U can change fill color to be single color white and the pattern by column B instead, etc.

On Spacing tab, u can set Gap between Bars to 0 so no gap between individual bars within the category.

And adjust Gap between Subsets to be smaller so no big gap between different main categories.

You do have many categories so the bars will be thin. Though some values don't exist, it still take the space. U can resize the layer so the graph is wider.

You can also go to original sheet. Double click the Categories cell of column A or B. Check "Customize Categories" checkbox and remove those catgories u don't want to include in graph.
You will need to click Ctrl+R to rescale the graph.

See the attached opju.
https://my.originlab.com/ftp/forum_and_kbase/Images/DoE%201%20Relative%20Coefficients%20Auswertung_Shared_mod.opju

Thanks, Snow
Go to Top of Page

thuyvi.co

4 Posts

Posted - 01/10/2023 :  11:45:01 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks a lot, Snow!
Go to Top of Page

snowli

USA
1417 Posts

Posted - 01/10/2023 :  11:57:53 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You are very welcome.

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