fortran调用gnuplot,史上最简单!
本帖最后由 lm_lxt 于 2014-6-5 17:13 编辑如果您对fortran比较自信,请直接阅读http://mfort.codeplex.com/。
如果感觉有问题,请按照下面的过程来做:
1.下载并安装gnuplot(http://gnuplot.info/),安装路径为d:/gnuplot;
2.下载ogpf-0.12(http://mfort.codeplex.com/)。
3.新建console工程,加入ogpf-0.12解压缩后其中的demo.f90和ogpf.f90.编译,观察结果。
如果提示编译错误,请注意:
打开ogpf.f90,将其中的一段代码改为下面的代码:
IF(Persist) THEN
!Fortran standard recommend to use call execute_command_line to invoke another program
!from within Fortran, the old method was to use call system
!Here by default Fortran standard is used, if you have a compiler does not support
!call execute_command_line, uncomment the following call system
!CALL system('gnuplot -persist '//fileName) !Obsolete method, use with old compilers
CALL system('d:/gnuplot/bin/gnuplot -persist '//fileName) !Fortran standard
ELSE
!CALL system ('gnuplot '//fileName) !Obsolete method, use with old compilers
CALL system ('d:/gnuplot/bin/gnuplot '//fileName)
END IF
重新编译即可!
效果:
等等。。。
看不到图片哦 重新编辑了下,现在应该可以! 花花绿绿的,好好看哦 图片是PNGCAIRO么 chuxf 发表于 2014-6-5 17:23
花花绿绿的,好好看哦
你的头像好漂亮的妹子~ aliouying 发表于 2014-6-9 22:00
你的头像好漂亮的妹子~
这动作很好看,涛姐,气质女神(刘涛) 为什么vs2008+ivf11运行失败了呢? 出错要给错误提示哦,不然没法猜的,亲 192行,error#6632:keyword arguments are invalid without an explicit interface.
页:
[1]
2