Programming the statistical procedures from SAS

PROC SHEWHART IRChart = Plot x-axis against one value, but display another?

Reply
New Contributor
Posts: 2

PROC SHEWHART IRChart = Plot x-axis against one value, but display another?

Hello:

I'm using a PROC SHEWHART (DATA = work.SPCTable ); IRCHART.  I'm looking to plot our production batches on the X-axis with humidity on the Y-axis.  I'd like to plot the humidity against batch, but under the chart I'd like to see the dates along the X-axis.  I.e., plot against one parameter, but display another on the X-axis.  Make sense?

Respected Advisor
Posts: 2,655

Re: PROC SHEWHART IRChart = Plot x-axis against one value, but display another?

Try using a format, such that each batch has a formatted date associated.

Steve Denham

Trusted Advisor
Posts: 1,665

Re: PROC SHEWHART IRChart = Plot x-axis against one value, but display another?

You can't really plot two x-axis variables, but you can display the dates via the block variables that are in the IRCHART syntax.

For example, if year month and day are variables in your data set with obvious meaning, then this would give you a chart with effectively 2 different x-axes.

IRCHART HUMIDITY*BATCH(year month day);

I think for this to work properly, the data would have to be sorted by year month and day, and also by batch (which of course should have the same sort order as year month day)

Ask a Question
Discussion stats
  • 2 replies
  • 223 views
  • 3 likes
  • 3 in conversation