! Note: set_plot2 always overrides logic%plot_locked. subroutine set_plot2 (plot, ix, u) use cesrv_struct use cesrv_interface implicit none type (p2_plot_struct), target :: plot type (universe_struct) u type (d2_data_struct), save, target :: data2_null integer ix logical :: init_needed = .true. ! if (init_needed) then data2_null%type = none_data$ data2_null%p2%d2 => data2_null init_needed = .false. endif ! select case (ix) case (x_fft_data$) call set_plot (plot, u%x_fft, .true.) case (y_fft_data$) call set_plot (plot, u%y_fft, .true.) case (q2x_data$) call set_plot (plot, u%q2x, .true.) case (q2y_data$) call set_plot (plot, u%q2y, .true.) case (qx_plus_qy_data$) call set_plot (plot, u%qx_plus_qy, .true.) case (qx_minus_qy_data$) call set_plot (plot, u%qx_minus_qy, .true.) case (orbit_data$) call set_plot (plot, u%orbit, .true.) case (e_xray_data$) call set_plot (plot, u%e_xray, .true.) case (p_xray_data$) call set_plot (plot, u%p_xray, .true.) case (eta_data$) call set_plot (plot, u%eta, .true.) case (ac_eta_data$) call set_plot (plot, u%ac_eta, .true.) case (mode_eta_data$) call set_plot (plot, u%mode_eta, .true.) case (phase_data$) call set_plot (plot, u%phase, .true.) case (cbar_data$) call set_plot (plot, u%cbar, .true.) case (cmat_a_data$) call set_plot (plot, u%cmat_a, .true.) case (cmat_b_data$) call set_plot (plot, u%cmat_b, .true.) case (beta_data$) call set_plot (plot, u%beta, .true.) case (spline_data$) call set_plot (plot, u%spline_beta, .true.) case (none_data$) call set_plot (plot, data2_null, .true.) case (energy_data$) call set_plot (plot, u%energy_data, .true.) case (cbar_and_eta_data$) call set_plot (plot, u%eta, .true.) plot%plot1 = u%cbar%p2%plot2 plot%plot1%p2 => plot case default print *, 'ERROR IN SET_PLOT2: INTERNAL!' call err_exit end select end subroutine