Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: dot-dash-plot


From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   st: dot-dash-plot
Date   Mon, 19 Feb 2007 16:14:24 -0600

FWIW,

Tufte's dot-dash-plot ("The Visual Display of Quantitative Information" page
133) could be created as:

sysuse auto,clear

gen wherex = 11
gen wherey = 3000
gen pipe = "|"

twoway scatter mpg price , msize(small) || /// 
	scatter wherex price, ms(none) mlab(pipe) mlabcolor(black) /// 
	mlabpos(0) || ///
	scatter mpg wherey , ms(none) mlab(pipe) mlabang(vertical) /// 
	mlabcolor(black) mlabpos(0) || , ///
	legend(off) yscale(noline) ylabel(none) xscale(noline) ///
	 xlabel(none) xtitle(Price)

Where the idea of -gen pipe = "|".... - is taken from Nick Cox's "Speaking
Stata:  Graphing distributions" Stata Journal 4(1)

Scott



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index