Problem Note 31189: DISCRETEORDER=DATA option ignored for dot plots in PROC SGPLOT
The DISCRETEORDER=DATA option is ignored by dot plots generated with the DOT statement of PROC SGPLOT. The tick mark values will be displayed in ascending order instead of data order.
To circumvent the problem, generate the plot using the SCATTER statement with PROC SGPLOT.
Operating System and Release Information
SAS System | SAS/GRAPH | 64-bit Enabled Solaris | 9.2 TS1M0 | 9.2 TS2M0 |
Linux | 9.2 TS1M0 | 9.2 TS2M0 |
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS1M0 | 9.2 TS2M0 |
Solaris for x64 | 9.2 TS1M0 | 9.2 TS2M0 |
Microsoft Windows Server 2003 Standard Edition | 9.2 TS1M0 | 9.2 TS2M0 |
Microsoft Windows 2000 Datacenter Server | 9.2 TS1M0 | 9.2 TS2M0 |
Microsoft Windows 2000 Professional | 9.2 TS1M0 | 9.2 TS2M0 |
OpenVMS on HP Integrity | 9.2 TS1M0 | 9.2 TS2M0 |
Microsoft® Windows® for x64 | 9.2 TS1M0 | 9.2 TS2M0 |
Microsoft Windows 2000 Advanced Server | 9.2 TS1M0 | 9.2 TS2M0 |
Microsoft Windows 2000 Server | 9.2 TS1M0 | 9.2 TS2M0 |
Microsoft Windows XP Professional | 9.2 TS1M0 | 9.2 TS2M0 |
HP-UX IPF | 9.2 TS1M0 | 9.2 TS2M0 |
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS1M0 | 9.2 TS2M0 |
Windows Vista | 9.2 TS1M0 | 9.2 TS2M0 |
64-bit Enabled AIX | 9.2 TS1M0 | 9.2 TS2M0 |
64-bit Enabled HP-UX | 9.2 TS1M0 | 9.2 TS2M0 |
z/OS | 9.2 TS1M0 | 9.2 TS2M0 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS1M0 | 9.2 TS2M0 |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS1M0 | 9.2 TS2M0 |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS1M0 | 9.2 TS2M0 |
Microsoft Windows XP 64-bit Edition | 9.2 TS1M0 | 9.2 TS2M0 |
*
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 sample code exhibits the incorrect behavior using the DOT statement of PROC SGPLOT and circumvents the issue using the SCATTER statement of PROC SGPLOT.
proc means mean data=sashelp.cars (where=(type eq 'SUV')) noprint;
var mpg_city mpg_highway;
class make;
output out=car_means mean=;
run;
proc sort data=car_means out=cars; by descending mpg_city; run;
ods graphics / reset width=720px height=640px;
title1 "Average MPG for SUV's by Make";
/* Incorrect ordering of Y-AXIS */
proc sgplot data=cars;
xaxis label="MPG";
yaxis discreteorder=data;
dot make / response=mpg_city;
dot make / response=mpg_highway;
run;
/* Circumvention */
proc sort data=car_means out=cars; by mpg_city; run;
proc sgplot data=cars;
xaxis label="MPG";
yaxis grid discreteorder=data;
scatter y=make x=mpg_city;
scatter y=make x=mpg_highway;
run;
The option DISCRETEORDER=DATA is ignored with PROC SGPLOT DOT plots. The tick mark values are listed in an ascending order instead of a data order.
Type: | Problem Note |
Priority: | high |
Date Modified: | 2008-03-14 15:50:33 |
Date Created: | 2008-02-13 16:28:36 |