BookmarkSubscribeRSS Feed
Quentin
Super User

Hi,

 

I'm moving some SGPLOT code from 9.3 to 9.4M3, and I'm getting:

  WARNING: The data for boxes is incomplete or invalid. Some boxes will not be drawn.

 

I know I get the warning if there is a group with all missing values, e.g. below will generate it because y is always missing for group 1:

 

data a ;
  do group=1 to 5 ;
    do id=1 to 10 ;
      if group>=2 then y=ranuni(0) ;
      output  ;
    end  ;
  end ;
run ;

proc sgplot data=a ;
  vbox y / category=group ;
run ;

 

Are there any other conditions that would generate this warning?

 

I saw this note about a bug in 9.4M0 http://support.sas.com/kb/54/551.html, but it says it's fixed in M3, and indeed I could not replicate it when there is only 1 data point in a group.

 

I don't particularly like this warning.  And seems inconsistent that VBOX throws it, but VBAR does not throw an analagous warning.

 

proc sgplot data=a ;
  vbar group / response=y;
run ;

 

If it is only thrown when there is a group with all missing values, I will add it to my list of ignorable log warnings.

 

Thanks,

--Q.

BASUG is hosting free webinars Next up: Mike Sale presenting Data Warehousing with SAS April 10 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
2 REPLIES 2
ballardw
Super User

How about sharing the data and actual code submitted.

When something sounds like a data issue then check the data.

 

Perhaps you are using a FREQ option and the value for the FREQ is missing for one or more records of the box variable

Have you tried using the option MISSING?

Quentin
Super User

Thanks @ballardw.  The code in my post  is the actual code submitted (it generates sample data, and then PROC SGPLOT makes the plot).  And in 9.4 M3, it throws the warning (does not in 9.3).

 

In that example, it throws the warning because there is one group where all values of the response value are missing.

 

My question is, are there any other circumstances in which that warning would be generated?

 

My side comment is that the warning doesn't seem very useful, and is not generated in other similar situations, such as the vbar chart.

 

 

BASUG is hosting free webinars Next up: Mike Sale presenting Data Warehousing with SAS April 10 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 2204 views
  • 0 likes
  • 2 in conversation