Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: AW: Shifting graph axis


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: Shifting graph axis
Date   Thu, 22 Jul 2010 17:26:57 +0200

<> 

You may be able to muddle through via

*************
sysuse auto, clear
sc mpg weight, ylab(0(10)41) yli(0, lstyle(foreground)) xsca(noline)
*************

See [G], p. 198.


HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Bert Jung
Gesendet: Donnerstag, 22. Juli 2010 16:46
An: [email protected]
Betreff: st: Shifting graph axis

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,
Bert

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:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index