! Function tao_curve_name (curve, use_region) result (curve_name) ! ! Function to return the curve name in the form: ! plot_name.graph_name.curve_name ! For example: ! orbit.x.c1 ! ! Input: ! curve -- Tao_curve_struct: Curve ! use_region -- Logical: If present and True then use the region ! name instead of the plot name. Region name is ! 'NULL_REGION' if there is no assocaited region. ! ! Output: ! curve_name -- Character(60): Appropriate name. !- function tao_curve_name(curve, use_region) result (curve_name) use tao_struct implicit none type (tao_curve_struct) curve character(60) curve_name logical, optional :: use_region ! curve_name = '.' // trim(curve%g%name) // '.' // trim(curve%name) if (logic_option(.false., use_region)) then if (associated(curve%g%p%r)) then curve_name = trim(curve%g%p%r%name) // trim(curve_name) else curve_name = 'NULL_REGION' // trim(curve_name) endif else curve_name = trim(curve%g%p%name) // trim(curve_name) endif end function tao_curve_name