Home > SuperSegger > viz > plot2ClistsGui.m

plot2ClistsGui

PURPOSE ^

plot2ClistsGui : gui used to plot a dot plot of two values in the clist

SYNOPSIS ^

function varargout = plot2ClistsGui(varargin)

DESCRIPTION ^

 plot2ClistsGui : gui used to plot a dot plot of two values in the clist

 Copyright (C) 2016 Wiggins Lab
 Written by Silas Boye Nissen.
 University of Washington, 2016
 This file is part of SuperSegger.

 SuperSegger is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 SuperSegger is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with SuperSegger.  If not, see <http://www.gnu.org/licenses/>.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function varargout = plot2ClistsGui(varargin)
0002 % plot2ClistsGui : gui used to plot a dot plot of two values in the clist
0003 %
0004 % Copyright (C) 2016 Wiggins Lab
0005 % Written by Silas Boye Nissen.
0006 % University of Washington, 2016
0007 % This file is part of SuperSegger.
0008 %
0009 % SuperSegger is free software: you can redistribute it and/or modify
0010 % it under the terms of the GNU General Public License as published by
0011 % the Free Software Foundation, either version 3 of the License, or
0012 % (at your option) any later version.
0013 %
0014 % SuperSegger is distributed in the hope that it will be useful,
0015 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0016 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0017 % GNU General Public License for more details.
0018 %
0019 % You should have received a copy of the GNU General Public License
0020 % along with SuperSegger.  If not, see <http://www.gnu.org/licenses/>.
0021 
0022 gui_Singleton = 1;
0023 gui_State = struct('gui_Name',       mfilename, ...
0024                    'gui_Singleton',  gui_Singleton, ...
0025                    'gui_OpeningFcn', @plot2ClistsGui_OpeningFcn, ...
0026                    'gui_OutputFcn',  @plot2ClistsGui_OutputFcn, ...
0027                    'gui_LayoutFcn',  [] , ...
0028                    'gui_Callback',   []);
0029 if nargin && ischar(varargin{1})
0030     gui_State.gui_Callback = str2func(varargin{1});
0031 end
0032 
0033 if nargout
0034     [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
0035 else
0036     gui_mainfcn(gui_State, varargin{:});
0037 end
0038 
0039 function plot2ClistsGui_OpeningFcn(hObject, eventdata, handles, varargin)
0040 handles.clist = getappdata(0, 'clist');
0041 handles.output = hObject;
0042 handles.char1.String = handles.clist.def';
0043 handles.char2.String = handles.clist.def';
0044 handles.char2.Value = 2;
0045 guidata(hObject, handles);
0046 uiwait(handles.figure1);
0047 
0048 function varargout = plot2ClistsGui_OutputFcn(hObject, eventdata, handles) 
0049 varargout{1} = handles.clist;
0050 % The figure can be deleted now
0051 delete(handles.figure1);
0052 
0053 function char1_Callback(hObject, eventdata, handles)
0054 
0055 function char1_CreateFcn(hObject, eventdata, handles)
0056 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0057     set(hObject,'BackgroundColor','white');
0058 end
0059 
0060 function char2_Callback(hObject, eventdata, handles)
0061 
0062 function char2_CreateFcn(hObject, eventdata, handles)
0063 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0064     set(hObject,'BackgroundColor','white');
0065 end
0066 
0067 function plot_two_clists_Callback(hObject, eventdata, handles)
0068 if handles.char1.Value && handles.char2.Value && handles.char1.Value ~= handles.char2.Value
0069     figure(2);
0070     clf;
0071     gateHistDot(handles.clist, [handles.char1.Value handles.char2.Value])
0072 end
0073 
0074 
0075 % --- Executes on button press in gate2d.
0076 function gate2d_Callback(hObject, eventdata, handles)
0077 % hObject    handle to gate2d (see GCBO)
0078 % eventdata  reserved - to be defined in a future version of MATLAB
0079 % handles    structure with handles and user data (see GUIDATA)
0080 
0081 if handles.char1.Value && handles.char2.Value && handles.char1.Value ~= handles.char2.Value
0082     figure(2);
0083     clf;
0084     handles.clist = gateMake(handles.clist, [handles.char1.Value handles.char2.Value]);
0085     handles.clist;
0086     guidata(hObject, handles)
0087 end
0088 
0089 
0090 % --- Executes when user attempts to close figure1.
0091 function figure1_CloseRequestFcn(hObject, eventdata, handles)
0092 % hObject    handle to figure1 (see GCBO)
0093 % eventdata  reserved - to be defined in a future version of MATLAB
0094 % handles    structure with handles and user data (see GUIDATA)
0095 
0096 % Hint: delete(hObject) closes the figure
0097 if isequal(get(hObject, 'waitstatus'), 'waiting')
0098 % The GUI is still in UIWAIT, us UIRESUME
0099 uiresume(hObject);
0100 else
0101 % The GUI is no longer waiting, just close it
0102 delete(hObject);
0103 end

Generated on Thu 19-Jan-2017 13:55:21 by m2html © 2005