Author: bugman Date: Thu Apr 11 09:31:49 2013 New Revision: 19444 URL: http://svn.gna.org/viewcvs/relax?rev=19444&view=rev Log: The plotting of residue or spin numbers verses values now handles multiple spin types properly. This is in the pipe_control.plotting.assemble_data_seq_value() function. The spin name is being used to identify different spin types for the graph sets. Modified: trunk/pipe_control/plotting.py Modified: trunk/pipe_control/plotting.py URL: http://svn.gna.org/viewcvs/relax/trunk/pipe_control/plotting.py?rev=19444&r1=19443&r2=19444&view=diff ============================================================================== --- trunk/pipe_control/plotting.py (original) +++ trunk/pipe_control/plotting.py Thu Apr 11 09:31:49 2013 @@ -278,7 +278,15 @@ points = 1 # Loop over the spins. + spin_names = [] for spin, mol_name, res_num, res_name, id in spin_loop(full_info=True, selection=spin_id, return_id=True, skip_desel=True): + # A new spin name. + if spin.name not in spin_names: + spin_names.append(spin.name) + + # The set index. + set_index = spin_names.index(spin.name) + # Loop over the data points (for simulations). for i in range(points): # The X and Y data. @@ -296,13 +304,14 @@ y_err_flag = True # Append the data. - data[0][0].append([x_val, y_val]) + data[0][set_index].append([x_val, y_val]) if x_err_flag: - data[0][0][-1].append(x_err) + data[0][set_index][-1].append(x_err) if y_err_flag: - data[0][0][-1].append(y_err) + data[0][set_index][-1].append(y_err) # Return the data. + print data, set_labels, x_err_flag, y_err_flag return data, set_labels, x_err_flag, y_err_flag