在Matlab中,如何更改轴方向? [英] In Matlab, how to change axis orientation?

查看:250
本文介绍了在Matlab中,如何更改轴方向?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在Matlab中编写脚本,使用plot3绘制3D图像.

I have been writing a script in Matlab that plots 3D images, by using plot3.

轴在此间隔内运行:

  • x:[1-> 0]
  • y:[0.01-> 0]
  • z:[0-> 1]

结果在此图中提供:

现在,我想更改轴的方向,并以该轴方向重新绘制图形:

Now I would like to change the orientation of my axis, and replot the figure with this axis orientation:

  • x:[0-> 1]
  • y:[0-> 0.01]
  • z:[0-> 1]

我该怎么办?

感谢!

推荐答案

您可以通过设置适当的direction属性来更改轴的方向,请参见XDir, YDir, ZDir属性. .mathworks.co.uk/help/techdoc/ref/axes_props.html"rel =" noreferrer>轴属性文档.这些属性的值为normalreverse.要反转一个轴(例如x轴)的方向,请使用

You can change the direction of an axis by setting the appropriate direction property, see the XDir, YDir, ZDir properties in the Axes Properties documentation. These properties have the value normal or reverse. To reverse the direction of one of your axis, say the x-axis, use

set(gca, 'XDir', 'reverse')

这篇关于在Matlab中,如何更改轴方向?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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