How do I find the width of tick labels so that I can adjust the margins of my plot?
Wed, 12/29/2021 - 06:40 pm
I'm trying to make some generic code that will work with a range of my data. Essentially I want be able to generate graphs that have the margins already correct. My current problem in attempting this is that depending on the data I use my tick labels can be of differing width i.e. 1 (not wide) or 1000.000 (very wide) and these require differing margins on the vertical axes.
My question therefore is, is there a way to determine the width taken by the tick label so that I can adjust the margins correctly?
Let me know if I can provide more info or clarification on my issue
Many thanks for your help!