turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS/GRAPH and ODS Graphics
- /
- Can Axis Labels Mismatch Axis Tick Marks?

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-03-2012 03:22 PM

Is there a way to display axis tick marks using one measurement but display labels based on a different measurement?

I have been asked to plot a Kaplan-Meier curve with the x-axis showing tick marks as weeks but labeling in months. This is not as simple as assuming that a month has exactly 4 weeks. I am using the formula: MONTHS=(WEEKS*7)/30.4375. Thus, 8 weeks will not appear as 2 months but rather 1.84 months. In other words, my labels will be slightly off of my tick marks as I attempt to display below:

| | | | | | | | | | | | | | ...

0 1 2 13 ...

Accepted Solutions

Solution

10-03-2012
03:27 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to djbateman

10-03-2012 03:27 PM

Here's one trick you could use with gplot ...

You could annotate the monthly labels.

Here's a similar example where the x-axis is by month, and I annotate the year:

http://robslink.com/SAS/democd59/browser_wars_info.htm

If you want, you can totally suppress the individual tickmark values by using 'value=none' on the axis statement.

All Replies

Solution

10-03-2012
03:27 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to djbateman

10-03-2012 03:27 PM

Here's one trick you could use with gplot ...

You could annotate the monthly labels.

Here's a similar example where the x-axis is by month, and I annotate the year:

http://robslink.com/SAS/democd59/browser_wars_info.htm

If you want, you can totally suppress the individual tickmark values by using 'value=none' on the axis statement.