| 查看: 988 | 回复: 13 | |||
| 当前主题已经存档。 | |||
[交流]
画物理图形使用Origin的一个routine
|
|||
|
我们使用origin的时候,经常要导入数据并画图,很烦。于是我简单的写了个script 文件,画图方便得很。 如果你是高手请不要笑我,尽管这个东西很简单,可是对于很多新手还是很重要的。 因为我无法上传文件,所以贴在下面了。使用者可以直接copy到script窗口中之行,或者存为ogs文件由origin菜单调用。 手边还有一些其他的求积分,插值,平均,等script,如果这个版上喜欢用origin的人多并且对这个有兴趣再传。 如果你觉得对你有帮助,请推荐,谢谢。 plot.ogs #Plot all the data to one graph window and group them #Expert plot, group the file according to the last 3 character of their names #For expample, CMR010.rat, CMR020.rat, CMR030.rat, represent 1, 2, 3 Telsa respectively #Jinbo 2005 %O="(New Graph) (Appending Graph)"; %L="(Standard Plot) (Special Plot)"; if (neworappend==--){neworappend=1;} if (specialornot==--){specialornot=1;} if (%K=="" {%K=*.*;}if (%P=="" {%P=2:4}getn (Graph Type) neworappend:O (File Type) %%K (Plot Type) Specialornot:L (Expert Plot) expert:2s (Variable Range) %%P (Plot Data); if(neworappend==1) {win -t plot line.otp;%M=%H;} if(neworappend==2) {%M=%H;} getfile -m %K; if (expert==0) { if (specialornot==1) { loop(ii,1,count) { getfile -g ii; win -t data; #Let %N hold the worksheet windowns name, such as data1, data2... #%N=%H; open -w %A; #win -r %H %N%H; %N=%H; %Q=%N!wks.cName2$; win -a %M; layer -i %N_%Q; } layer -at; layer -g; } if (specialornot==2) { loop(ii,1,count) { getfile -g ii; win -t data; #Let %N hold the worksheet windowns name, such as data1, data2... #%N=%H; open -w %A; #win -r %H %N%H; %N=%H; %Q=%N!wks.cName2$; wks.col=2; %L=%[%H,>%[%H]-2]; wks.col.label$=%[%L,3].%[%L,>3] T; field=%[%H,>%[%H]-2]; for(;field>17;field-17); win -a %M; layer -i %N_%Q; set %N_%Q -c field; } layer -at; } } if (expert==1) { begin=%[%P,':']; end=%[%P,>':']; loop(ii,1,count) { getfile -g ii; win -t data; open -w %A; %N=%H; %Q=%N!wks.cName2$; field=%[%H,$(begin):$(end)]; for(;field>17;field-17); win -a %M; layer -i %N_%Q; set %N_%Q -c field; } layer -at; } |
» 猜你喜欢
之前让一硕士生水了7个发明专利,现在这7个获批发明专利的维护费可从哪儿支出哈?
已经有9人回复
心脉受损
已经有6人回复
博士申请都是内定的吗?
已经有8人回复
博士读完未来一定会好吗
已经有32人回复
读博
已经有5人回复
投稿精细化工
已经有4人回复
高职单位投计算机相关的北核或SCI四区期刊推荐,求支招!
已经有4人回复
导师想让我从独立一作变成了共一第一
已经有9人回复
Springer期刊投稿求助
已经有4人回复
Little-pan
木虫 (正式写手)
- 应助: 0 (幼儿园)
- 金币: 4055
- 帖子: 751
- 在线: 49.2小时
- 虫号: 97647
- 注册: 2005-11-09
- 专业: 凝聚态物性I:结构、力学和
2楼2006-02-22 07:23:00
3楼2006-02-22 10:37:46
miniearth
荣誉版主 (著名写手)
- 应助: 0 (幼儿园)
- 贵宾: 1.2
- 金币: 2513.2
- 帖子: 2204
- 在线: 116小时
- 虫号: 133961
- 注册: 2005-12-14
- 性别: GG
- 专业: 物理有机化学
4楼2006-02-22 10:45:10
steincat
荣誉版主 (知名作家)
天啊,小木虫
- 应助: 2 (幼儿园)
- 贵宾: 4.03
- 金币: 2370.7
- 散金: 105
- 红花: 6
- 帖子: 8498
- 在线: 298.6小时
- 虫号: 73507
- 注册: 2005-06-08
- 性别: GG
- 专业: 能源化工

5楼2006-02-22 11:24:35
6楼2006-02-22 12:01:38
weitong
金虫 (正式写手)
- 应助: 1 (幼儿园)
- 金币: 1351.1
- 散金: 26
- 红花: 2
- 帖子: 471
- 在线: 109.5小时
- 虫号: 114607
- 注册: 2005-11-23
- 性别: GG
- 专业: 凝聚态物性 II :电子结构
7楼2006-02-23 09:20:22
8楼2006-02-24 11:49:19
xiaopengshen
银虫 (正式写手)
- 应助: 0 (幼儿园)
- 金币: 475.9
- 散金: 529
- 红花: 1
- 帖子: 345
- 在线: 68.6小时
- 虫号: 110782
- 注册: 2005-11-20
- 专业: 电磁场与波
9楼2006-02-27 14:56:47
10楼2006-02-27 22:42:56













{%K=*.*;}
回复此楼


