BookmarkSubscribeRSS Feed
goodlife9
Calcite | Level 5

I am trying to do graph with sgpanel, try to use headbackcolor to highlighted the header in each column of panel, but headerbackcolor not working in my current sas 9.4. please help.  Is there some other way to get the header back color?

 

Thanks

 

 

4 REPLIES 4
ballardw
Super User

Can you show the code you are using to set that option?

And does the log show any warnings or errors? If so paste the log with the code and messages into a code box opened with the forum {i} icon to preserve message formatting.

goodlife9
Calcite | Level 5

 

here is the following error message.

 

2238 ods graphics / reset=width;

2239 ods graphics;
2240
2241 proc sgpanel data=sashelp.class;
2242 where age > 14;
2243 panelby age / uniscale=row proportional headerbackcolor=CX0000FF;
---------------
22
202
ERROR 22-322: Syntax error, expecting one of the following: ;, BORDER, COLHEADERPOS, COLUMNS, HEADERATTRS, LAYOUT, MISSING, NOBORDER, NOHEADER, NOVARNAME, NOWALL, ONEPANEL, PROPORTIONAL,
ROWHEADERPOS, ROWS, SKIPEMPTYCELLS, SORT, SPACING, SPARSE, START, UNISCALE.
ERROR 202-322: The option or parameter is not recognized and will be ignored.
2244 vbar name / response=height stat=mean;
2245 run;

NOTE: The SAS System stopped processing this step because of errors.

ballardw
Super User

@goodlife9 wrote:

 

here is the following error message.

 
2243 panelby age / uniscale=row proportional headerbackcolor=CX0000FF;
---------------
22
202
ERROR 22-322: Syntax error, expecting one of the following: ;, BORDER, COLHEADERPOS, COLUMNS, HEADERATTRS, LAYOUT, MISSING, NOBORDER, NOHEADER, NOVARNAME, NOWALL, ONEPANEL, PROPORTIONAL,
ROWHEADERPOS, ROWS, SKIPEMPTYCELLS, SORT, SPACING, SPARSE, START, UNISCALE.
ERROR 202-322: The option or parameter is not recognized and will be ignored.

 


And the appearance is why I suggested posting the log in a code box. The location of the -------- would appear under what you typed to indicate exactly which "Option or parameter is not recognized"

Which  exact version of SAS are you running? The headerbackcolor option appears to have been added for SAS 9.4.3.

You should be able to check your maintance level in the About SAS help.

goodlife9
Calcite | Level 5
My code is very simple:




ods graphics;

proc sgpanel data=sashelp.class;
where age > 14;
panelby age / headerbackcolor=pink;
vbar name / response=height stat=mean;
run;

ods graphics / reset=width;



the log message:


2262 ods graphics / reset=width;
2263 ods graphics;
2264
2265 proc sgpanel data=sashelp.class;
2266 where age > 14;
2267 panelby age / headerbackcolor=pink;
---------------
22
202
ERROR 22-322: Syntax error, expecting one of the following: ;, BORDER, COLHEADERPOS, COLUMNS, HEADERATTRS, LAYOUT, MISSING, NOBORDER, NOHEADER, NOVARNAME, NOWALL, ONEPANEL, PROPORTIONAL,
ROWHEADERPOS, ROWS, SKIPEMPTYCELLS, SORT, SPACING, SPARSE, START, UNISCALE.
ERROR 202-322: The option or parameter is not recognized and will be ignored.
2268 vbar name / response=height stat=mean;
2269 run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SGPANEL used (Total process time):
real time 0.01 seconds

cpu time 0.01 seconds


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
  • 4 replies
  • 821 views
  • 0 likes
  • 2 in conversation