subroutine set_plot (plot, data, do_set) use cesrv_struct use cesrv_interface implicit none type (p2_plot_struct), target :: plot type (d2_data_struct) :: data character(20) where logical, optional :: do_set ! if (.not. logic_option (.false., do_set) .and. logic%plot_locked) return ! store current plot info into old data struct and point to new data struct if (associated(plot%d2)) then plot%d2%p2 = plot plot%d2%p2%plot1%p2 => plot%d2%p2 plot%d2%p2%plot2%p2 => plot%d2%p2 plot%d2%p2%plot3%p2 => plot%d2%p2 endif where = plot%where plot = data%p2 plot%where = where plot%plot1%p2 => plot plot%plot2%p2 => plot plot%plot3%p2 => plot end subroutine