!------------------------------------------------------------------- !------------------------------------------------------------------- !------------------------------------------------------------------- subroutine clip_data (max_data, p2, use_plot1, use_plot2, use_plot3) use cesrv_struct use cesrv_interface implicit none type (p2_plot_struct) :: p2 real(rp) maxim, max_data logical use_plot1, use_plot2, use_plot3 ! rescale without y_limit on call clip_calc (p2%plot1, use_plot1) call clip_calc (p2%plot2, use_plot2) call clip_calc (p2%plot3, use_plot3) !---------------------------------------------------------- contains subroutine clip_calc (p1, use_it) type (p1_plot_struct) p1, p_temp integer i, j logical use_it ! rescale without y_limit on if (.not. use_it) return p_temp = p1 p_temp%y_limit = -1 p_temp%p2%x_axis_type = 'INDEX' call plotting_data_calc (p_temp) maxim = max_data if (maxim == 0) maxim = p1%y_axis%max ! for wave plots which go to index 150 check if j is in bounds. do i = 1, p_temp%n_use if (abs(p_temp%y(i)) >= maxim) then j = p_temp%p2%ix(i) if (j > ubound(p_temp%d1%d, 1)) cycle if (associated(p2%plot1%d1)) p2%plot1%d1%d(j)%good_user = .false. if (associated(p2%plot2%d1)) p2%plot2%d1%d(j)%good_user = .false. if (associated(p2%plot3%d1)) p2%plot3%d1%d(j)%good_user = .false. endif enddo if (associated(p2%plot1%d1)) call set_useit_plot (p2%plot1) if (associated(p2%plot2%d1)) call set_useit_plot (p2%plot2) if (associated(p2%plot3%d1)) call set_useit_plot (p2%plot3) end subroutine end subroutine