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
 Floating bar with overlaid data points
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Farqhuit

United Kingdom
13 Posts

Posted - 02/22/2022 :  10:51:42 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 2021b (64-bit) SR2
Operating System: Windows 10

Hi all,

I am preparing a floating bar chart to indicate a set of ranges for each category label.

For each category, I would like to be able to overlay discrete data points at specific points along the horizontal y axis. These will be either on top of or between the floating bars.

I could probably achieve the same thing by plotting very short floating bars at these points, but I suspect there is a neater way.

Any ideas appreciated.

Dave

Farqhuit

Farqhuit

United Kingdom
13 Posts

Posted - 02/22/2022 :  11:20:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I have made a box plot and selected the Data option to show the data instead of a box. I then used Graph>Exchange X-Y axes.

This might be a solution if I can coax this into the floating bar graph as a layer.

Farqhuit
Go to Top of Page

ChaoC

USA
165 Posts

Posted - 02/22/2022 :  2:15:55 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi, would it be possible for you to share your data so I can take a look at it?
Go to Top of Page

ChaoC

USA
165 Posts

Posted - 02/23/2022 :  2:51:44 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Dave,

Based off of the description you have provided I believe Origin’s “Box Plots” are better suited than “Floating Bar” plots which you have already discovered. This can be confirmed if I can see the type of data you are working with.

Here is an example of a box plot in Origin with overlaid data points:


To achieve this, do the following:
-Plot your data as a “Box Plot Overlap” which can be found under the “Statistical” tab.
-Switch the X and Y axes with the “Exchange Axes” tool found on the right side of Origin.
-Double click the plot to bring up the “Plot Details” dialog box.
-On Box tab, change the “Range” to "Custom Percentiles" and "P" to 0 so the box includes the full range of data.
-Go to the “Lines” and “Percentiles” tab to turn off the median line and mean dot, respectively.

Hope that helps!
Chao
Go to Top of Page

Farqhuit

United Kingdom
13 Posts

Posted - 02/24/2022 :  05:33:49 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Chao,

