[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: -graph twoway- and x-axis positioning

From   "Stephen P. Jenkins" <>
To   <>
Subject   st: -graph twoway- and x-axis positioning
Date   Tue, 18 Nov 2008 19:04:55 -0000

An Excel-using colleague has asked me how to have the x-axis of a
twoway plot go through zero (or some other number) on the y-axis.

	sysuse auto
	ge y = price - 5000
	* x-axis below all values (default)
	scatter y mpg	
	* line through zero; axis labelling and ticks below
	scatter y mpg, yline(0) xscale(noline)
	* ? how to force x-axis through zero ?
I've looked through the [G] manual, and searched the Statalist
archive, but have not yet been able to discover how to do this.  (It's
not necessarily aesthetically desirable, I know, but I have been
presented with the 'challenge'.)

Professor Stephen P. Jenkins <>
Director, Institute for Social and Economic Research
University of Essex, Colchester CO4 3SQ, U.K.
Tel: +44 1206 873374.  Fax: +44 1206 873151.  
Survival Analysis using Stata: 
Downloadable papers and software:

Learn about the UK's new household panel survey, "Understanding

*   For searches and help try:

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