You are on page 1of 4

/**********************************************************************

THE EUROPEAN STATE FINANCE DATABASE

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*/

/* File for later printing */


*filename malg043 '\rjb\malet\malg043.gsf';
35 *goptions gsfname=malg043
gsfmode=replace /*To replace any file of same name*/
dev=laser
hsize=10 /*Horizontal size of printout (inches)*/
vsize=7; /*Vertical size of printout*/
40
*--------------------------------------------------------------------*
| SPECIFY OTHER GENERAL GRAPHIC OPTIONS |
*--------------------------------------------------------------------*;
goptions nocell /*To prevent misalignment of symbols*/
45 nocharacters /*Ditto*/
ftitle=swiss /*Default font for first title line*/
htitle=1.4 /*Default ht for first title line*/
ftext=swissl /*Default font for all other text*/
htext=1 /*Default ht for all other text*/;
50
*--------------------------------------------------------------------*
| TITLE |
*--------------------------------------------------------------------*;
title1 ls=4.5 pct /*Leave space of 4.5% of screen height
55 above title*/
j=c /*Centre justify*/
'Graph 1: Total revenues of the French and English monarchies, '
'1660-1775';
title2 f=swiss /*Font for second title line*/
h=1.2 /*Ht for second title line*/
j=c /*Centre justify*/
'expressed in thousands of £ sterling';
5
*--------------------------------------------------------------------*
| FOOTNOTE |
*--------------------------------------------------------------------*;
footnote1 m=(10,5) pct /*Position footnote 10% of screen width
10 from left and 5% of screen height from
bottom*/
'Sources: France, various; England, O''Brien'
m=(50,+0) pct /*Position following text 50% of screen
width from left and at same height as
15 before*/
'\rjb\malet\malg043'
m=(75,+0) pct /*Position following text 75% of screen
width from left and at same height as
before*/
20 'Copyright ' f=special 'W' f=swissl ' ESFDB 1992';

*--------------------------------------------------------------------*
| 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*/

/*Use a note to label vertical axis*/


15 note m=(2,55) pct '£ sterling'
m=(2,51) pct '(thousands)';

/*Add a legend to explain symbols*/


note m=(25,77) pct f=special 'D'
20 m=(29,+0) pct f=swissl 'French revenues'
m=(25,-2.3) pct f=special 'I'
m=(29,+0) pct f=swissl 'English revenues';

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.

**********************************************************************/

You might also like