SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Quiz: Creating Plots

Select the best answer for each question and click Score My Quiz.

  1. Which SAS statement below invokes a SAS/GRAPH procedure to produce a plot using a SAS data set named Year3 in a SAS data library assigned the libref Stats?

     a.  
    proc gchart data=stats.year3;
     b.  
    proc plot data=stats.year3;
     c.  
    proc gchart data=year3.stats;
     d.  
    proc gplot data=stats.year3;  

  2. Select the statement below that produces a single plot with the values of SysBP on the vertical axis and Month on the horizontal axis. The vertical axis should be ordered from 40 to 240 by 20, and the horizontal axis should display only JAN, APRIL, JULY, and OCT.

     a.  
    plot sysbp*month / vaxis=40 to 240 by 20
       haxis=jan april july october;
     
     b.  
    gplot sysbp*month / vaxis=40 to 240 by 20
       haxis='JAN' 'APRIL' 'JULY' 'OCT';
     
     c.  
    plot month*sysbp / haxis='JAN' 'APRIL' 'JULY' 'OCT'
       vaxis=40 60 80 100 120 140 160 180 200 220 240;
     
     d.  
    plot sysbp*month / vaxis=40 to 240 by 20
       haxis='JAN' 'APRIL' 'JULY' 'OCT';
     

  3. Select the statement below that produces two plots on a single pair of axes. The variables Sales and Rentals should be plotted against Year, and the vertical axis should be ordered from 0 to 10000 by 10.

     a.  
    plot (sales rentals)*year /
       vaxis=0 to 10000 by 10;
      
     b.  
    plot sales*year rentals*year /
       vaxis =0 to 10000 by 10 overlay;
     
     c.  
    plot sales rentals*year /
       vaxis=0 to 10000 by 10 overlay;
     
     d.  
    plot sales*year rentals*year /
       vaxis=0 to 10000 by 10 / overlay;
     

  4. One statement in the following program contains an error. Which statement is it?
    symbol1 v=none i=needle w=2 c=black;
    proc gplot data=crimes.misdemeanor;
       plot robbery*month;
       where robbery is 300;
    run; 

     a.   PROC GPLOT
     b.   PLOT
     c.   WHERE
     d.   SYMBOL1

  5. Which of the following INTERPOL= option values displays a smoothed line connecting the points on a plot?

     a.   SPLINE
     b.   NEEDLE
     c.   JOIN
     d.   CONNECT

  6. Assume that the current color list for your device consists of five colors. Select the description of the plot line for DiasBP that would result from the program below.
    symbol1 interpol=spline value=square width=2;
    symbol2 interpol=join value=triangle width=1.5;
    proc gplot data=clinic.admit;
       plot sysbp*week diasbp*week / overlay;
    run;

     a.   A straight line with a width of 1.5 connecting triangular plotting symbols.
     b.   A curved line with a width of 1.5 connecting triangular plotting symbols.
     c.   A curved line with a width of 2 connecting square plotting symbols.
     d.   A vertical line with a width of 1.5 drawn from each triangular plotting symbol to the horizontal line at zero on the Y axis.

  7. If you had originally submitted the following statement, select the statement you would use to change only the plotting symbol for the first plot line in subsequent plots.
    symbol1 interpol=spline color=blue width=2 value=star;

     a.  
    symbol2 interpol=spline color=blue
            width=2 value=square;
     
     b.   symbol2 value=square;
     c.   symbol1;
     d.   symbol1 value=square;

  8. If you are using RUN-group processing in interactive mode, which of the following methods would NOT end the PROC PLOT procedure?

     a.   submitting a DATA step
     b.   submitting another RUN statement
     c.   submitting a QUIT statement
     d.   submitting another PROC step

  9. Assume that the libref Shoes has already been assigned. Which statement stores the plot in a permanent catalog referenced with the libref Shoes?

     a.  
    proc gplot data=tryon.shoes gout=shoes.boots;
     b.  
    proc gplot data=tryon.shoes out=shoes.boots;
     c.  
    proc gplot data=tryon shoes gout=boots.shoes;
     d.   both a and b

  10. To view a permanently stored graph in a subsequent SAS session, which of the following windows can you use?

     a.   The GRAPH window
     b.   The Results window
     c.   The Explorer window
     d.   both a and c



back||next

Terms of Use & Legal Information | Privacy Statement