Thank you for your replies. If I have uploaded the file successfully (if not I'll try again), it might help you to understand what I am trying to show.

There are two plots, a floating bar and a box plot (set to show data).

The floating bar shows the size and position of a number of ranges for each category A, B, C etc. Some of these overlap. I have started colouring the ranges red and blue for contrast. There is no difference between red and blue ranges, the colours are to help understand the more complicated overlapping data. As Origin creates bars for the gaps between my ranges, I am still seeking these out and undisplaying them.

I would like to be able to vertically offset the individual bars to make the overlaps easier to understand, but I don't know if this can be done.

The box plot shows individual data points for the categories (here just A & B - I haven't collated the data yet for all the others). I would like to combine this plot with the bars so that the data points plot next to the existing categories aligned with the bars. I guess I can do this by adding a layer, linking the dimensions and suppressing the display of labels etc. for the new layer. I haven't attempted this yet, but I hope to work it out.

Any help on combining the plots would be great, along with any suggestions to improve the clarity of the bars and overlaps.

Thanks!

Dave

Farqhuit
Go to Top of Page

Farqhuit

United Kingdom
13 Posts

Posted - 02/24/2022 :  05:36:01 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Has the file uploaded? I can't see it, but when I try to upload again, it says "Filename in use..." so maybe it has uploaded.

Farqhuit
Go to Top of Page

ChaoC

USA
165 Posts

Posted - 02/24/2022 :  09:02:01 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Dave,

Can you rename the opju file and try uploading again?
At the end of your upload you need to click "Click here to complete the upload process".

Chao
Go to Top of Page

Farqhuit

United Kingdom
13 Posts

Posted - 02/24/2022 :  09:28:38 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
https://my.originlab.com/ftp/forum_and_kbase/Images/Floating%20bar2.opju


Is the file available now?

I've managed to progress this since my earlier post. I think I have successfully added a layer to display the discrete points.

I am now adjusting the formatting to try to make clearer some of the horrible multiple bar overlaps. It would be really helpful if I could offset individual bars vertically slightly to help with this, but I don't see the means of doing this.

Thanks for your time,

Dave

Farqhuit
Go to Top of Page

ChaoC

USA
165 Posts

Posted - 02/24/2022 :  1:31:49 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Dave,

I noticed you manually hid every other bar on your plot which is time consuming so I have come up with a way to do that automatically. Please refer to my attachment to see this. To summarize, you can increment the color of undesirable boxes to be invisible.

For your second issue it is not possible vertically stagger the bars since they are aligned with their respective categories. For visual clarity, I suggest experimenting with colors, transparency, and fill pattern to find something suitable.

Please let me know if you have any other questions.
Chao
https://my.originlab.com/ftp/forum_and_kbase/Images/Floating%20bar2_mod.opju
Go to Top of Page

Farqhuit

United Kingdom
13 Posts

Posted - 05/09/2022 :  10:21:36 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I've made some good progress on this by setting up additional layers with a vertical offset and selectively transferring datasets to these.

I have one big stumbling block that I cannot work out. When using layer contents to transfer data sets to a layer, datasets F & G tranferred as Floating Column (as I want), whereas B & C insist on transferring as Line.

I cannot work out what I am doing differently.

Any ideas?

Thanks, Dave

Farqhuit

Edit: the forum does not seem to be accepting my image upload. The image is 144kB and I am pressing the upload button.

Edited by - Farqhuit on 05/09/2022 10:30:34 AM
Go to Top of Page

ChaoC

USA
165 Posts

Posted - 05/09/2022 :  2:24:28 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Dave,

I've done some testing and this could be a bug.
Would you mind uploading your project file so I can take a look at how things are set up? I might be able to find a workaround.

Thanks,
Chao
Go to Top of Page

Farqhuit

United Kingdom
13 Posts

Posted - 05/10/2022 :  06:48:35 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Chao,

Thanks for taking a look. As mentioned, I am trying to use the Layer Contents to swap plots (datasets) between layers. I have tried grouping/ungrouping the plots, I have tried leaving the datasets in the other layer and also not leaving there.

Some of the plots entered the new layer as Floating Column, but they won't now! I have pared the file down so it just has the graph and the workbook. (I have also twigged that that I was once again failing to complete the final click on the upload - hopefully this works now.)



https://my.originlab.com/ftp/forum_and_kbase/Images/Floating%20bar%20MP1.opju

Farqhuit
Go to Top of Page

ChaoC

USA
165 Posts

Posted - 05/10/2022 :  4:04:20 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Dave,

This looks like an issue with the Style Holders and the Layer Contents dialog. I can elaborate if you want, but I'm sure you're more interested in a solution.

Try this:

When you open your Layer Contents dialog. Make sure it opens up on Layer 1. To do this, always right-click on the Layer 1 icon in the graph and open Layer Contents from the context menu.

Chao
Go to Top of Page

Farqhuit

United Kingdom
13 Posts

Posted - 05/12/2022 :  08:32:56 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Chao, I've had a quick try of your solution and it seems to work. I first entered Layer Contents via layer 3, and added a plot to layer 3. It added as a Line plot. I removed it from layer 3, then re-entered Layer Contents via Layer 1. I added a plot to Layer 3, and it was a Floating Column. Thanks for this.

Please do elaborate, I would be interested in the backgraound.

Cheers, Dave

Farqhuit
Go to Top of Page

ChaoC

USA
165 Posts

Posted - 05/12/2022 :  09:36:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Dave,

So each layer has a property called a Style Holder. This basically tells the Origin the type of plots that are associated with the data put into that layer. For example, if you have two Style Holders—one for scatter and one for line—the first dataset will be plotted as a scatter and the second will be plotted as a line. You can see this property by going to Plot Setup and in the Plot List, right-click and select Show Style Holder.
So the issue is that Floating Column is a special type of Style Holder and requires you to use <Auto> in the Layer Contents dialog. But there exists an issue where it only uses the Style Holder for the first layer it opens—instead of the Style Holder for that layer.

The developers have already been notified about this.

Chao
Go to Top of Page

Farqhuit

United Kingdom
13 Posts

Posted - 05/13/2022 :  04:59:04 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Chao, thanks for the explanation. Knowledge is power. Well done for working this one out, I could see that I was sometimes getting Floating Bar, but it seemed random. I could not work out the causation. Thanks again, have a good weekend, Dave.

Farqhuit
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