The best way to choose a frame size is by going to a bike shop and trying the various sizes. Height is a big part of it, but so is flexibility, intended use, body proportions, and personal preference.
In general, you would be looking at a 17, 18, or 19" mountain bike, and roughly a 56cm road bike. (Those sizes would also fall under Medium most of the time.)
But sometimes you need to go up or down a size because sizes and geometries vary between manufacturers. For example, a 56cm Trek bicycle would fit you like a 54cm Cannondale road bike. So it pays to test out the bikes and go for a test ride before purchasing.