Plot with customize setting in command line
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello, I have some data which I want to save in various formats using the print function (specifically I have to save them in -dbmp, -depsc, -dsvg and I need to define some properties but that necessarily and obligatorily have to be written on the command line since what I have to do is for a few graphics and I would lose a lot of time with the export setup, among the things I try to achieve is that:
- The width of the figure is 8 cm and the height is automatic depending on the graph
- The background of the figure is white
- The content of the figure is adjusted as much as possible (something similar to what the "expand axes to fill figure" in the export setup does)
I am enclosing a sample image so you can see everything in mine:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/270139/image.bmp)
3 Kommentare
Jakob B. Nielsen
am 6 Feb. 2020
Some of it you can find from the figure documentation; type in doc figure in the command window. Amongst others;
Fig=figure('Color','white','Units','centimeters','Position',[15,10,8,8]);
plot(Fig,yourdatahere);
Will create a figure thats 8x8 cm (the first two arguments are the start point of the lower left corner) and with a white background. I dont know how you would achieve the expand axes effect though.
Antworten (0)
Siehe auch
Kategorien
Mehr zu Annotations finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!