Data visualization with SAS programming

Graph showing 'unknown' instead of values

Accepted Solution Solved
Reply
Super Contributor
Posts: 543
Accepted Solution

Graph showing 'unknown' instead of values

     Hi.

Did any one of you encounter a situation where SAS renders a graph showing "unknown" instead of the true values?

Please see attached.

And the code that creates:

ods graphics / reset width=5in imagename="Cancer" imagefmt=png
antialias=on;

   title "Prevalence of Something Bad";

   proc sgplot data=my_data;

series x=year y=something_bad_avg / markers;
yaxis values=(0 to .5 by .1);
xaxis values=(2000 to 2011 by 1);

   run;

Any idea what would cause this?

Thanks.

Actually, to be more concise, is not the plot procedure that causes the problem...but the proc means output lists "unknown" as possible values....

See another attachment.

Attachment
Attachment

Accepted Solutions
Solution
‎04-16-2013 11:44 AM
Respected Advisor
Posts: 4,606

Re: Graph showing 'unknown' instead of values

Try adding option NOINHERIT to your OUTPUT statement in proc means.

PG

View solution in original post


All Replies
Respected Advisor
Posts: 4,606

Re: Graph showing 'unknown' instead of values

What is the format attached to variable something_bad_freq  in my_data?

PG

PG
Super Contributor
Posts: 543

Re: Graph showing 'unknown' instead of values

Hi.

So, in the first step there is a proc means on the data, by year, that will list the average of a variable for each year.

That said average is then plotted.

So, the format is a number.

Solution
‎04-16-2013 11:44 AM
Respected Advisor
Posts: 4,606

Re: Graph showing 'unknown' instead of values

Try adding option NOINHERIT to your OUTPUT statement in proc means.

PG
Super Contributor
Posts: 543

Re: Graph showing 'unknown' instead of values

I shall try, and let you know.

Thank you!

Super Contributor
Posts: 543

Re: Graph showing 'unknown' instead of values

Thank you, Pierre.

It worked great. It was the format....

Thanks!

Post a Question
Discussion Stats
  • 5 replies
  • 250 views
  • 0 likes
  • 2 in conversation