Click here to see the SAS code.
Click here to see the example.

---------------------------------------------------------------

I got the data from:
http://www.taxfoundation.org/files/variousstaterates-20070626.xls
(I modified the spreadsheet and took out the special note symbols,
so it it just raw numbers, and saved in taxes.xls -- the original
data is in taxes_orig.xls) and then impoted it into sas.

Then I plot the data with a pretty simple/standard gplot,
but I add a few special touches...

I make the plot larger, using xpixels & ypixels, so that the lines
aren't so crowded, and I use the symbol statement's "pointlabel"
option to label each data point with the state abbreviation (since
there are too many lines for a color legend to be useful for 
identifying which line is which).

I also add html charttips for each data point (using gplot's 
html= option), so you can hover your mouse over each data point
and see the exact data values it represents.

Also, to make the plot less crowded & easier to read, I split
it into 2 plots ... the first one shows the states which had
over 100% increase in the cigarette tax, and the 2nd plot shows
states with less than 100% increase.  This makes the plots less
crowded, and in particular reduces the number of criss-crossing
lines (ie, the horizongal lines for the states with no change
in taxes don't cross the lines of the states with >100% increases),
since they're in 2 separate plots.

Back to Samples Index