Clear Filters
Clear Filters

Preserve absolute size of all content in figure window

2 views (last 30 days)
Dear Matlab community
For many times I have run in this very problem and never could fully figure out a way to deal with it. This time it is really annoying, since I wanted to export a figure to .emf which is not possible on mac. I run Bootcamp and have the same Matlab version installed on both OS (2019b), so I went ahead and tried to do that on Windows.
Now the problem:
I cannot find any way to make the figures display in the same size including all the content. So I am talking about the figure window size, the actual size of the plot inside the window (without menu bar etc.), the font sizes of everything, the size of the legend box, the size of the legend markers, the marker sizes of scatter plots, the line width of scatter and line plots, etc.
My goal is NOT to make a GUI that is looks good on any system and screen. I want to have all dimensions of everything hardcoded and be displayed the same every time everywhere on any computer, so that I can export my plots for use in a document or presentation without having to worry about font sizes or linewidths. While it would be possible to use 'units' 'normalized', this would only work on a given screen size. Ideally this should work on both of my monitors (Retina Display and full HD external display) and on both OS. I tried using the 'characters' unit with no success and eve if I use 'centimeters' and actually measure with a ruler on my screen, I don't get the desired results. This is also extremely annoying when I send my code to somebody else that has a different OS and/or screen resolution.
Sidenote: Once I have the correct thing displayed on the screen, I am confident that i know how to save the figure so that the saved file looks the same as the displayed one. But I still don't know how to get there in the first place.
Please help, I would really appreaciate any comments a lot. Thank you!

Answers (0)

Categories

Find more on Graphics Performance in Help Center and File Exchange

Products


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!