Setting a plot width in cm, not pixels

Hello,

Is there any way to set a figure width in centimeters (or inches) regardless of the device resolution? I am not used to UI development and found several more or less dated and contradictory answers to this question searching the web.

Thanks!