- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I have to sets of X-Y data and I am trying to plot them using fortran, just to have a fast view of my results. However I don't have a clue how to create an x-y plot that would have two sets of data and that I could change every time my data and re-plot. The quality of the plot is not a major concern. Any suggestions?
Thanks a lot in advance
George
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your quick answer. My code generates the data and I would like to plot them automatically. Then the code is asking me if I want to change something and if yes I am going back , I am changing a parameter and a new set of data is produced which again I would like to plot them automatically. Just this. Your attachment bytheway looks very impressive!!
Thanks again
George
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The screenshot was of a dialog-based program made using Compaq Visual Fortran 6.6C.
The plot you see was drawn on a static text control given the OWNERDRAW style as follows (taken from
a post by Jugoslav Djugic) by first adding the control from the menu supplied by the resource editor then closing the resource file, then going into the resource file, opening it in the editor as atext file and editing it directly...then saving it and opening it as 'auto', when the control should now be visible as a 'hole' in the dialog!
(excerpt from Jugoslav's archived post begins).
"..Nevertheless, I think it's clearer to do the drawing in an owner-
drawn static control. So, make IDC_PLOTWINDOW an owner-drawn static control
Unfortunately, Visual Studio 5 (nor 6, as I checked) does not have "Owner drawn" check-box for static control on property sheet. You have to edit .rc file manually later - add SS_OWNERDRAW style to your control:
CONTROL "",IDC_PLOTWINDOW,"Static",SS_OWNERDRAW,11,16,116,120
(excerpt ends)
You might try modifying the style still further as follows:
CONTROL"",IDC_PLOTWINDOW,"Static",SS_OWNERDRAW | SS_SUNKEN | WS_GROUP,
175,0,269,192
(Make no other changes to the resource file, or you risk screwing it up, in fact it is a good idea to create a copy of it BEFORE you edit it, just in case, so that you can get back to normal if you do screw up accidentally.)
I then add Jugoslav's XFLOGM module into my project, add USE XFLOGM whereverI set up dialog callbacks and, for the static ownerdrawn control, add a callback for DLG_DRAWITEM that XFLOGM generates when windows issues a WM_DRAWITEM message.
USE XFLOGM
INCLUDE 'RESOURCE.FD'
EXTERNAL OnOwnerDraw
retlog=DlgSetSub(dlg,IDC_PLOTWINDOW,OnOwnerDraw,DLG_DRAWITEM)
I attach a zipped and edited version of an OnOwnerDraw call-back routine to show how it could work, as well as my old copy of XFLOGM (thanks, Jugoslav!)...
Best of luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
War Eagle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I have done it using movetoEX and MSFWIN$LineTo functions and that is very easy.
But it took me quite a long time to access the printer.
Let me know if you want my source code
Jean-Marc
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page