According to ngram "he sat in" has slightly more frequency than "he sat on", but both are used, so they must be grammatically correct.
Could they be used interchangeably without different meaning? But if the meaning altered, what is the difference?
According to ngram "he sat in" has slightly more frequency than "he sat on", but both are used, so they must be grammatically correct.
Could they be used interchangeably without different meaning? But if the meaning altered, what is the difference?
Both are correct, in different contexts.
"On" means "atop of", and would be used for things that you sit on the surface of, such as a barstool.
"In" means "amongst" or "inside of", and would normally be used for something you sit within, such as a bathtub.
Returning to the chair example though, there are different types of chair and it is not uncommon to say someone is sitting in a chair if it is an armchair, as a person sort of sinks into them rather than perching neatly on top as on a barstool. There are other situations that call for an idiomatic change - for example, we tend to say someone is sitting on a bed if they are sitting on top of the covers, but if they get under the covers they are sitting in bed.
It gets even more complicated with things that you could be spoken of as being either "in" or "on". An example that springs to mind is sand. You could sit on a beach and be said to be sitting on the sand. But the texture of sand as a substance means you could be also spoken of as sitting in it if, for example, you were half-buried in it.
I get what you were trying to do with your ngram, but there really is no comparison between the two, or anything to be learned from the frequency of how often each is used. Both are used in different situations.