How to change side of y-axis in histogram?

Viewed 14

If I use the hist command without any specifications or options, I get a histogram, where the only y-axis is located on the right side. I searched the web for options to change it to the left side, but all I could find was about a second y-axis or the title of the axis.

1 Answers

If you run this script

sysuse auto, clear
set scheme s1color
hist mpg
hist mpg, ysc(alt)

you should see

  1. The default in which the y axis is on the left.

  2. An alternative in which it is on the right.

These are standard options for graph twoway documented from help hist under two_way_options, in turn under axis_options, axis_scale_options.

All the help you need is included with the Stata version you are using. Googling is inefficient here.

Related