pan_frac Subroutine

private subroutine pan_frac(fx, fy)

Shift view by a fraction of current world-space span.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: fx

Shift along x, as fraction of x span.

real(kind=real64), intent(in) :: fy

Shift along y, as fraction of y span.


Source Code

   subroutine pan_frac(fx, fy)
      !! Shift view by a fraction of current world-space span.
      ! Arguments
      real(real64), intent(in) :: fx
         !! Shift along x, as fraction of x span.
      real(real64), intent(in) :: fy
         !! Shift along y, as fraction of y span.
      real(real64) :: a, b, d
      if (fx /= 0.d0) then
         a = xtrans(st%xmin); b = xtrans(st%xmax); d = (b - a)*fx
         st%xmin = inv_x(a + d); st%xmax = inv_x(b + d)
         st%xauto = .false.
      end if
      if (fy /= 0.d0) then
         a = ytrans2(st%ymin); b = ytrans2(st%ymax); d = (b - a)*fy
         st%ymin = inv_y(a + d); st%ymax = inv_y(b + d)
         st%yauto = .false.
      end if
   end subroutine pan_frac