cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
KurtAnderson
Level III

JMP y vs x with "by" on the same plot

I have about 100 y (continuous) that I want to plot vs 1 x (continuous).  The y-x plot is a nice fast way to do that.  However, I also have a categorical variable that I would like to use as "by" (3 discrete values).  If I use y-x and fill in the "by" field, I get 300 plots.  I want 100 plots, one for each y, with the 3 "by's" plotted on the same plot.  Alternatively if I use Graph Builder, I can only build one y vs x with "by" as the overlay.  Then build the next, and next... Is there a fast way to make 100 y vs x that show all three "by" on each plot?  Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
SDF1
Super User

Re: JMP y vs x with "by" on the same plot

Hi @KurtAnderson ,

 

  Not sure if this is how you want to go about it, but you can do this in a quick way using the Column Switcher. If you generate your graph in Graph Builder and then go to the red hot button > Redo > Column Switcher, you'll want to select the current X column in the top window and then in the bottom window select all the other columns you want to switch it out with, including the current X variable. You'll get something like below (using the Car Physical Data.jmp file). Here, I'm using the column Type in the same way you're using your categorical variable. You can then click through the columns in column switcher and see each graph. 

SDF1_1-1642782672980.png

You can use the column switcher option in pretty much any platform within JMP. You might also want to play around with the role that you use your categorical variable, such as color, or overlay, or Group X, or Group Y to see which style best conveys the message you are trying to get across.

 

Hope this helps,

DS

View solution in original post

8 REPLIES 8

Re: JMP y vs x with "by" on the same plot

Go to Fit Y by X, but do NOT specify a "By" variable. Make your graphs. Now, hold down the control key and go to the red triangle and select "Group By". Specify your categorical variable. Now, hold down the control key again and choose Fit Line.

 

The control key is acting as a broadcast command so that the menu choice applies to all 100 graphs.

Dan Obermiller
KurtAnderson
Level III

Re: JMP y vs x with "by" on the same plot

Yes, Dan, that works, thank you.  Initially I don't want all the stats so it's a little bit of an overkill, but the CTRL functionality is very nice.  Thanks again.

KurtAnderson
Level III

Re: JMP y vs x with "by" on the same plot

Too bad this functionality doesn't automatically change the markers to different shapes.  The linear fit lines are different colors which is nice, but all the data markers default to black dots so I can't tell which dots belong to which linear fit line.  Struggling a bit with color blindness, I'm a big fan of changing marker shape and color.

SDF1
Super User

Re: JMP y vs x with "by" on the same plot

Hi @KurtAnderson ,

 

  Not sure if this is how you want to go about it, but you can do this in a quick way using the Column Switcher. If you generate your graph in Graph Builder and then go to the red hot button > Redo > Column Switcher, you'll want to select the current X column in the top window and then in the bottom window select all the other columns you want to switch it out with, including the current X variable. You'll get something like below (using the Car Physical Data.jmp file). Here, I'm using the column Type in the same way you're using your categorical variable. You can then click through the columns in column switcher and see each graph. 

SDF1_1-1642782672980.png

You can use the column switcher option in pretty much any platform within JMP. You might also want to play around with the role that you use your categorical variable, such as color, or overlay, or Group X, or Group Y to see which style best conveys the message you are trying to get across.

 

Hope this helps,

DS

jthi
Super User

Re: JMP y vs x with "by" on the same plot

Besides using Column Switcher in Graph builder you could stack your Y variables and then use the label of Y-variables as Page and the data values as Y-axis.

-Jarmo
KurtAnderson
Level III

Re: JMP y vs x with "by" on the same plot

Thanks JTHI.  Funny, I do this with other data sets so why didn't I think of it?  Thank you.

KurtAnderson
Level III

Re: JMP y vs x with "by" on the same plot

Yes, Column Switcher works! Thanks.

Re: JMP y vs x with "by" on the same plot

You might use a row state (Color or Marker) to visually separate the levels of the categorical variable.

 

The Bivariate platform also has a command in the red triangle menu called Group By. These groups then separate the data internally if you use another command like Fit Line.