Automatically Generate Linear Axis Range in Stata - Techtips Automatically Generate Linear Axis Range in Stata. You can use the regaxis command in Stata to automatically create axis ranges and ticks for variables that you want to plot together. For example, you run the regaxis command on variable Y and have it generate a Stata local macro that contains a suggested range for the Y axis.