Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
An object based fortran 2003 / 2008 interface to gnuplot developed in CBFortran
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mohammad  
View profile  
 More options Feb 8, 9:52 am
Newsgroups: comp.lang.fortran
From: Mohammad <mohammad.rahm...@gmail.com>
Date: Wed, 8 Feb 2012 06:52:29 -0800 (PST)
Local: Wed, Feb 8 2012 9:52 am
Subject: An object based fortran 2003 / 2008 interface to gnuplot developed in CBFortran
ogpf ((http://mfort.codeplex.com/) ) is an object based module developed in Fortran 2003 / 2008 with object-oriented concept. It implements an interface to 2D/3D plotting in gnuplot.
The syntax ensembles the plot and surf commands in Matlab and Octave. There are some helper functions like linspace, and meshgrid to facilitate the plotting procedure.

There are these main procedures in ogpf

    plot
        plot a single vector v
        plot a vector y against vector x
        plot up to four pairs of x-y set at the same time
        plot a matrix Y versus a vector x
    surf
        surface plot
        mesh plot
        contour plot
    script
    meshgrid
    linspace

ogpf implements the interface through an object called gpf. It contains many methods and properties for making publication quality plots using gnuplot.

script method
The script method is a powerful procedure accepts almost any gnuplot valid command and create a script file to be executed by gnuplot.

interactive mode
It is possible to run the gnuplot interactively from fortran.

Save to file
There is an option, to save the ogpf output into a file which can be invoked later from gnuplot.
How to use
Requirements
- A fortran compiler supports Fortran 2003, like gfortran 4.7 (http://gcc.gnu.org/GFortran), other Fortran compilers also can be used.
- gnuplot 4.5 and later (http://gnuplot.info)
Make sure gnuplot is in your path. (Open a command window and type gnuplot to see if it is in your path)

    Download the source code and demo file from download area
    Create a fortran project contains the ogpf.f90 and demo.f90, compile, and build it
    Run the executable (output of step 2) and select the example you like to run

Download link:
(http://mfort.codeplex.com/)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
JWM  
View profile  
 More options Feb 8, 12:08 pm
Newsgroups: comp.lang.fortran
From: JWM <jwmwal...@gmail.com>
Date: Wed, 08 Feb 2012 10:08:57 -0700
Local: Wed, Feb 8 2012 12:08 pm
Subject: Re: An object based fortran 2003 / 2008 interface to gnuplot developed in CBFortran
On Wed, 08 Feb 2012 07:52:29 -0700, Mohammad <mohammad.rahm...@gmail.com>  
wrote:

Given that bash, dash, etc., have a particular meaning for $$, and that  
most implementations of a system call in a UNIX-like environment tend to  
invoke a shell interpreter, the demos are doomed to fail (by default)  
under Linux, Mac OS X, etc.  Using a suffix other than $$$ (or enclosing  
the filename in single quotes, or better yet, using a random name), fixes  
the issue.

One could also make /bin/sh point to .../wine/fakedlls/cmd.exe, but  
wouldn't that be weird? ;-)
--
John


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mohammad  
View profile  
 More options Feb 9, 1:36 am
Newsgroups: comp.lang.fortran
From: Mohammad <mohammad.rahm...@gmail.com>
Date: Wed, 8 Feb 2012 22:36:21 -0800 (PST)
Local: Thurs, Feb 9 2012 1:36 am
Subject: Re: An object based fortran 2003 / 2008 interface to gnuplot developed in CBFortran
John,
 The code has been tested under windows (xp, vista, 7) and it wroks fine! I had many feedbacks from windows user, indicating it works under different windows system! I have not Mac or Linux on my system to make a test! By the way, I have corrected the temporary file name!
 Please let me know, if other issues are existed!

/Mohammad


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
JWM  
View profile  
 More options Feb 9, 7:02 am
Newsgroups: comp.lang.fortran
From: JWM <jwmwal...@gmail.com>
Date: Thu, 09 Feb 2012 05:02:30 -0700
Local: Thurs, Feb 9 2012 7:02 am
Subject: Re: An object based fortran 2003 / 2008 interface to gnuplot developed in CBFortran
On Wed, 08 Feb 2012 23:36:21 -0700, Mohammad <mohammad.rahm...@gmail.com>  
wrote:

> John,
>  The code has been tested under windows (xp, vista, 7) and it wroks  
> fine! I had many feedbacks from windows user, indicating it works under  
> different windows system! I have not Mac or Linux on my system to make a  
> test! By the way, I have corrected the temporary file name!
>  Please let me know, if other issues are existed!

> /Mohammad

Line 45 in ogpf.f90 should rather be:
!    CHARACTER(LEN=*), PARAMETER :: operating_system ='linux'

Or, since you're using that variable only to delete the file, try a  
system-independent method (between lines 419 and 430):

     !Delete the temporary file
     inquire (FILE = fileName, EXIST = fileFound)
     if (fileFound) then
        open (NEWUNIT = tmpUnit, FILE = fileName, ACTION = 'WRITE', STATUS  
= 'OLD', IOSTAT = ios)
        if (ios == 0) CLOSE (tmpUnit, STATUS = 'DELETE')
     endif

Of course, the fileFound, tmpUnit and ios variables need to be properly  
declared.

--
John


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Richard Maine  
View profile  
 More options Feb 9, 11:00 am
Newsgroups: comp.lang.fortran
From: nos...@see.signature (Richard Maine)
Date: Thu, 9 Feb 2012 08:00:20 -0800
Local: Thurs, Feb 9 2012 11:00 am
Subject: Re: An object based fortran 2003 / 2008 interface to gnuplot developed in CBFortran

JWM <jwmwal...@gmail.com> wrote:
> Or, since you're using that variable only to delete the file, try a  
> system-independent method (between lines 419 and 430):

>      !Delete the temporary file
>      inquire (FILE = fileName, EXIST = fileFound)
>      if (fileFound) then
>         open (NEWUNIT = tmpUnit, FILE = fileName, ACTION = 'WRITE', STATUS
> = 'OLD', IOSTAT = ios)
>         if (ios == 0) CLOSE (tmpUnit, STATUS = 'DELETE')
>      endif

Unfortunately, that's not really system independent. It assumes that the
file in question can be opened as sequential access unformatted. It is
not necessarily so that you can open an arbitrary file that way on any
system. That is more than just an abstract possibility. I have seen
systems that would try to read at least the record header from the
initial record when opening the file. They would then get upset when the
first few bytes of the file did not look like a plausible unformatted
sequential record header for a reasonable record size.

I have had Fortran programs fail for exactly that reason, which is why
my personal library includes a delete_file subroutine in my collection
of system-dependent I/O routines. My default version of that subroutine
does things essentially identical to the above sample, but I do keep it
with my other system-dependent routines to facilitate porting in cases
where it doesn't work.

Not to speak of potential problems with permissions for opening with
action='write'. Yes, there are cases where you might have permissions to
delete a file, but not to write to it.

--
Richard Maine                    | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle           |  -- Mark Twain


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
JWM  
View profile  
 More options Feb 9, 12:59 pm
Newsgroups: comp.lang.fortran
From: JWM <jwmwal...@gmail.com>
Date: Thu, 09 Feb 2012 10:59:09 -0700
Local: Thurs, Feb 9 2012 12:59 pm
Subject: Re: An object based fortran 2003 / 2008 interface to gnuplot developed in CBFortran
On Thu, 09 Feb 2012 09:00:20 -0700, Richard Maine <nos...@see.signature>  
wrote:

Shouldn't it be sequential access formatted?

In the actual source code, by the time the file needs to be deleted, it  
has already been opened at least once, with no explicit ACCESS or FORM (so  
it's assumed sequential formatted).  That's why I didn't set the  
access/form explicitly.

--
John


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Richard Maine  
View profile  
 More options Feb 9, 2:51 pm
Newsgroups: comp.lang.fortran
From: nos...@see.signature (Richard Maine)
Date: Thu, 9 Feb 2012 11:51:16 -0800
Local: Thurs, Feb 9 2012 2:51 pm
Subject: Re: An object based fortran 2003 / 2008 interface to gnuplot developed in CBFortran

Ah, yes. Sorry. I'm used to always specifying form explicitly, so I have
to stop and think to recall the defaults; didn't stop long enough this
time. (The fact that I'd have to stop and think about the defaults is
exactly why I tend to specify explicitly).

> In the actual source code, by the time the file needs to be deleted, it
> has already been opened at least once, with no explicit ACCESS or FORM (so
> it's assumed sequential formatted).  That's why I didn't set the  
> access/form explicitly.

Ok. I didn't read the full file. I was just reacting to the comment
about that being system-independent and I clearly didn't look at enough
of the context.

--
Richard Maine                    | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle           |  -- Mark Twain


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel H  
View profile  
 More options Feb 14, 5:16 am
Newsgroups: comp.lang.fortran
From: Daniel H <no.spam.addr...@gmx.de>
Date: Tue, 14 Feb 2012 11:16:00 +0100
Subject: Re: An object based fortran 2003 / 2008 interface to gnuplot developed in CBFortran
Mohammad,

could you post here whenever you update your module?

Thanks

Daniel

On 02/08/2012 03:52 PM, Mohammad wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »