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

st: graph, bbox()


From   Finne Håkon <Hakon.Finne@sintef.no>
To   statalist@hsphsun2.harvard.edu
Subject   st: graph, bbox()
Date   Tue, 25 Jun 2002 11:31:21 +0200

Dear Statalisters,

Why doesn't r(gbox) after -graph, bbox()- return the values of bbox?
Example (default input based on Graphics manual for v.7 p. 62):

program define graphbox
	syntax [ varlist(default=none) ] [ , bbox(string) * ]
	if "`bbox'"=="" {
		local bbox = "1000,0,13500,15000,850,390,0"
		}
	if "`varlist'"=="" {
 		local varlist mpg weight
 		}
	di "`varlist'"
	gph open
	graph `varlist' , bbox(`bbox') `options'
	gph close
	local gbox = r(gbox)
	di "input bbox: `bbox'"
	di "output gbox: `gbox'"
	end

Now, with the auto dataset loaded:

. graphbox
input bbox: 1000,0,13500,15000,850,390,0
output gbox: 1000,0,13127,15000,850,390,0

Has Stata allocated 373 "rows" less to the graph than requested, or are bbox
and gbox two different concepts?

-- Håkon
hakon.finne@sintef.no
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index