Is there a problem with plimagefr in Fortran95 or am I misunderstanding how
it should be used? A simple demo follows, and the plcont and plshades
displays produce the expected output but the plimagefr output is clearly
faulty (I've attached a screenshot of what I get -- hope the list will
accept).

program pl_2d
  use plplot
  implicit none

  real(kind=plflt), dimension(65,65) :: z
  real(kind=plflt), dimension(65) :: x, y
  integer :: i, j
  real(kind=plflt), dimension(256) :: cslevels
  real(kind=plflt), dimension(8) :: clevels
  real(kind=plflt) :: zmin, zmax, xmin, xmax, ymin, ymax
  do i = 1, 65
     x(i) = real(i-33, plflt)
     y(i) = real(i-1, plflt)
  end do

  do i = 1,65
     do j = 1, 65
        z(j,i) = ((x(j)/4._plflt)**3 - y(i)**2)
     end do
  end do

  xmin = minval(x) ; xmax = maxval(x)
  ymin = minval(y) ; ymax = maxval(y)
  zmin = minval(z) ; zmax = maxval(z)

  clevels = [ (zmin + (real(i, plflt)-0.5_plflt)*(zmax-zmin)/8._plflt,&
       &  i = 1, 8) ]
  cslevels = [ (zmin + real(i-1, plflt)*(zmax-zmin)/255._plflt,&
       &  i = 1, 256) ]

  call plsetopt("geometry", "800x800")
  call plstar(2,2)

  call plenv (xmin, xmax, ymin, ymax, 0, 0)
  call plcont(z, clevels, x, y)

  call plenv (xmin, xmax, ymin, ymax, 0, 0)
  call plshades(z, '', xmin, xmax, ymin, ymax, cslevels, 0, 0, 0, x, y)

  call plenv (xmin, xmax, ymin, ymax, 0, 0)
  call plimagefr(z, xmin, xmax, ymin, ymax, zmin, zmax, zmin, zmax, x, y)

  call plend

end program pl_2d

<<attachment: pl_2d.jpg>>

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Plplot-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to