如何在八度范围内将两个以上的函数绘制到同一图形上,且具有非常不同的范围? [英] How do I plot more than two functions onto the same graph with very different ranges in Octave?

查看:237
本文介绍了如何在八度范围内将两个以上的函数绘制到同一图形上,且具有非常不同的范围?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

除了使用plotyy之外,我在Internet上找不到有关如何执行此操作的任何信息,后者似乎仅适用于两个功能.

I can't find any info on how to do this on the Internet other than to use plotyy which only seems to work for two functions.

推荐答案

来自Matlab文档:

From Matlab documentation:

为两个数据集使用右y轴

使用带有两个y轴的图形绘制三个数据集.画一组 与左y轴相关的数据.绘制两组关联的数据 通过使用两列矩阵使y轴正确.

Plot three data sets using a graph with two y-axes. Plot one set of data associated with the left y-axis. Plot two sets of data associated with the right y-axis by using two-column matrices.

x = linspace(0,10);
y1 = 200*exp(-0.05*x).*sin(x);
y2 = 0.8*exp(-0.5*x).*sin(10*x);
y3 = 0.2*exp(-0.5*x).*sin(10*x);

plotyy(x,y1,[x',x'],[y2',y3']);

这篇关于如何在八度范围内将两个以上的函数绘制到同一图形上,且具有非常不同的范围?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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