Professional Documents
Culture Documents
5 Filename: c:\rjb\malet\malg043.doc
Purpose: To produce a line graph:'Total revenue of the French and
English monarchies, 1660-1775 expressed in £ sterling'
Date created: 21 May 1992
Date last altered:
10 SAS datasets used: c:\rjb\malet\malm040.ssd; \obrien\engm008.ssd
Raw data files used:
Graphics file created: c:\rjb\malet\malg043.gsf
Sources: various. See individual datasets
Source subset:
15 Source subset title:
Owner of file: RJ Bonney
Author of program: MMB
**********************************************************************/
20
*--------------------------------------------------------------------*
| SPECIFY GENERAL SETTINGS |
*--------------------------------------------------------------------*;
libname z 'c:\rjb\malet';
25 libname y 'c:\obrien';
*--------------------------------------------------------------------*
| READ STORED DATASET(S) INTO TEMPORARY DATASET(S) |
*--------------------------------------------------------------------*;
30 data a;
set z.malm040 (keep=year frevstt);
run;
data b;
35 set y.engm008;
if year >=1660 and year <=1775;
run;
*--------------------------------------------------------------------*
40 | SORT ALL DATASETS BY 'JOIN' COLUMN (USUALLY YEAR) |
*--------------------------------------------------------------------*;
proc sort data=a;
by year;
run;
45 proc sort data=b;
by year;
run;
*--------------------------------------------------------------------*
50 | MERGE DATASETS |
*--------------------------------------------------------------------*;
data m;
merge a b;
by year;
55 run;
*--------------------------------------------------------------------*
| PERFORM ANY CALCULATIONS/MANIPULATIONS REQUIRED |
*--------------------------------------------------------------------*;
*data m;
5 * set m;
*run;
*--------------------------------------------------------------------*
| SORT RESULTING DATASET BY X-AXIS VARIABLE (USUALLY YEAR) |
10 *--------------------------------------------------------------------*;
proc sort;
by year;
run;
15 *--------------------------------------------------------------------*
| SPECIFY DESTINATION FOR GRAPHIC OUTPUT |
*--------------------------------------------------------------------*;
/* Screen */
*goptions dev =screen
20 hsize=0 /*To use full screen width*/
vsize=0; /*To use full screen height*/
/* Printer (draft)*/
*goptions dev=laserd /*Choose draft laser printout*/
25 hsize=10 /*Horizontal size of printout (inches)*/
vsize=7; /*Vertical size of printout*/
/* Printer (quality)*/
goptions dev=laser
30 hsize=10 /*Horizontal size of printout (inches)*/
vsize=7; /*Vertical size of printout*/
*--------------------------------------------------------------------*
| DEFINE PLOTTING SYMBOLS |
*--------------------------------------------------------------------*;
25 symbol1 v =diamond /*Use diamond to plot points*/
i =join /*Join points with a line*/
l =1 /*Use line type no. 1*/
w =2; /*Use line of double width*/
symbol2 v == /*Use empty star to plot points*/
30 i =join /*Join points with a line*/
l =1 /*Use line type no. 1*/
w =2; /*Use line of double width*/
*symbol3 v =circle /*Use circle to plot points*/
i =join /*Join points with a line*/
35 l =1 /*Use line type no. 1*/
w =2; /*Use line of double width*/
*symbol4 v =: /*Use asterisk to plot points*/
i =join /*Join points with a line*/
l =1 /*Use line type no. 1*/
40 w =2; /*Use line of double width*/
*--------------------------------------------------------------------*
| DEFINE AXES |
*--------------------------------------------------------------------*;
45 /*Vertical axis*/
axis1 origin =(15,15) pct /*Position bottom of axis 15% of screen
width from left and 15% of screen height
from bottom*/
length =67 pct /*Make length of axis 67% of screen
50 size*/
width =2 /*Make axis line double width*/
order =0 to 24000 by 2000 /*Specify scale for axis*/
label =none; /*Suppress printing of label*/
55 /*Horizontal axis*/
axis2 origin =(15,15) pct
length =80 pct
width =2
order =1660 to 1780 by 10 /*Specify scale for axis*/
label =none; /*Suppress printing of label 'Year'*/
*--------------------------------------------------------------------*
5 | PRODUCE PLOT |
*--------------------------------------------------------------------*;
proc gplot;
plot frevstt*year=1 revtot*year=2/
overlay
10 vaxis=axis1
haxis=axis2
skipmiss; /*Skip missing values*/
run;
25
/**********************************************************************
NOTES
The contents of this data file may not be reproduced without citation of the ESFDB
dataset name.
30
The English figures do not include annual loan income.
**********************************************************************/