Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

st: Shifting graph axis

From   Bert Jung <>
Subject   st: Shifting graph axis
Date   Thu, 22 Jul 2010 10:46:23 -0400

Dear Statalisters,

I am looking for a way to shift the x-axis to be plotted at a
particular y-value.  I would like to shift everything, labels,
markers, xtitle etc instead of adding a simple -yline()-.  In the
below example, how can I shift the x-axis to intersect where y=0?  How
does this work in a case with two y-axis?

Many thanks in advance,

sysuse auto, clear
twoway scatter mpg weight, yscale( range( 0(10)40 ) ) ylabel( 0(10)40 )

twoway ( scatter mpg weight ) ( scatter length weight, yaxis(2) ),
yscale( range(0(10)40) axis(1) )  ylabel( 0(10)40 , axis(1) )  yscale(
range(0(50)250) axis(2) )  ylabel( 0(50)250 , axis(2) )
*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index