cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
jennifer_n_blak
Level III

How do I KEEP the order of variables in a data set when graphing?

I understand that I can reorder by using the value ordering dropdown menu under column properties ( as indicated in other posts and videos). However this is needlessly time consuming for 50- 100 values that are already IN the correct order in the data set.  So I am just interested in keeping the data in the order in which it currently is.

Thanks so much for your help!

Jennifer

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How do I KEEP the order of variables in a data set when graphing?

If the data are in the order you want to use for the order of the graph, then just specify the Column Property "Row Order Levels" and it will use the order the data are found in the data table as the order to use in the graphic and other platforms

Jim

View solution in original post

8 REPLIES 8
txnelson
Super User

Re: How do I KEEP the order of variables in a data set when graphing?

If the data are in the order you want to use for the order of the graph, then just specify the Column Property "Row Order Levels" and it will use the order the data are found in the data table as the order to use in the graphic and other platforms

Jim
jennifer_n_blak
Level III

Re: How do I KEEP the order of variables in a data set when graphing?

Jim,

That worked and is exactly what I was looking for. Thank you SO much for your help!

Jennifer

Re: How do I KEEP the order of variables in a data set when graphing?

What would be the syntax for that?
dts:Tamb_Est << setProperty( "Row Order Levels");

and I tried
dts:Tamb_Est << setProperty( "Value Order","Row Order Levels");

Neither had the desired effect, please answer the question with an example.

Thanks!

Re: How do I KEEP the order of variables in a data set when graphing?

I want to set the column properties for Value Order like below in the GUI, but I want to do it in JSL.

 

 

value order.JPG

Re: How do I KEEP the order of variables in a data set when graphing?

I figured out the syntax...

 

id_values = dts:Tamb_Est << get values;
dts:Tamb_Est << setProperty("Value Ordering", id_values);
txnelson
Super User

Re: How do I KEEP the order of variables in a data set when graphing?

Great job.  I would like to add one fine point.

Your syntax does generate Value Order in the order of the values found in the current data table, it does not set Row Level Order.  The fine point is that if you would sort the data, and then perform an analysis or create a chart, the order of the values for your Tamb_Est would remain the same order as before the sort.  If you had set Row Order Levels, the data would be displayed in the new sorted order.

Jim
txnelson
Super User

Re: How do I KEEP the order of variables in a data set when graphing?

  1. The structure of the Value Order/Row Order Levels column properties changed in JMP 15.
  2. The easiest way to figure out what you need to do in JSL for any of the Column Properties, is to set them interactively, and then to use "Get Property" for the column property you are interested in.  The results will show the input structure you need to use to set the column property.
  3. I took the Big Class sample data table and set the Value Order to Row Order Levelsorder.PNG
  4. I then ran this little script
    names default to here(1);
    dt=current data table();
    
    order = dt:weight << get property("value order")
  5. It showed in the log file the structure of the Value Order column property that needs to be used
    {Row Order Levels( 1 )}
  6. This shows that to have set the Row Order Levels for the Weight column it would be
    dt:weight << set property( "Value Order", {Row Order Levels( 1 )};
Jim

Re: How do I KEEP the order of variables in a data set when graphing?

Great information. I already have a fix, but your "Get property" to figure out syntax sounds like a useful approach!