如何在MATLAB中保存封闭盒装区域的图表? [英] How can I save a plot with closed boxed area in MATLAB?
问题描述
当我保存图时,如何关闭右上方黑线的阴谋区域?
我不知道如何制作它或如何搜索,如果有人知道,请告诉我。
例如看下面显示的情节,缺少的行:
在保存图片之前,请使用 box
命令。这将包含您的情节,让您的示例图像中指定的周围黑匣子。只需致电:
框上;
要关闭它,请执行以下操作:
box off; b
$ b示例: code>%//为x和y绘制一条从1到5的直线
x = 1:5;
y = 1:5;
plot(x,y);
箱子;
这是情节的样子:
如果你是打开关闭,这就是情节的样子:
plot
,就像您在示例图片中看到的那样。在显示情节之后,保存图像以获得所需效果之前,只需在<; code>框上打<; code>即可。
How can I close the plot area with black lines in the top and right side when I save a plot?
I don't have any idea how to make it or how to search, if anyone knows please tell me.
For example look at the plot shown below, where the lines are missing:
Before you save your image, use the box
command. This will enclose your plot to have the surrounding black box as you have specified in your example image. Simply call:
box on;
To turn it off, do:
box off;
Example:
%// Plot a line from 1 to 5 for x and y
x = 1:5;
y = 1:5;
plot(x,y);
box on;
This is what the plot looks like:
If you were to turn boxing off, this is what the plot looks like:
box off;
is the default behaviour for plot
, as you have seen in the example image you have shown. Simply call box on;
after the plot is shown and before you save your image to get the desired effect.
这篇关于如何在MATLAB中保存封闭盒装区域的图表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!