Subscribe Bookmark RSS Feed

arranging the x-axis in a distribution of categorical data

doptimal

Community Trekker

Joined:

Jun 27, 2011

I'm working on a data set that is analyzing responses from a survey. When I create a distribution of the responses, say for question #1, the bins are arranged in the order set by alphabetizing the responses. For example, if the question was:

    What day do you most often shop for groceries

  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Sunday

Then, when I make the distribution of the answers, I will find the bins ordered alphabetically. I want them ordered as above. Of course, I could use "day number" instead of the names of the days, but I've got to present this stuff to non-technical people, and the last thing I need is one more thing to explain.

So, is there a way of specifying the order of the bins on the distribution plot that is created? I've spent some serious effort trying to find a way to do this, and can't.

Thanks in advance.

4 REPLIES
pmroz

Super User

Joined:

Jun 23, 2011

Set the VALUE ORDERING for the day column.  In JSL you can do this:

day_list = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday",     "Sunday"};

column(dt, "Day of Week") << set property(value ordering, day_list);

Jeff_Perkinson

Community Manager

Joined:

Jun 23, 2011

What version of JMP are you using?

Ever since version 7 JMP has recognized the days of the week (and other common lists) and ordered them appropriately.

If this is not working for you, please contact Tech Support to understand why.

Thanks!

Jeff

-Jeff
Jeff_Perkinson

Community Manager

Joined:

Jun 23, 2011

I should also point out that the Value Ordering property is available in the Column Info dialog, so there's no scripting necessary.

[Missing image]

-Jeff
doptimal

Community Trekker

Joined:

Jun 27, 2011

Jeff,

Thank you. It seemed odd to me that JMP would overlook giving me this capability. As much as I'm an evangelist for JMP, I would criticize the platform in that there are so many deeply buried capabilities. Before posting this, I had spent a significant amount of time trying to solve this on my own. There are so many drop down menus in so many places that it can be very hard to navigate. The flip side of that is that there is a tremendous amount of capability in JMP, but I'm wondering how many know about it or where to look for it. I couldn't figure out the right key words to use to find information in the help functions of JMP.

Thanks again Jeff, this solved the problem and it works perfectly.

Dave