Background:
I have a PROC SHEWHART step that creates a control chart based on the sample number.
However, I want to override the sample number with the date rather than sample number.
I was going to do this by using a macro variable list and passing that into the AXIS Value option. However, I now see the AXIS Value option only replaces the major ticks and I have a macro variable for every single data point. Also, I don't know how SAS determines the number of major ticks and increments.
Thank you in advance for your help!
How many tick marks do you want? After about 25, they become of limited value anyway.
If you have date or datetime variables and unevenly spaced data in time, and you want the date or datetime variables on the x-axis, the link I gave you in your other thread is probably the best solution
There is no way to put tick marks at exactly the date or datetime values you want in the case of unevenly spaced data.
How many tick marks do you want? After about 25, they become of limited value anyway.
If you have date or datetime variables and unevenly spaced data in time, and you want the date or datetime variables on the x-axis, the link I gave you in your other thread is probably the best solution
There is no way to put tick marks at exactly the date or datetime values you want in the case of unevenly spaced data.
@narnia649 wrote:
Gotcha, thanks for the suggestion! I did take a look and wasn't a huge fan of the aesthetics of the block option. I am checking to see every option available.
Speaking as a long-time user of PROC SHEWHART, I am not aware of any better way to handle date or date-time data that is unevenly spaced on the x-axis. That doesn't mean that there is not a different method that you like better. Nevertheless, I would be interested in knowing what you decide on, and I would be interested in knowing if you find anything you like better.
Generally with Shewhart if I want control over the graph format, I find it's either to use Shewhart to calculate the control limits and other statistics and write all the data out to a dataset. Then I can use all the power of SGPLOT/GTL to generate a plot.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.