Sample 25599: Rotate a scatter plot using PROC G3D
This example uses PROC G3D to produce a scatter plot of humidity data. It uses color to distinguish air temperature ranges. The plot is rotated -15 degrees.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This example uses PROC G3D to produce a scatter plot of humidity data. It uses color to distinguish air temperature ranges. The plot is rotated -15 degrees.
The graphics output in the Results tab was produced using SAS® 9.2. Submitting the sample code with releases of SAS prior to SAS 9.2 might produce different results.
/* Set the graphics environment */
goptions reset=all cback=white border htitle=12pt htext=10pt;
/* Generate the data set WORK.HUMID */
data humid;
length colorval $ 8.;
label wtemp='Wet-Bulb Temp';
label relhum='Rel. Humidity';
label atemp=' Air Temp.';
input Atemp Wtemp Relhum;
if atemp<26 then colorval="vibg";
else if atemp>=26 and atemp<+52 then colorval="mob";
else if atemp>=52 and atemp<+78 then colorval="depk";
else if atemp>=78 and atemp<+104 then colorval="grp";
else if atemp>104 then colorval="deoy";
datalines;
0 1 67
0 2 33
0 3 1
5 1 73
5 2 46
5 3 20
10 1 78
10 2 56
10 3 34
10 4 13
10 5 5
15 1 82
15 2 64
15 3 46
15 4 29
15 5 11
20 1 85
20 2 70
20 3 55
20 4 40
20 5 26
20 6 12
25 1 87
25 2 74
25 3 62
25 4 49
25 5 37
25 6 25
25 7 13
25 8 1
30 1 89
30 2 78
30 3 67
30 4 56
30 5 46
30 6 36
30 7 26
30 8 16
30 9 6
35 1 91
35 2 81
35 3 72
35 4 63
35 5 54
35 6 45
35 7 36
35 8 27
35 9 19
35 10 10
35 11 2
40 1 92
40 2 83
40 3 75
40 4 68
40 5 60
40 6 52
40 7 45
40 8 37
40 9 29
40 10 22
40 11 15
40 12 7
45 1 93
45 2 86
45 3 78
45 4 71
45 5 64
45 6 57
45 7 51
45 8 44
45 9 38
45 10 31
45 11 25
45 12 18
45 13 12
45 14 6
50 1 93
50 2 87
50 3 74
50 4 67
50 5 61
50 6 55
50 7 49
50 8 43
50 9 38
50 10 32
50 11 27
50 12 21
50 13 16
50 14 10
50 15 5
55 1 94
55 2 88
55 3 82
55 4 76
55 5 70
55 6 65
55 7 59
55 8 54
55 9 49
55 10 43
55 11 38
55 12 33
55 13 28
55 14 23
55 15 19
55 16 11
55 17 9
55 18 5
60 1 94
60 2 89
60 3 83
60 4 78
60 5 73
60 6 68
60 7 63
60 8 58
60 9 53
60 10 48
60 11 43
60 12 39
60 13 34
60 14 30
60 15 26
60 16 21
60 17 17
60 18 13
60 19 9
60 20 5
60 21 1
65 1 95
65 2 90
65 3 85
65 4 80
65 5 75
65 6 70
65 7 66
65 8 61
65 9 56
65 10 52
65 11 48
65 12 44
65 13 39
65 14 35
65 15 31
65 16 27
65 17 24
65 18 20
65 19 16
65 20 12
65 21 9
65 22 5
65 23 2
70 1 95
70 2 90
70 3 86
70 4 81
70 5 77
70 6 72
70 7 68
70 8 64
70 9 59
70 10 55
70 11 51
70 12 48
70 13 44
70 14 40
70 15 36
70 16 33
70 17 29
70 18 25
70 19 22
70 20 19
70 21 15
70 22 12
70 23 9
70 24 6
70 25 3
75 1 96
75 2 91
75 3 86
75 4 82
75 5 78
75 6 74
75 7 70
75 8 66
75 9 62
75 10 58
75 11 54
75 12 51
75 13 47
75 14 44
75 15 40
75 16 37
75 17 34
75 18 30
75 19 27
75 20 24
75 21 21
75 22 18
75 23 15
75 24 12
75 25 9
75 26 7
75 27 4
75 28 1
80 1 96
80 2 91
80 3 87
80 4 83
80 5 79
80 6 75
80 7 72
80 8 68
80 9 64
80 10 61
80 11 57
80 12 54
80 13 50
80 14 47
80 15 44
80 16 41
80 17 38
80 18 35
80 19 32
80 20 29
80 21 26
80 22 23
80 23 20
80 24 18
80 25 15
80 26 12
80 27 10
80 28 7
80 29 5
80 30 3
85 1 96
85 2 92
85 3 88
85 4 84
85 5 81
85 6 77
85 7 73
85 8 70
85 9 66
85 10 63
85 11 59
85 12 57
85 13 53
85 14 50
85 15 47
85 16 44
85 17 41
85 18 38
85 19 36
85 20 33
85 21 30
85 22 27
85 23 25
85 24 22
85 25 20
85 26 17
85 27 15
85 28 13
85 29 10
85 30 8
85 31 6
85 32 4
85 33 2
90 1 96
90 2 92
90 3 89
90 4 85
90 5 81
90 6 78
90 7 74
90 8 71
90 9 68
90 10 65
90 11 61
90 12 58
90 13 55
90 14 52
90 15 49
90 16 47
90 17 44
90 18 41
90 19 39
90 20 36
90 21 34
90 22 31
90 23 29
90 24 26
90 25 24
90 26 22
90 27 19
90 28 17
90 29 15
90 30 13
90 31 11
90 32 9
90 33 7
90 34 5
90 35 3
95 1 96
95 2 93
95 3 89
95 4 86
95 5 82
95 6 79
95 7 76
95 8 73
95 9 69
95 10 66
95 11 63
95 12 61
95 13 58
95 14 55
95 15 52
95 16 50
95 17 47
95 18 44
95 19 42
95 20 39
95 21 37
95 22 34
95 23 32
95 24 30
95 25 28
95 26 25
95 27 23
95 28 21
95 29 19
95 30 17
95 31 15
95 32 13
95 33 11
95 34 10
95 35 8
100 1 96
100 2 93
100 3 89
100 4 86
100 5 83
100 6 80
100 7 77
100 8 73
100 9 70
100 10 68
100 11 65
100 12 62
100 13 59
100 14 56
100 15 54
100 16 51
100 17 49
100 18 46
100 19 44
100 20 41
100 21 39
100 22 37
100 23 35
100 24 33
100 25 30
100 26 28
100 27 26
100 28 24
100 29 22
100 30 21
100 31 19
100 32 17
100 33 15
100 34 13
100 35 12
105 1 97
105 2 93
105 3 90
105 4 87
105 5 84
105 6 81
105 7 78
105 8 75
105 9 72
105 10 69
105 11 66
105 12 64
105 13 61
105 14 58
105 15 56
105 16 55
105 17 51
105 18 49
105 19 46
105 20 44
105 21 42
105 22 40
105 23 38
105 24 36
105 25 34
105 26 32
105 27 30
105 28 28
105 29 26
105 30 24
105 31 22
105 32 21
105 33 19
105 34 17
105 35 15
110 1 97
110 2 93
110 3 90
110 4 87
110 5 84
110 6 81
110 7 78
110 8 75
110 9 73
110 10 70
110 11 67
110 12 65
110 13 62
110 14 60
110 15 57
110 16 55
110 17 52
110 18 50
110 19 48
110 20 46
110 21 44
110 22 42
110 23 40
110 24 38
110 25 36
110 26 34
110 27 32
110 28 30
110 29 28
110 30 26
110 31 25
110 32 23
110 33 21
110 34 20
110 35 18
115 1 97
115 2 94
115 3 91
115 4 88
115 5 85
115 6 82
115 7 79
115 8 76
115 9 74
115 10 71
115 11 69
115 12 66
115 13 64
115 14 61
115 15 59
115 16 57
115 17 54
115 18 52
115 19 50
115 20 48
115 21 46
115 22 44
115 23 42
115 24 40
115 25 38
115 26 36
115 27 34
115 28 33
115 29 31
115 30 29
115 31 28
115 32 26
115 33 25
115 34 23
115 35 21
120 1 97
120 2 94
120 3 91
120 4 88
120 5 85
120 6 82
120 7 80
120 8 77
120 9 74
120 10 72
120 11 69
120 12 67
120 13 65
120 14 62
120 15 60
120 16 58
120 17 55
120 18 53
120 19 51
120 20 49
120 21 47
120 22 45
120 23 43
120 24 41
120 25 40
120 26 38
120 27 36
120 28 34
120 29 33
120 30 31
120 31 29
120 32 28
120 33 26
120 34 25
120 35 23
125 1 97
125 2 94
125 3 91
125 4 88
125 5 86
125 6 83
125 7 80
125 8 78
125 9 75
125 10 73
125 11 70
125 12 68
125 13 66
125 14 64
125 15 61
125 16 59
125 17 57
125 18 55
125 19 53
125 20 51
125 21 49
125 22 47
125 23 45
125 24 44
125 25 42
125 26 40
125 27 38
125 28 37
125 29 35
125 30 33
125 31 32
125 32 30
125 33 29
125 34 27
125 35 26
130 1 97
130 2 94
130 3 91
130 4 89
130 5 86
130 6 83
130 7 81
130 8 78
130 9 76
130 10 73
130 11 71
130 12 69
130 13 67
130 14 64
130 15 62
130 16 60
130 17 58
130 18 56
130 19 54
130 20 52
130 21 50
130 22 48
130 23 47
130 24 45
130 25 43
130 26 41
130 27 40
130 28 38
130 29 37
130 30 35
130 31 33
130 32 32
130 33 30
130 34 29
130 35 28
;
run;
/* Define title and footnotes */
title 'Relative Humidity in Percent';
footnote1 j=l ' Source: William L. Donn, Meteorology, Fourth Edition';
footnote2 ' ';
/* Generate the graph */
proc g3d data=humid;
scatter atemp*wtemp=relhum
/ shape='pillar'
color=colorval
caxis=black
rotate=-15
size=.5
yticknum=5
xticknum=2
zticknum=4
zmin=0
zmax=100;
run;
quit;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This example uses PROC G3D to produce a scatter plot of humidity data. It uses color to distinguish air temperature ranges. The plot is rotated -15 degrees.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> G3D
|
Date Modified: | 2005-09-22 03:03:14 |
Date Created: | 2005-05-23 14:18:06 |
Operating System and Release Information
SAS System | SAS/GRAPH | z/OS | 9.1 TS1M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M0 | |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M0 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M0 | |
Microsoft Windows 2000 Server | 9.1 TS1M0 | |
Microsoft Windows 2000 Professional | 9.1 TS1M0 | |
Microsoft Windows NT Workstation | 9.1 TS1M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M0 | |
Microsoft Windows XP Professional | 9.1 TS1M0 | |
64-bit Enabled AIX | 9.1 TS1M0 | |
64-bit Enabled HP-UX | 9.1 TS1M0 | |
64-bit Enabled Solaris | 9.1 TS1M0 | |
HP-UX IPF | 9.1 TS1M0 | |
Linux | 9.1 TS1M0 | |
OpenVMS Alpha | 9.1 TS1M0 | |
Tru64 UNIX | 9.1 TS1M0 | |