Installing and Using PGPLOT in Windows



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 thoughts on “Installing and Using PGPLOT in Windows

    • 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!

    • 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!

  1. 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,

    • 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!

      • 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

    • 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

  2. 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:


    Then the compiler write this:

    $ gfortran -c pgpack.f

    Error: Syntax error in OPEN statement at (1)

    Error: Invalid character in name at (1)

  3. 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

  4. 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 ?

  5. 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?

    • 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.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s