How to save high resolution plots without displaying it on the screen?
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I haven't found solution to use retina display with MATLAB, because the highest figure window size in pixels is far smaller than the retina resolution. I think this cannot be solved, this disadvantage of MATLAB at the moment. However without displaying the plot on the screen, is it possible somehow to save it? In case of putting a larger plot on the screen and using saveas, the saved picture file shows only part of the plot, so this is not a solution. Or is it possible to modify plot or saveas with proper options to handle this?
0 Commenti
Risposte (1)
Anudeep Kumar
il 11 Mar 2025
Hey Mr. M,
It sounds like the exportgraphics() function could be just what you need. This function allows you to save a plot without displaying it on the screen, and it offers various customization options.
“exportgraphics(obj,filename,Name,Value)” saves the contents of the graphics object specified by “obj” to a file. The graphics object can be any type of axes, a figure, a standalone visualization, a tiled chart layout, or a container within the figure. You have options of various Name Value pair as input for resolution, background colour etc.
Here's a quick example:
>>bar([10 22 31 43])
>>ax = gca;
>>exportgraphics(ax,'BarChart.jpg,’Resolution’,300)
The above code saves the content of the axes “ax” as a 300-DPI JPEG file.
You can refer these documentations for further information:
exportgraphics() documentation:
Save Figure with Specific Size, Resolution, or Background Color:
I hope that helped!
0 Commenti
Vedere anche
Categorie
Scopri di più su Printing and Saving in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!