Problem Note 55837: Formatted group values might be ignored when using the ODS Graphics procedures
The formatted value for a character group variable might be ignored when you create a graph using one of the ODS Graphics procedures.
The problem is most likely to occur when a character format is applied when using the LOESS, PBSPLINE, or REG statement with PROC SGPANEL or PROC SGPLOT. The problem can also occur when using the LOESSPLOT, PBSPLINEPLOT, or REGRESSIONPLOT statement in the Graph Template Language (GTL).
The problem occurs when the length of the group variable is shorter than the length of the longest formatted value.
To circumvent the problem, define a new group variable whose length is as long as the longest formatted value. See the sample code on the Full Code tab for an example.
Operating System and Release Information
SAS System | SAS/GRAPH | Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS1M0 | |
Microsoft Windows XP 64-bit Edition | 9.2 TS1M0 | |
Microsoft® Windows® for x64 | 9.2 TS1M0 | 9.4 TS1M4 |
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.2 TS1M0 | |
Microsoft Windows XP Professional | 9.2 TS1M0 | |
Windows Vista | 9.2 TS1M0 | |
Windows Vista for x64 | 9.2 TS1M0 | |
64-bit Enabled AIX | 9.2 TS1M0 | 9.4 TS1M4 |
64-bit Enabled HP-UX | 9.2 TS1M0 | 9.4 TS1M4 |
64-bit Enabled Solaris | 9.2 TS1M0 | 9.4 TS1M4 |
HP-UX IPF | 9.2 TS1M0 | 9.4 TS1M4 |
Linux | 9.2 TS1M0 | 9.4 TS1M4 |
Linux for x64 | 9.2 TS1M0 | 9.4 TS1M4 |
Linux on Itanium | 9.2 TS1M0 | 9.4 TS1M4 |
OpenVMS Alpha | 9.2 TS1M0 | 9.4 TS1M4 |
OpenVMS on HP Integrity | 9.2 TS1M0 | 9.4 TS1M4 |
z/OS | 9.2 TS1M0 | 9.4 TS1M4 |
Solaris for x64 | 9.2 TS1M0 | 9.4 TS1M4 |
Tru64 UNIX | 9.2 TS1M0 | 9.4 TS1M4 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
The following code shows how to create a new variable containing the formatted value to use as the group variable.
proc format;
value $ myfmt
'F'='Female'
'M'='Male';
run;
data class;
set sashelp.class;
/* The longest length of the formatted value is 6 */
length sex2 $6;
sex2=sex;
run;
proc sgplot data=class;
reg x=age y=height / group=sex2;
format sex2 $myfmt.;
keylegend / title='Class Gender';
run;
The formatted value for a group variable might be ignored when using the ODS Graphics procedures.
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2015-06-02 15:03:35 |
Date Created: | 2015-05-19 13:45:29 |