Posted on December 11, 2009 by kurniawano
The default background color in plplot library is black while the frontcolor is red. To do this, use plscolbg and plcol0 function. The code in fortran is:
call plscolbg(255,255,255)
call plinit()
call plcol0(8)
Remember that plscolbg must be called before plinit. The above code change the background color to white (rgb=255,255,255) and the front color to brown (8, refer [...]
Filed under: Uncategorized | Tagged: plplot | Leave a Comment »
Posted on September 29, 2009 by kurniawano
In the previous post, we show how to plot 2D data with plcont. It plots the line contour. Now, how about if we want something more colorful? we can use a filled contour plot with the command plshade. The syntax is similar. But first, let’s look at the complete program.
program simple
use plplot
implicit none
real(plflt),dimension(6) :: x,y
real(plflt),dimension(6,6)::z,x2d,y2d,z2
real(plflt)::xmin,xmax,ymin,ymax,zmin,zmax
real(plflt),dimension(10)::clevel
real::step
integer::nlevel
integer::i,j
character*1 [...]
Filed under: Uncategorized | Tagged: plplot | Leave a Comment »
Posted on September 29, 2009 by kurniawano
In the previous post, we describe how to do a simple line plot. In this post, I will describe how to plot contour using Plplot libraries, particularly using the “plcont” function. Let’s look at the code first.
program simple
use plplot
implicit none
real(plflt),dimension(6) :: x,y
real(plflt),dimension(6,6)::z,x2d,y2d
real(plflt)::xmin,xmax,ymin,ymax,zmin,zmax
real(plflt),dimension(10)::clevel
real::step
integer::nlevel
integer::i,j
x=(/1,2,3,4,5,6/)
y=x
do i=1,6
do j=1,6
z(i,j)=x(i)*2*y(j)
x2d(i,j)=x(i)
[...]
Filed under: Uncategorized | Tagged: plplot | Leave a Comment »
Posted on September 18, 2009 by kurniawano
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)
[...]
Filed under: Uncategorized | Tagged: kubuntu, plplot, ubuntu, visualization | Leave a Comment »