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
- /
- General Programming
- /
- Missing option not showing missing data in graph (...

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
- Highlight
- Email to a Friend
- Report Inappropriate Content

02-24-2013 09:07 PM

I want to plot the following data on a bar chart, where building ID is on the x-axis and value is the height of the bar. If the value is 0 or . I want the building id to show up on the x axis. I am using the missing and discrete options, but the building ids where value = . do not show up. Only Building ID #s 1, 2, 3, and 6 show up on the x-axis. When subgroup=subgroup and the missing option (and discrete option is not used) I get buildings 1-6 for the green category, buildings 1-6 for the blue category, and buildings 1-6 for the yellow category, on the x-axis. Only buildings 1-6, divided into each category should show up on the x-axis.

building value subgroup

1 22 green

2 0 green

3 44 blue

4 . yellow

5 . blue

6 0 blue

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

02-25-2013 08:47 AM

Hi,

try this:

**axis1 order = 1 to 6 by 1;**

proc gchart data = have;

vbar building/ discrete missing sumvar = value** maxis = axis1**;

run;quit;

Does this look like what you'd want?

Good luck.

Anca.

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

02-25-2013 11:41 AM

Since you are already using MISSING and DISCRETE, you can try OPTION MISSING=0 and see if this helps.

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

02-25-2013 02:33 PM

Specifying the order of the building ids (order=) worked best as the real data isn't building 1-6, but buildings 1, 4, 24, 236, 444, etc. Thanks for your help.