MATLAB 多个纵坐标_第1页
MATLAB 多个纵坐标_第2页
MATLAB 多个纵坐标_第3页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

帮找了一个 Canadan 做的 应该能解决楼主的问题 复制内容到剪贴板 代码代码 function ax hlines plotyyy x1 y1 x2 y2 x3 y3 ylabels PLOTYYY Extends plotyy to include a third y axis Syntax ax hlines plotyyy x1 y1 x2 y2 x3 y3 ylabels Inputs x1 y1 are the xdata and ydata for the first axes line x2 y2 are the xdata and ydata for the second axes line x3 y3 are the xdata and ydata for the third axes line ylabels is a 3x1 cell array containing the ylabel strings Outputs ax 3x1 double array containing the axes handles hlines 3x1 double array containing the lines handles Author Denis Gilbert Ph D physical oceanography Maurice Lamontagne Institute Dept of Fisheries and Oceans Canada email gilbertd dfo mpo gc ca Web http www qc dfo mpo gc ca iml April 2000 Last revision 14 Nov 2001 if nargin 6 ylabels 1 ylabels 2 ylabels 3 elseif nargin 7 error Too many input arguments elseif nargin 6 error Not enough input arguments end figure units normalized DefaultAxesXMinorTick on DefaultAxesYminorTick on ax hlines 1 hlines 2 plotyy x1 y1 x2 y2 cfig get gcf color pos 0 1 0 1 0 7 0 8 offset pos 3 5 5 pos 3 pos 3 offset 2 set ax position pos pos3 pos 1 pos 2 pos 3 offset pos 4 limx1 get ax 1 xlim limx3 limx1 1 limx1 1 1 2 limx1 2 limx1 1 ax 3 axes Position pos3 box off Color none XColor k YColor r xtick xlim limx3 yaxislocation right hlines 3 line x3 y3 Color r Parent ax 3 limy3 get ax 3 YLim line limx1 2 limx3 2 limy3 1 limy3 1 Color cfig Parent ax 3 Clipping off axes ax 2 set get ax 1 ylabel string ylabels 1 set get ax 2 ylabel string ylabels 2 set get ax 3 ylabel string ylabels 3 实例 在 Commond Window 里运行 复制内容到剪贴板 代码代码 x 0 0 1 0 2 0 3 0 4 0 426 0 5 0 6 0 688 0 7 0 8 0 9 1 0 y 268 95 272 36 275 07 277 07 277 93 278 276 5 267 16 248 2 244 3 200 37 137 71 58 7 a 0 0 225 0 408 0 566 0 693 0 718 0 776 0 82 0 831 0 831 0 818 0 784 0 6 k 2 55 2 254 2 063 1 886 1 733 1 687 1 552 1 368 1 207 1 187 1 023 0 873 0 6 ylabels 1 轴 1 ylabels 2 轴 2 ylabels 3 轴 3 ax hlines plotyyy x y x a x k ylabels leg

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论