Plot with customize setting in command line
1 次查看(过去 30 天)
显示 更早的评论
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:

3 个评论
Jakob B. Nielsen
2020-2-6
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.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!