source: trunk/src/read_plot_param.m @ 174

Last change on this file since 174 was 61, checked in by sommeria, 15 years ago

gestion of projection objects improved. Implementation of view_field.fig
introduction of a circle to mark vectors with the mouse
various cleaning and debugging

File size: 2.4 KB
Line 
1%'read_plot_param':  read plotting parameters from the interface uvmat
2%------------------------------------------
3% function PlotParam=read_plot_param(handles)
4%
5% OUTPUT:
6% PlotParam: structure containing the values of all the relevant plotting parameters
7%
8% INPUT:
9% handles: structure containing the handles of the relevant uicontrols in the uvmat interface
10%
11%      -- TODO:   get the handles using get_plot_handles and findobj as  default input --
12
13function PlotParam=read_plot_param(handles)
14
15PlotParam.Auto_xy=get(handles.auto_xy,'Value');
16PlotParam.FixedLimits=get(handles.FixedLimits,'Value');
17
18% scalars
19Scalar.MaxA=str2double(get(handles.MaxA,'String'));
20Scalar.MinA=str2double(get(handles.MinA,'String'));
21Scalar.AutoScal=get(handles.AutoScal,'Value');
22Scalar.BW=get(handles.BW,'Value');
23Scalar.Contours=get(handles.Contours,'Value')==2;
24Scalar.IncrA=str2double(get(handles.IncrA,'String'));
25PlotParam.Scalar=Scalar;
26
27%vectors
28Vectors.VecScale=str2double(get(handles.VecScale,'String'));
29Vectors.AutoVec=get(handles.AutoVec,'Value');%automatic vector length
30Vectors.HideFalse=get(handles.HideFalse,'Value');
31Vectors.HideWarning=get(handles.HideWarning,'Value');
32Vectors.decimate4=get(handles.decimate4,'Value');% =1; for reducing the nbre of vectors
33
34%vector color
35code_list=get(handles.color_code,'String');
36val=get(handles.color_code,'Value');
37% menu_col=get(handles.col_vec,'String');
38% menu_val=get(handles.col_vec,'Value');
39colcode1=str2double(get(handles.colcode1,'String'));% first threshold for rgb, first value for'continuous'
40colcode2=str2double(get(handles.colcode2,'String'));% second threshold for rgb, last value (saturation) for 'continuous'
41
42Vectors.ColorCode=code_list{val}; % option of color code for vectors
43Vectors.FixedCbounds=get(handles.AutoVecColor,'Value');% =1; fixed scale for color vector, =0 otherwise (default)
44Vectors.MinC=str2num(get(handles.min_vec,'String')); % imposed min of C, (needed if .FixedCbounds=1)
45Vectors.MaxC=str2num(get(handles.max_vec,'String')); % imposed max of C, needed if .FixedCbounds=1
46if Vectors.MaxC <= Vectors.MinC
47    Vectors.ColorCode='black';
48else
49    Vectors.colcode1=Vectors.MinC+(colcode1-Vectors.MinC)/(Vectors.MaxC-Vectors.MinC);% relative thresholds
50    Vectors.colcode2=Vectors.MinC+(colcode2-Vectors.MinC)/(Vectors.MaxC-Vectors.MinC);
51end
52PlotParam.Vectors=Vectors;
53
Note: See TracBrowser for help on using the repository browser.