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]
Re: st: RE: Fwd: graph axes crossing at the origin if plotted values are negative
From
Susanne Elsas <[email protected]>
To
[email protected]
Subject
Re: st: RE: Fwd: graph axes crossing at the origin if plotted values are negative
Date
Mon, 26 Jul 2010 21:27:57 +0200
many thanks for your detailed explication,
susanne
Nick Cox schrieb:
Let's spell this out:
1. Stata is dedicated to the principle that axis ticks and labels should be kept out of the way of the data. So, axes, meaning here the orthogonal lines that carry tick and label information, are in Stata always peripheral to the data region.
2. You can only overrule this by subversion: i.e. by instructing Stata to place text and/or short lines in the data region adjacent to particular horizontal and/or vertical lines. Otherwise put, if you want axes cutting the data region, you must construct your own. There isn't a simple switch for Stata knowingly to break #1.
3. More positively, there is scope for subtle and even not so subtle manipulation of grid lines to emphasise any y = constant or x = constant. See for example
SJ-9-4 gr0043 . . . . . . . . . . Stata tip 82: Grounds for grids on graphs
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N. J. Cox
Q4/09 SJ 9(4):648--651 (no commands)
tip on when a grid within a graph is appropriate
The code for the more substantial example in that Tip is repeated here:
sysuse citytemp
clonevar tempjanC = tempjan
replace tempjanC = (5/9) * (tempjanC - 32)
clonevar tempjulC = tempjuly
replace tempjulC = (5/9) * (tempjulC - 32)
scatter tempjulC tempjanC, ms(oh) ///
xli(0, lstyle(grid) lc(white) lw(*1.5)) ///
xla(, grid glc(white)) yla(, ang(h) glc(white)) ///
plotregion(color(gs14)) xsc(lcolor(gs14)) ysc(lcolor(gs14)) ///
note({c 176}Celsius) ms(oh)
The main point is that without subversion you can emphasise lines of importance.
4. If Susanne really wants this, then other software is surely more convenient. From occasional offerings from students, I gather that MS Excel will provide. Alternatively, whether it is really a good idea remains moot.
Nick
[email protected]
Martin Weiss
============
Also note this thread: http://www.stata.com/statalist/archive/2009-02/msg01169.html
Susanne Elsas
=============
thank you for your answer,
i hoped to find a more regular way, to define the position of the axes
(including labels and ticks).
further suggestions are very welcome,
Martin Weiss
============
Try this recent thread: http://www.stata.com/statalist/archive/2010-07/msg01139.html
Susanne Elsas
=============
i would like the axes of a graph to cross at (0;0), even if some of the
plotted values are negative.
*
* 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/