cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
skrombe
Level I

JMP Pro 14 Custom Error Bars with multiple Y variables

Hello, 

 

I'm trying to recreate this graph in JMP and I can't figure out how I can add custom error bars to each variable (PE, PW, FW). I can only manage to get one set of error bars. I also couldn't figure out how to get bars for FW next to each other. The bars are grouping by sex instead of variable.

 

I've attached the data table. 

 

Please help! 

 

Thank you, 

Shanice Krombeen 

PE, PW, FW graph.pngPE. PW, FW, graph JMP.png

1 ACCEPTED SOLUTION

Accepted Solutions
gzmorgan0
Super User (Alumni)

Re: JMP Pro 14 Custom Error Bars with multiple Y variables

Thanks to Jeff, I could download the file.

 

The only method, I know of to get teh bars to be adjacent is if they come from one group.  So to achieve 2 axes and error bars, the table needed to be restructured. The steps were:

  • Stack all the weight and efficieny columns PW, FW, PE which return Label and Data
  • Create a new column named Type which is the concatenation of the first two characters of Label (i.e. FW, PW, PE) and ", " and sex
  • Create a new table called Data Name, If( substr(:Label,2,1)=="W", "Weight", "Efficiency")
  • Now split the table, splitting columns Type and Data by Data Name This will allow the 2 axes. Group by Day, Sex, Label
  • This is almost ready to go, I changed the column Data Weight to Weight and Data Efficiency to Efficiency.
  • The split table has Type Weight and Type Efficiency only one is filled out so I made a new column Type that is the concatenation  of Type Weight and Type Efficiency.
  • One last step, column Type needs value ordering. The values of Type are FW, x PE,x  PW,x where X is either F or M. Since there will be no weight data for PE (the cells are empty), change teh value ordering to FW's, PW's then PE's to eliminate a gap for PE.      
  • GraphBuilder is ready to go, but there was some customization to get the colors and patterns and legend.

The restructured table is attached teh graphbuilder script is attached to the table. Click on table script to run it.

Oh note teh error bars (the original question) are created by the Min and Max ( range) if the values. By having FW FW-se and FW +se in the same column the mean is the same and the range can be drawn as an error bar. 

 

This wouls have been much easier to do with the raw data (individual measurements).

image.png

View solution in original post

5 REPLIES 5
gzmorgan0
Super User (Alumni)

Re: JMP Pro 14 Custom Error Bars with multiple Y variables

The attached JMP table will not dowload. 

txnelson
Super User

Re: JMP Pro 14 Custom Error Bars with multiple Y variables

It works for me:-)

Jim
Jeff_Perkinson
Community Manager Community Manager

Re: JMP Pro 14 Custom Error Bars with multiple Y variables

It looks like it was the commas in the filename. Chrome on Windows didn't like them. I've renamed the file and reattached it above.

-Jeff
gzmorgan0
Super User (Alumni)

Re: JMP Pro 14 Custom Error Bars with multiple Y variables

Thanks to Jeff, I could download the file.

 

The only method, I know of to get teh bars to be adjacent is if they come from one group.  So to achieve 2 axes and error bars, the table needed to be restructured. The steps were:

  • Stack all the weight and efficieny columns PW, FW, PE which return Label and Data
  • Create a new column named Type which is the concatenation of the first two characters of Label (i.e. FW, PW, PE) and ", " and sex
  • Create a new table called Data Name, If( substr(:Label,2,1)=="W", "Weight", "Efficiency")
  • Now split the table, splitting columns Type and Data by Data Name This will allow the 2 axes. Group by Day, Sex, Label
  • This is almost ready to go, I changed the column Data Weight to Weight and Data Efficiency to Efficiency.
  • The split table has Type Weight and Type Efficiency only one is filled out so I made a new column Type that is the concatenation  of Type Weight and Type Efficiency.
  • One last step, column Type needs value ordering. The values of Type are FW, x PE,x  PW,x where X is either F or M. Since there will be no weight data for PE (the cells are empty), change teh value ordering to FW's, PW's then PE's to eliminate a gap for PE.      
  • GraphBuilder is ready to go, but there was some customization to get the colors and patterns and legend.

The restructured table is attached teh graphbuilder script is attached to the table. Click on table script to run it.

Oh note teh error bars (the original question) are created by the Min and Max ( range) if the values. By having FW FW-se and FW +se in the same column the mean is the same and the range can be drawn as an error bar. 

 

This wouls have been much easier to do with the raw data (individual measurements).

image.png

skrombe
Level I

Re: JMP Pro 14 Custom Error Bars with multiple Y variables

I can't thank you enough! Just so I know in the future... I had the raw data but I ran a model and wanted to use the least square means and standards errors to create the graph. Is there an easy way to create a graph using least square means you got from fit model report? 

 

Thank you, 

Shanice