Chapter Contents

Previous

Next
The GPLOT Procedure

Example 3: Adding a Right Vertical Axis


Procedure features:
BUBBLE2 statement options:
BCOLOR=
BSIZE=
CAXIS=
VAXIS=
Data set: REFLIB.JOBS
Sample library member: GR21N03

[IMAGE]

This example modifies Labeling and Sizing Plot Bubbles to show how a BUBBLE2 statement generates a right vertical axis that displays the values of the vertical coordinates in a different scale from the scale that is used for the left vertical axis. Salary values are scaled by dollars on the left vertical axis and by yen on the right vertical axis.

BUBBLE and BUBBLE2 statement options control the size and appearance of the bubbles and their labels. In particular, the VAXIS options calibrate the axes so that the data points are identical and only one set of bubbles appears.

Note:   If the data points are not identical, two sets of bubbles are displayed.  [cautionend]

 Note about code
libname reflib 'SAS-data-library';
goptions reset=global gunit=pct border cback=white
         colors=(black blue green red)
         ftitle=swissb ftext=swiss htitle=6 htext=3;
 Note about code
data reflib.jobs2;
   set reflib.jobs;
   yen=dollars*125;
run;
 Note about code
title1 'Member Profile';
title2 h=4 'Salaries and Number of Member Engineers';
footnote j=r 'GR21N03 ';
 Note about code
axis1 offset=(5,5)
      label=none
      width=3
      value=(h=4);
 Note about code
proc gplot data=reflib.jobs2;
   format dollars dollar7. num yen comma9.0;
   bubble dollars*eng=num / haxis=axis1
                            vaxis=10000 to 40000 by 10000
                            hminor=0
                            vminor=1
                            blabel
                            bfont=swissi
                            bcolor=red
                            bsize=12
                            caxis=blue;

   bubble2 yen*eng=num / vaxis=1250000 to 5000000 by 1250000
                         vminor=1
                         bcolor=red
                         bsize=12
                         caxis=blue;
run;
quit;


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.