1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
---|
2 | "http://www.w3.org/TR/REC-html40/loose.dtd"> |
---|
3 | <html> |
---|
4 | <head> |
---|
5 | <title>Description of read_plot_param</title> |
---|
6 | <meta name="keywords" content="read_plot_param"> |
---|
7 | <meta name="description" content="'read_plot_param': read plotting parameters from the interface uvmat"> |
---|
8 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
---|
9 | <meta name="generator" content="m2html © 2003 Guillaume Flandin"> |
---|
10 | <meta name="robots" content="index, follow"> |
---|
11 | <link type="text/css" rel="stylesheet" href="../m2html.css"> |
---|
12 | </head> |
---|
13 | <body> |
---|
14 | <a name="_top"></a> |
---|
15 | <div><a href="../index.html">Home</a> > <a href="index.html">.</a> > read_plot_param.m</div> |
---|
16 | |
---|
17 | <!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png"> Master index</a></td> |
---|
18 | <td align="right"><a href="index.html">Index for . <img alt=">" border="0" src="../right.png"></a></td></tr></table>--> |
---|
19 | |
---|
20 | <h1>read_plot_param |
---|
21 | </h1> |
---|
22 | |
---|
23 | <h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
24 | <div class="box"><strong>'read_plot_param': read plotting parameters from the interface uvmat</strong></div> |
---|
25 | |
---|
26 | <h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
27 | <div class="box"><strong>function PlotParam=read_plot_param(handles) </strong></div> |
---|
28 | |
---|
29 | <h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
30 | <div class="fragment"><pre class="comment">'read_plot_param': read plotting parameters from the interface uvmat |
---|
31 | ------------------------------------------ |
---|
32 | function PlotParam=read_plot_param(handles) |
---|
33 | |
---|
34 | OUTPUT: |
---|
35 | PlotParam: structure containing the values of all the relevant plotting parameters |
---|
36 | |
---|
37 | INPUT: |
---|
38 | handles: structure containing the handles of the relevant uicontrols in the uvmat interface |
---|
39 | |
---|
40 | -- TODO: get the handles using get_plot_handles and findobj as default input --</pre></div> |
---|
41 | |
---|
42 | <!-- crossreference --> |
---|
43 | <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
44 | This function calls: |
---|
45 | <ul style="list-style-image:url(../matlabicon.gif)"> |
---|
46 | </ul> |
---|
47 | This function is called by: |
---|
48 | <ul style="list-style-image:url(../matlabicon.gif)"> |
---|
49 | <li><a href="plot_field.html" class="code" title="function [PlotType,PlotParamOut,haxes]= plot_field(Data,haxes,PlotParam,KeepLim,PosColorbar)">plot_field</a> 'plot_field': plot any field with the structure defined in the uvmat package</li><li><a href="uvmat.html" class="code" title="function varargout = uvmat(varargin)">uvmat</a> 'uvmat': function associated with the GUI 'uvmat.fig' for images and data field visualization</li></ul> |
---|
50 | <!-- crossreference --> |
---|
51 | |
---|
52 | |
---|
53 | <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
54 | <div class="fragment"><pre>0001 <span class="comment">%'read_plot_param': read plotting parameters from the interface uvmat</span> |
---|
55 | 0002 <span class="comment">%------------------------------------------</span> |
---|
56 | 0003 <span class="comment">% function PlotParam=read_plot_param(handles)</span> |
---|
57 | 0004 <span class="comment">%</span> |
---|
58 | 0005 <span class="comment">% OUTPUT:</span> |
---|
59 | 0006 <span class="comment">% PlotParam: structure containing the values of all the relevant plotting parameters</span> |
---|
60 | 0007 <span class="comment">%</span> |
---|
61 | 0008 <span class="comment">% INPUT:</span> |
---|
62 | 0009 <span class="comment">% handles: structure containing the handles of the relevant uicontrols in the uvmat interface</span> |
---|
63 | 0010 <span class="comment">%</span> |
---|
64 | 0011 <span class="comment">% -- TODO: get the handles using get_plot_handles and findobj as default input --</span> |
---|
65 | 0012 |
---|
66 | 0013 <a name="_sub0" href="#_subfunctions" class="code">function PlotParam=read_plot_param(handles)</a> |
---|
67 | 0014 |
---|
68 | 0015 PlotParam.Auto_xy=get(handles.auto_xy,<span class="string">'Value'</span>); |
---|
69 | 0016 |
---|
70 | 0017 <span class="comment">% scalars</span> |
---|
71 | 0018 Scalar.MaxA=str2double(get(handles.MaxA,<span class="string">'String'</span>)); |
---|
72 | 0019 Scalar.MinA=str2double(get(handles.MinA,<span class="string">'String'</span>)); |
---|
73 | 0020 Scalar.AutoScal=get(handles.AutoScal,<span class="string">'Value'</span>); |
---|
74 | 0021 Scalar.BW=get(handles.BW,<span class="string">'Value'</span>); |
---|
75 | 0022 Scalar.Contours=get(handles.Contours,<span class="string">'Value'</span>)==2; |
---|
76 | 0023 Scalar.IncrA=str2double(get(handles.IncrA,<span class="string">'String'</span>)); |
---|
77 | 0024 PlotParam.Scalar=Scalar; |
---|
78 | 0025 |
---|
79 | 0026 <span class="comment">%vectors</span> |
---|
80 | 0027 Vectors.VecScale=str2double(get(handles.VecScale,<span class="string">'String'</span>)); |
---|
81 | 0028 Vectors.AutoVec=get(handles.AutoVec,<span class="string">'Value'</span>);<span class="comment">%automatic vector length</span> |
---|
82 | 0029 Vectors.HideFalse=get(handles.HideFalse,<span class="string">'Value'</span>); |
---|
83 | 0030 Vectors.HideWarning=get(handles.HideWarning,<span class="string">'Value'</span>); |
---|
84 | 0031 Vectors.decimate4=get(handles.decimate4,<span class="string">'Value'</span>);<span class="comment">% =1; for reducing the nbre of vectors</span> |
---|
85 | 0032 |
---|
86 | 0033 <span class="comment">%vector color</span> |
---|
87 | 0034 code_list=get(handles.color_code,<span class="string">'String'</span>); |
---|
88 | 0035 val=get(handles.color_code,<span class="string">'Value'</span>); |
---|
89 | 0036 <span class="comment">% menu_col=get(handles.col_vec,'String');</span> |
---|
90 | 0037 <span class="comment">% menu_val=get(handles.col_vec,'Value');</span> |
---|
91 | 0038 colcode1=str2double(get(handles.colcode1,<span class="string">'String'</span>));<span class="comment">% first threshold for rgb, first value for'continuous'</span> |
---|
92 | 0039 colcode2=str2double(get(handles.colcode2,<span class="string">'String'</span>));<span class="comment">% second threshold for rgb, last value (saturation) for 'continuous'</span> |
---|
93 | 0040 |
---|
94 | 0041 Vectors.ColorCode=code_list{val}; <span class="comment">% option of color code for vectors</span> |
---|
95 | 0042 Vectors.FixedCbounds=get(handles.AutoVecColor,<span class="string">'Value'</span>);<span class="comment">% =1; fixed scale for color vector, =0 otherwise (default)</span> |
---|
96 | 0043 Vectors.MinC=str2num(get(handles.min_vec,<span class="string">'String'</span>)); <span class="comment">% imposed min of C, (needed if .FixedCbounds=1)</span> |
---|
97 | 0044 Vectors.MaxC=str2num(get(handles.max_vec,<span class="string">'String'</span>)); <span class="comment">% imposed max of C, needed if .FixedCbounds=1</span> |
---|
98 | 0045 <span class="keyword">if</span> Vectors.MaxC <= Vectors.MinC |
---|
99 | 0046 Vectors.ColorCode=<span class="string">'black'</span>; |
---|
100 | 0047 <span class="keyword">else</span> |
---|
101 | 0048 Vectors.colcode1=Vectors.MinC+(colcode1-Vectors.MinC)/(Vectors.MaxC-Vectors.MinC);<span class="comment">% relative thresholds</span> |
---|
102 | 0049 Vectors.colcode2=Vectors.MinC+(colcode2-Vectors.MinC)/(Vectors.MaxC-Vectors.MinC); |
---|
103 | 0050 <span class="keyword">end</span> |
---|
104 | 0051 PlotParam.Vectors=Vectors; |
---|
105 | 0052</pre></div> |
---|
106 | <hr><address>Generated on Fri 13-Nov-2009 11:17:03 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> © 2003</address> |
---|
107 | </body> |
---|
108 | </html> |
---|