如何在图形上添加X轴线? (matlab) [英] How to add a x-axis line to a figure? (matlab)

查看:177
本文介绍了如何在图形上添加X轴线? (matlab)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Matlab图形上添加一条在0处的x轴线,以便在将图形保存为jpg时可以比较我的数据以查看它是正数还是负数.做这个的最好方式是什么?我知道您可以使用line(),但这似乎很麻烦,因为您需要指定x和y范围.有没有更简单的方法?

I want to add a x-axis line at 0 to a Matlab figure so that I can compare my data to see if it is positive or negative when saving the figures to a jpg. What is the best way to do this? I know you can use line() but it just seems cumbersome because you need to specify the x and the y ranges. Is there an easier way?

推荐答案

我不相信有一种内置的方式更方便.我使用FileExchange中的hline()vline(),它们的工作方式像一个超级按钮:

I don't believe there is a built-in way that is more convenient. I use hline() and vline() from FileExchange, which work like a charm:

http://www.mathworks.com/matlabcentral/fileexchange/1039

这篇关于如何在图形上添加X轴线? (matlab)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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