Figure in shrunk on screen when dimensions are set for publishing
13 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I want to create a figure of 5 x 5 cm to insert as a panel on a larger figure for academic publishing. I would like to set the fontsize in matlab so that it is consistent across panels (ie. 8). I could for example export the figure with exportgraphics and rescale the figure in an image editor but then, the fontsize ends up being scaled also, which I do not want.
My problem is that if I set the figure dimension to 5x5, its appearance on the screen (4K resolution) becomes very small (spanning around 100 x 100 pixels on screen). I would like to be able to scale the figure displayed on the screen so that the 5 x 5 cm figure spans say 1000 x 1000 pixels (similar as in a pdf which you would open and zoom in).
0 comentarios
Respuestas (1)
Jaswanth
el 3 de Mayo de 2024
Editada: Jaswanth
el 3 de Mayo de 2024
Hi Oliver,
To make a figure size appear larger on a 4K screen, you need to adjust the figure's DPI (dots per inch) setting. The DPI value controls how many pixels are used per inch of the figure, thus affecting its on-screen size. One possible solution is adding Resolution Name-Value Argument in your calls to the exportgraphics function. Default Resolution while using exportgraphics function is 150 which can be increased to desired value using Resolution Name-Value Argument.
Kindly refer to the code snippet below, where Resolution parameter has been utilized.
exportgraphics(gca, 'myFigure.png', 'Resolution', 300);
Please go through the following MathWorks documentations to learn more about Resolution Name-Value Arguments in exportgraphics function mentioned above: https://www.mathworks.com/help/matlab/ref/exportgraphics.html?s_tid=doc_ta#:~:text=Resolution%20%E2%80%94%20Resolution%20(DPI)
I hope the information provided above is helpful in accomplishing your task.
5 comentarios
Jaswanth
el 6 de Mayo de 2024
I regret if it sounded like a ChatGPT answer, but I would like to ascertain that my previous response was based on my own interpretation of the initial post and the subsequent comment. Could you please clarify what you mean by "zoom the figure"?
Specifically:
- Are you looking to enlarge the figure within the MATLAB environment for a clearer view on your screen, while keeping the dimensions intended for export unchanged?
- Are you looking for a way to ensure that zooming in on the figure within MATLAB figure window proportionally enlarges all elements, including text and graphics?
Ver también
Categorías
Más información sobre Printing and Saving en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!