Find the answer to your Linux question:
Results 1 to 6 of 6
I have searched various websites and tried many times to install pgplot, but still cannot get it to install/work correctly. My most current try to get this program to install ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2013
    Posts
    2

    Help installing pgplot


    I have searched various websites and tried many times to install pgplot, but still cannot get it to install/work correctly.

    My most current try to get this program to install requires using g77, but even though I found g77 - 3.4.6 I cannot get that to install correctly because there are "dependency problems". I would assume this problem is with the most recent version of gcc I have installed.

    So, I would appreciate it greatly if someone could walk me through how to install pgplot or install g77.

  2. #2
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,651
    Open up the software manager, enter your password and search for pgplot. I'm guessing that it is pgplot5 that you need to install.
    "I used to be with it, then they changed what it was.
    Now what was it isn't it, and what is it is weird and scary to me.
    It'll happen to you too."

    Grandpa Simpson



    The Fifth Continent

  3. #3
    Just Joined!
    Join Date
    Feb 2013
    Posts
    2
    I have tried that and still no luck. Is there some way to test whether or not pgplot is installed?

    specifically I am running a fortran file which cannot find the pgplot functions.

    What I am doing is typing:

    gfortran file.f

    ( I then get the reply)

    /tmp/ccP3twV7.o: In function `plotfit_':
    orbits.f.text+0x14f4): undefined reference to `pgbegin_'
    orbits.f.text+0x151e): undefined reference to `pgenv_'
    orbits.f.text+0x1532): undefined reference to `pgqlw_'
    collect2: error: ld returned 1 exit status

  4. $spacer_open
    $spacer_close
  5. #4
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
    Posts
    1,304
    Hi.

    "...as with most UNIX systems, you link a program with PGPLOT with a command like the following:

    Code:
    f77 -o example example.f -L/usr/local/pgplot -lpgplot
    "
    Excerpt from PGPLOT Frequently Asked Questions

    Assuming that PGPLOT is installed, the important information here is that the library and possibly the location need to be specified. I think that's all you'll to add to your gfortran command. Perform a few experiments.

    Best wishes ... cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

  6. #5
    Just Joined!
    Join Date
    Oct 2014
    Posts
    1

    question pgplot

    Hello !!
    i installed pgplot but when compiling (with this instruction:# gfortran test.f90 -o test.exe -lpgplot) i have this problem.

    /tmp/ccpvxyDM.o: In function `MAIN__':
    test.f90.text+0x565): undefined reference to `pgbegin_'
    collect2: ld returned 1 exit status

    can you please help me ???
    thanks !!!

  7. #6
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
    Posts
    1,304
    Hi.

    Observations:

    1) the pgplot link above lists 4 linking solutions that could be adapted and tried. Note that they are/were for Solaris, hence the word adapt.

    2) My recollection is that pgplot is Fortran-77. Your code appears to be Fortran-90. I have no idea whether that would make a difference, but if none of the 4 solutions for linking work, then I would make sure everything is Fortran-77.

    3) The documentation for pgplot (pre-year 2000) suggests that it is old in general. While it still may be usable, perhaps a better use of one's time is to look for a replacement plotting package.

    4) There is an entry in the Debian repository:
    Code:
    pgplot5 - large subroutine library for plotting scientific data
    for a system like:
    Code:
    OS, ker|rel, machine: Linux, 3.2.0-4-amd64, x86_64
    Distribution        : Debian GNU/Linux 7
    which may be useful for comparison, and alleviation of installation / linking / execution problems.

    Good luck ... cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •