I installed libplplot from Kubuntu Adept package manager, and chose “libplplot-fortran9″ package.
To test the code, I created the following fortran program:
program testplplot2d
use plplot
implicit none
real(plflt),dimension(6) :: x,y
real(plflt)::xmin,xmax,ymin,ymax
x=(/1,2,3,4,5,6/)
y=x**2
write(*,*) y
call plinit()
xmin=1.0
xmax=6.0
ymin=1.0
ymax=40.0
call plcol0(1)
call plenv(xmin,xmax,ymin,ymax,0,0)
call pllab('X','Y','Test 1D plot')
call plpoin(x,y,9)
call plline(x,y)
y=x**3
call plpoin(x,y,9)
call plline(x,y)
call plend()
end program testplplot2d
and then compiled it using this command:
gfortran -o simple simple.f90 `PKG_CONFIG_PATH=/usr/lib/pkgconfig pkg-config --cflags --libs plplotd-f95`
When I run ./simple, it asks me to choose the output device, and I chose “1″ which is the XWin display, and it plots as shown in the image below:

Filed under: Uncategorized Tagged: | kubuntu, plplot, ubuntu, visualization
Hi,
Thanks a lot! It works fine for me.
Cheers:)
Prateek