如何在MATLAB中保存封闭盒装区域的图表? [英] How can I save a plot with closed boxed area in MATLAB?

查看:176
本文介绍了如何在MATLAB中保存封闭盒装区域的图表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我保存图时,如何关闭右上方黑线的阴谋区域?



我不知道如何制作它或如何搜索,如果有人知道,请告诉我。



例如看下面显示的情节,缺少的行:



解决方案

在保存图片之前,请使用 box 命令。这将包含您的情节,让您的示例图像中指定的周围黑匣子。只需致电:

 框上; 

要关闭它,请执行以下操作:

  box off; b 



$ b示例: code>%//为x和y绘制一条从1到5的直线
x = 1:5;
y = 1:5;
plot(x,y);
箱子;

这是情节的样子:





如果你是打开关闭,这就是情节的样子:




box off; 是默认行为对于 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