LearningENVI&IDL分享 http://blog.sciencenet.cn/u/dongyanqing Learning ENVI&IDL

博文

IDL中在一个窗口中绘制多个曲线并输出为png

已有 13932 次阅读 2013-6-2 01:42 |个人分类:IDL技术|系统分类:科研笔记| IDL, 多曲线

要点:

1、一个窗口,/current;

2、多个曲线的排列布局,layout关键字,参数[行,列,当前图索引]

直接上代码和效果图:

pro test_multi_plot_fun

 ;

 a = sin(findgen(200)/10)

 b = cos(findgen(200)/10)

 ;

 w = WINDOW(WINDOW_TITLE="Multi Show Window")

 for i=0,3L do begin

   for j=0,3L do begin

     if j Mod 2 then c = a else c =b      

     p = plot(c,/current,$

       layout=[4,4,i*4+j+1], $

       color = byte([randomu(e,/long),randomu(f,/long),randomu(g,/long)]))

   endfor    

 endfor

 w.save,'c:tempd.png'

end




https://blog.sciencenet.cn/blog-344887-695759.html

上一篇:IDL中求数组中出现次数最多的值
下一篇:感谢大家关注我的blog
收藏 IP: 113.123.152.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-3-29 21:13

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部