lm_lxt 发表于 2014-6-5 10:37:19

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
重新编译即可!


效果:





等等。。。

百事可乐 发表于 2014-6-5 16:14:11

看不到图片哦

lm_lxt 发表于 2014-6-5 17:13:59

重新编辑了下,现在应该可以!

楚香饭 发表于 2014-6-5 17:23:36

花花绿绿的,好好看哦

heyzol 发表于 2014-6-6 20:46:11

图片是PNGCAIRO么

aliouying 发表于 2014-6-9 22:00:14

chuxf 发表于 2014-6-5 17:23
花花绿绿的,好好看哦

你的头像好漂亮的妹子~

楚香饭 发表于 2014-6-9 22:14:29

aliouying 发表于 2014-6-9 22:00
你的头像好漂亮的妹子~

这动作很好看,涛姐,气质女神(刘涛)

wubin 发表于 2014-9-3 20:43:36

为什么vs2008+ivf11运行失败了呢?

百事可乐 发表于 2014-9-3 22:30:21

出错要给错误提示哦,不然没法猜的,亲

wubin 发表于 2014-9-4 09:46:53

192行,error#6632:keyword arguments are invalid without an explicit interface.
页: [1] 2
查看完整版本: fortran调用gnuplot,史上最简单!