Statalist


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

st: Re: RE: AW: Axes for graphs


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: Re: RE: AW: Axes for graphs
Date   Wed, 25 Feb 2009 20:20:14 +0100

<>
For anyone wishing to recreate Tony`s solution

********
sysuse auto, clear
su price, mean
g pricecentered=price-r(mean)
twoway (scatter mpg pricecentered), yline(20) xscale(range(-10000 10000)) xscale(line) xline(0)
********

Probably not the stuff of Philip´s dreams, but still...


HTH
Martin
_______________________
----- Original Message ----- From: "Lachenbruch, Peter" <[email protected]>
To: <[email protected]>
Sent: Wednesday, February 25, 2009 8:10 PM
Subject: st: RE: AW: Axes for graphs


What about using the axis scale command on the graph two way command? I centered the price data at its mean and gave the command twoway (scatter mpg pricecentered), yline(20) xscale(range(-10000 10000)) xscale(line) xline(0)
I drew a line at mpg=20 and at x=0.

Tony

Peter A. Lachenbruch
Department of Public Health
Oregon State University
Corvallis, OR 97330
Phone: 541-737-3832
FAX: 541-737-4001


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Martin Weiss
Sent: Wednesday, February 25, 2009 10:54 AM
To: [email protected]
Subject: st: AW: Axes for graphs

<>

Thumping through Mitchell, http://www.stata-press.com/books/vgsg.html
there is not much of what you want to be seen there, and I am afraid he
exhausts much of what Stata can do in terms of -graph-s.
You could look at the advanced examples in -help graph_combine-...


HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Bromiley,
Philip
Gesendet: Mittwoch, 25. Februar 2009 19:18
An: [email protected]
Betreff: st: Axes for graphs

Is there a way to have Stata put the axes in the center of the graph?
An editor wants the standard blackboard graph that has the y axis going
up the middle of the page and the x axis across the middle of the page
with the two meeting at (0,0).

Sort of like this:

Y

    5  |
    4  |
    3  |
    2  |
    1  |
______________________________________  X
-6 -5 -4 -3 -2 -1 |  1  2  3  4  5  6
    -2 |
    -3 |
    -4 |
    -5 |



Phil

Philip Bromiley
Dean's Professor in Strategy
Merage School of Business
University of California, Irvine
Irvine CA 92697-3125
(949) 824-6657

*
*   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/

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index