Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Graphing zero on Y = the bottom line for X & more


From   SamL <[email protected]>
To   Stata Listserve <[email protected]>
Subject   st: Graphing zero on Y = the bottom line for X & more
Date   Tue, 20 Jan 2004 18:46:53 -0800 (PST)

Stata 8.0 on Linux defaults are for the zero point on the y axis to be
slightly raised, so that the x axis does not actually meet up at visual
(0,0).  I am sure there are stylistic reasons for this, but what I want to
do is have the visual corner of the figure/graph (x,y) to be (0,0).  I
want a similar fix for 1.0, which I want to be the top (and end) of the
graph.

I am graphing a probability (y-axis) by year (x-axis).  I want the highest
visible value in the graph to be 1 (certain yes) and the lowest visible
value in the graph to be 0 (certain no).  Visually, as the lines get close
to zero or one, this implication (of nearing (but not reaching) certainty)
gets lost because of the buffer created in the graph.  Thus, I want to get
rid of that buffer, so it will more easily indicate just how close and how
far away one is from the limits of the probabilities.

Any assistance in this matter is greatly appreciated.

For more info, I have copied a bit of code that graphs some data, to show
what I am doing, and that I already have a bunch of bells and whistles
going, which will mean integrating this new feature into the existing
code.  I use ";" as the end of command, so that is present but means
little in this context.

==============part of a graphing job below =======

set scheme s2mono;

graph twoway line savmar savsing year, yscale(r(0 1.00))
 ylabel(0(.1)1)
 xlabel(1975(5)2000)
 ytitle("Probability of Saving More Than 10% of Income")
 xtitle("Year")
title("Figure 1.2.6--Probability of Saving More Than 10% of Income,"
 "by Marital Status")
 clpattern("l" "-")
 legend(label(1 "Married") label(2 "Not Married")) ;

====end of the part of the graphing job, above======

Thanks for any help anyone can provide.

Sam


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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