! gtool_axis.f90 - gtool4 graphic objects - axis
! Copyright (C) by TOYODA Eizi, 2000.  All rights reserved.
! vi: set sw=4 ts=8:

module gtool_axis 

    use gtool_data
    use dcl
    implicit none

    type GT_AXIS
	real:: lower, upper
	logical:: vertical
    end type

    interface Axis
	module procedure GtoolAxisDefault
    end interface

contains

    type(GT_AXIS) function GtoolAxisDefault(var, dimno, vertical) result(result)
	type(GT_VARIABLE), intent(in):: var
	integer, intent(in):: dimno
	logical, intent(in), optional:: vertical
	type(GT_VARIABLE):: dimvar
    continue
	dimvar = Dimension(var, dimno)
	result%lower = MinVal(dimvar)
	result%upper = MaxVal(dimvar)
	result%vertical = .FALSE.
	if (present(vertical)) then
	    result%vertical = vertical
	endif
	call Close(dimvar)
    end function

end module
