# Function: Exercise2_3.py (Chapter 2, Exercise 3)
# Purpose: plots, formats, and labels a graph that compares two pieces of data
# Author: Emily G. Allen


# Import pylab
from pylab import *

# Import drug data
from DrugData import *

# this function takes five inputs:
# x, y: the data to be plotted
# format: the line format
# xtitle, ytitle: the labels for the x and y data

def Versus(x, y, format, xtitle, ytitle):
    plot(x, y, format) # make the plot

    # label the axes and create the title
    xlabel(xtitle) 
    ylabel(ytitle)
    title(xtitle + ' versus ' + ytitle + ' by High School Seniors 1979-2007')

    show() # show the graph
