Subscribe Bookmark RSS Feed

Bivariate plot: move one group to top

gandi2223

Community Trekker

Joined:

Oct 1, 2014

In a bivariate plot with grouped data, is it possible to have one group plotted on top of the other? From what I've seen so far, the order in which the markers are drawn is random, see the attachment (some blue markers are drawn underneath, some are drawn above the red ones.)

It would be useful to designate which group goes on top, in cases where the first group consists of significantly more datapoints than the second one, hence the second group is "lost" underneath.

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Hi gandi2223,

Hmm, I can see what you mean. In most platforms plots you can change the layer ordering by right clicking the plot, then select "Customize." The ordering of the elements on the left indicate the order in which the layers are drawn. I can't tell exactly how you have your data set up for the output you attached, but I'm guessing you had rows colored by a column, is that correct? In that instance there aren't actually separate layers being drawn so there isn't the option to select which layer is drawn first (at least I haven't been able to find such an option). I do have a few suggestions though:

1. If you want to continue to plot these data in Fit Y by X, right click the plot and select "Transparency" and then try a value around 0.5. I bet with some transparency you will be able to make out the points better, and you won't have as much of a problem with points being occluded.

2. Use Graph > Graph Builder. If you recreate your bivariate plot, and use whatever variable you were coloring rows by in the "Overlay" role, you will have separate layers being drawn for each group. With points in separate layers you will have direct control over which group is in front. Right-click the plot, the select "Customize." Once there you can move the layers on the left to put which ever group in front that you like (the layers are listed in the order they are being drawn, so move a layer down to the bottom if you want it to be on top, i.e. the last layer drawn).

I hope this helps!

julian

1 REPLY
Solution

Hi gandi2223,

Hmm, I can see what you mean. In most platforms plots you can change the layer ordering by right clicking the plot, then select "Customize." The ordering of the elements on the left indicate the order in which the layers are drawn. I can't tell exactly how you have your data set up for the output you attached, but I'm guessing you had rows colored by a column, is that correct? In that instance there aren't actually separate layers being drawn so there isn't the option to select which layer is drawn first (at least I haven't been able to find such an option). I do have a few suggestions though:

1. If you want to continue to plot these data in Fit Y by X, right click the plot and select "Transparency" and then try a value around 0.5. I bet with some transparency you will be able to make out the points better, and you won't have as much of a problem with points being occluded.

2. Use Graph > Graph Builder. If you recreate your bivariate plot, and use whatever variable you were coloring rows by in the "Overlay" role, you will have separate layers being drawn for each group. With points in separate layers you will have direct control over which group is in front. Right-click the plot, the select "Customize." Once there you can move the layers on the left to put which ever group in front that you like (the layers are listed in the order they are being drawn, so move a layer down to the bottom if you want it to be on top, i.e. the last layer drawn).

I hope this helps!

julian