Click here to see the SAS code. (sgplot)
Click here to see the SAS code. (gplot)

Click here to see the SAS code to import the data.

Click here to see the example. (2010)
Click here to see the example. (2011)
Click here to see the example. (2012)
Click here to see the example. (2013)
Click here to see the example. (2014)
Click here to see the example. (2015)

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

Note that I have re-written this example, to use Proc SGplot
rather than Proc Gplot!

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

Note that this example is included in the book SAS/Graph: Beyond the Basics,
and all the 'tricks' used to create it are described in great detail!

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

See my blog for more information about this graph!


I got all the mpg data from:
fueleconomy.gov

The later data is in xls spreadsheet form, and I use Proc Import
to read it into SAS data sets.

I use "ods htmlpanel" to tile multiple graphs side-by-side on the
same web page.

For each dot in the plot, I list all the vehicles represented by that
dot in the html charttip, and it has a drilldown to the anchor 
for the table of that kind of vehicles (such as 'compact_cars').

I use table's html= option to encode an html href= drilldown for
car in the table, to launch a google search for that vehicle,
so you can easily find pictures and more info about the cars.


Back to Samples Index