Is it possible to programmatically get the width and height of a figure in Makie assuming you did not explicitly specify them in the call to Figure()?
I’m curious because they would be helpful for placing a zoom box (BBox) on the figure. I could specify the location using normalized coordinates (between 0 and 1) and then scale them by the width or height of the figure.
I was able to find the fields within the figure object but I can’t seem to extract the number from them. My expectation is they would be specified based on some default value in units of pixels. That might be wrong, just my initial expectation.
I never find the need to do it. I typically have a theme with a standard size or I set it explicitly in the Figure() constructor. Afterwards I will also usually call resize_to_layout!(fig). Also, I found this pagevery helpful in getting figures printed out the way I wanted. Note that if you do bitmapped images like .png and are using them in latex doc you might need to scale them for them to appear the correct size (this wasn’t obvious to me until I tried to include them without any scaling). For example when I insert images I use something like this in latex docs: \includegraphics[width=5in,height=4in]{my_fig} (but thats after I followed the guidance in the above link on getting consistent figure sizes).