3

Suppose I want to graph some data and I want to set a specific range on the x-axis, like so:

sysuse auto, clear
scatter mpg price, xlabel(3000[1000]16000)

Stata seems to be interpreting this command to mean that I want roughly those limits and leaves a bit of extra space on the left and the right of those numbers. Is there any way to get rid of this extra space and to make graph cut off exactly at these numbers?

4

1 回答 1

3

通常我会指导您选择xscale()and yscale(),但在您的示例中,您所看到的与此无关。默认情况下,Stata 会在 周围添加一些空间,plotregion但您可以使用额外选项将其删除

plotregion(margin(zero))
于 2013-05-27T09:09:50.740 回答