image

 

My experiments with pgplot continues. I think the installation is little tricky.

The problem is when we download the library we get so many files and folder and so many instructions, that most lose interest before even beginning.

So i created this small powerpoint to help anyone interested to install and use pgplot in windows.

This powerpoint explains the process of building and creating pgplot applications in fortran using intel fortran and qwin.

Installing and Using Pgplot in windows

 

Installing and Using Pgplot in windows

20 responses to “Installing and Using PGPLOT in Windows”

  1. Useful, thanks. But (unless I missed something) the standard installation doesn’t give you interactive graphics on the screen, only to files. I wrote some notes on how to do this using the GrWin package
    http://www.star.le.ac.uk/~cgp/pgplot_Fortran95_WinXP.html

    Clive Page

    Like

    1. Thanks Clive. I am using intel fortran and use qwin to draw the graphics. And we get interactive graphics. In fact the pics in the posts are screen grab of the demos that come with Pgplot.

      Thanks for the link. Will have a look!

      Like

  2. Dear Sukhbinder,

    Thanks a lot. I use dislin fortran library to embed plotting routines. Is pgplot better than dislin? Do you have any idea?

    Priyankar

    Like

    1. Thanks Priyankar, I have also used dislin library but not as much as pgplot. I am aiming to push Pgplot as much I can and when I hit a limit, I intend to see how dislin and other libraries do.

      Have you tried OpenGL fortran interface, the results look impressive!

      Like

  3. Hi Sukhbinder,

    Thanks for the steps for installing PGPLOT in Windows.
    But I have got stuck in the step where one has to set “Use /assume:byterecl” in the Data Tab.

    I am using PGI’s Visual Fortran Compiler with VS2010 Shell and in the
    pgplot property pages->Fortran the “Data” option is not coming. So I am not able to set the “Use /assume:byterecl” option. I tried to compile the project without the “Use /assume:byterecl” option but it is giving errors.

    Is it possible if I get the pgplot.lib from the internet that I can test the demos?

    Thanks & Regards,
    Anudeep

    Like

    1. Hi Anudeep,

      i think i have put this lib out in some post.. Please browse through https://sukhbinder.wordpress.com/category/pgplot/ I think you might find it there.

      Thanks for reading…

      Like

  4. I have got stuck in 8th dia. How can i compiling?

    Like

    1. I hope you are using windows visual studio with fortran compiler. If yes then these steps are sufficient. You might want to search the blog for building and using the pgplot via command line. Good luck!

      Like

      1. Succeeded! Thank you. I followed step by step the dias and i wanted to build and run pgdemo1.f and i got this:

        %PGPLOT, Unable to read font file: grfont.dat
        %PGPLOT, Use environment variable PGPLOT_FONT to specify the location of the PGPLOT grfont.dat file.
        Graphics device/type (? to see list, default /NULL):

        The grfont.dat file is in C:\pgplot

        Like

      2. Please keep the font file in the folder of the executable or set the environment variable pointing to the folder of the font file…….

        Like

  5. I created a new enviroment variable PGPLOT_FONT and this is pointing to grfont.dat. But i dont know why, it doesn’t work.

    Like

    1. For testing, can you try placing the file in the same directory as the executable, if this works then there is a problem in setting the environment variable. If it doesn’t work, try building the font file again. There’s might be something wrong in that file. Hope this helps. Do let me know. Good luck

      Like

  6. In pgpack.f, the next line is too long.
    OPEN (UNIT=2,STATUS=’NEW’,FORM=’UNFORMATTED’, FILE=’C:\pgplot\fonts\grfont.dat’)

    I tryed like this:

    OPEN (UNIT=2,STATUS=’NEW’,FORM=’UNFORMATTED’,
    +FILE=’C:\pgplot\fonts\grfont.dat’)

    Then the compiler write this:

    $ gfortran -c pgpack.f
    pgpack.f:82.51:

    OPEN (UNIT=2,STATUS=’NEW’,FORM=’UNFORMATTED’,
    1
    Error: Syntax error in OPEN statement at (1)
    pgpack.f:83.8:

    +FILE=’C:\pgplot\fonts\grfont.dat’)
    1
    Error: Invalid character in name at (1)

    Like

  7. worderfull explanation …
    can do a guide to install pgplot under gfortran in code::blocks ide (win7 64b)
    thanks

    Like

  8. This is an excellent explanation! I’d been struggling to get Pgplot to work in Intel Fortran and now it’s fixed! Thanks very, very much. R

    Like

    1. You are welcome. Glad it helped.

      Like

  9. I got stuck on slide 10. I do not have intel visual fortran and it is not free. Can I still install pgplot using cygwin and netbeans ? or what are the other options ?

    Like

    1. I am not sure about the steps but yes it’s possible to install pgplot with gfortran outside Intel fortran. Please google I remember seeing an excellent resource on that

      Like

  10. Very useful presentation,
    A question, if it is possible.
    Slide 9. Copy grfont.dat to the main folder. To my regret, I have only grfont.txt file.
    What’s is wrong?

    Like

    1. Hi Oksana. Thanks for reading and kind words. Please check slide 8, I think you might have missed adding the file name. And then compile the routine and run it.

      Please give it a try. Do let me know. I will check it again.

      Thanks
      Sukhbinder

      Like

Leave a comment

Trending