- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is the simplest way of creating an plot in FORTRAN? All I want to do is graph f(x) in the y-axis and x in the x-axis. Thank you.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Whose Fortran do you have? If you have CVF, there's a SciGraph library in the Samples folder, which will do what you want. SciGraph doesn't yet work in Intel Fortran.
Steve
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are two ways to create a plot:
1. Use OpenGL as described in your compiler's manual (I've checked it for CFV 6.5 only). It's quite easy.
2. Use API just like in example below (CVF 6.5):
use dfwina
use dflogm
use dfwinty
...
type (dialog) MyDialog
type (t_paintstruct) ps
type (t_point) pt
real x0,y0,x,y
integer hDC
...
hDC=BeginPaint(MyDialog%hwnd,ps)
...
call MoveToEx(hDC,x0,y0,pt)
call LineTo(hDC,x,y)
...
call EndPaint(hWnd,ps)
See your compiler's help files for details or e-mail me at Antech@rambler.ru.
Best regards.
Andrew. From Russia With Love.
1. Use OpenGL as described in your compiler's manual (I've checked it for CFV 6.5 only). It's quite easy.
2. Use API just like in example below (CVF 6.5):
use dfwina
use dflogm
use dfwinty
...
type (dialog) MyDialog
type (t_paintstruct) ps
type (t_point) pt
real x0,y0,x,y
integer hDC
...
hDC=BeginPaint(MyDialog%hwnd,ps)
...
call MoveToEx(hDC,x0,y0,pt)
call LineTo(hDC,x,y)
...
call EndPaint(hWnd,ps)
See your compiler's help files for details or e-mail me at Antech@rambler.ru.
Best regards.
Andrew. From Russia With Love.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page