Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


plotsign2.m File Reference

Go to the source code of this file.


Functions

 plot (t, Y)
 plotsign2 (cf, Ssign)
 plotsign2 (cf, Ssign, Opt)
initialize in case you return
early 
figure (h(1))
 if (length(h) > 1)
 if (length(h)==2)
 subplot (h(2))
in case you want to specify
a subplot 
elseif (length(h)==4)
in case you want to specify
a subplot 
subplot (h(2), h(3), h(4))
end end if (nargin==1)
end end if (length(ST) > 1)
remove this annoying tset message (some bug....)[err
 if (Nlines >=2)
end if (tmp)
 elseif (nargin==2)
end if (~isfield(Opt,'Place')|isempty(Opt.Place))
end if (~isfield(Opt,'HAlign'))
end if (~isfield(Opt,'VAlign'))
end if (~isfield(Opt,'Position'))
end if (~isfield(Opt,'Pos')|isempty(Opt.Pos))
else if (length(Opt.Pos)~=2 &length(Opt.Pos)~=3)
else ErrEval (mfilename,'Err_Bad size for Opt.Pos parameter')
end if (~isfield(Opt,'Color')|isempty(Opt.Color))
end Fontsize for text if (~isfield(Opt,'Font')|isempty(Opt.Font))
end if (ischar(Opt.Font))
end if (eq_str(Opt.Font,'l'))
 elseif (eq_str(Opt.Font,'s'))
 elseif (eq_str(Opt.Font,'n'))
set fonts if (isfield(Opt,'FontName')&~isempty(Opt.FontName))
set fonts set (ht,'FontName', Opt.FontName)
end set font size set (ht,'fontsize', fs)
set interpreter set (ht,'Interpreter','none')
set position and alignment
as fit 
if (spec)
set position and alignment
as fit user specified location 
set (ht,'Units','data')
 set (ht,'Position', Opt.Pos)
~isempty(Opt.VAlign VAlign ()
end if (~isempty(Opt.HAlign))
end set (ht,'horizontalalignment', AlgnH)
 set (ht,'verticalalignment', AlgnV)
 if (~eq_str(UntAxes,'normalized'))
 ErrEval (mfilename,'Err_Sorry, must have normalized units')
switch Opt Place (1)
 ErrEval (mfilename,'Err_Cannot interpret Opt.Place(1)')
end switch Opt Place (2)
end switch Opt the Y axis
case bottom 
if (DoF)
end switch Opt the Y axis
case bottom 
Vpos (2)
 ErrEval (mfilename,'Err_Cannot interpret Opt.Place(2)')
end switch Opt Place (3)
end switch Opt the X axis
case bottom 
Vpos (1)
 ErrEval (mfilename,'Err_Cannot interpret Opt.Place(3)')
 set (ht,'Units', Unt)
 set (ht,'Position', Vpos)
end set (ht,'Units', tmpunt)
make sure there has been handle
stored otherwise add some 
if (~isfield(ud,'MaxHandle')|isempty(ud.MaxHandle))
Now add the handle in the
MoveHandle vector ud 
MoveHandle (ud.MaxHandle)
store the userdata back in
the figure 
set (gcf,'UserData', ud)
set the button down function set (ht,'ButtonDownFcn', stmp)

Variables

function ht = plotsign2 (h,s,Opt)
h is the figure handle
h is the figure if you need
to specify a subplot within
the figure pass the figure
handle and the subplot number
in 
h
h is the figure if you need
to specify a subplot within
the figure pass the figure
handle and the subplot number
in 
like = AFNI_OrientCode ([0 3 4])
h is the figure if you need
to specify a subplot within
the figure pass the figure
handle and the subplot number
in if s is not 
supplied
h is the figure if you need
to specify a subplot within
the figure pass the figure
handle and the subplot number
in if s is not a default string
is used the default 
is
h is the figure if you need
to specify a subplot within
the figure pass the figure
handle and the subplot number
in if s is not a default string
is used the default and the
second character the X position
For example FTC means Figure
Top Center Your options for
the relative positioning 
are
h is the figure if you need
to specify a subplot within
the figure pass the figure
handle and the subplot number
in if s is not a default string
is used the default and the
second character the X position
For example FTC means Figure
Top Center Your options for
the relative positioning unless
you specify a Align option
The default is FBR Pos(2x1
or 3x1 vector) pins the X
Y postion(relative the X Y
axis) of the plot%.Pos overrides.Place.%NOTE 
Y = sin(0.5.*t)
 cf = figure(1)
 Ssign = sprintf ('Z.S.Saad %s\n image:%s/%s', date, pwd, mfilename )
or Opt Place = 'FTC'
Opt Color = 'r'
Opt Font = 16
or Opt Pos = [t(400) Y(400)]
See also MoveFigObject HistoryTrace
Ziad Saad 
Dec
See also MoveFigObject HistoryTrace
Ziad Saad latest fix Wed 
May
else err = ErrEval(FuncName,'Err_Bad size for input parameter h')
 return
end end use the calling function
name as
signature [jnk1, CallPath, CallFname] = GetPath(ST(2).name)
else this function is called
directly from command line 
CallPath = pwd
 CallFname = mfilename
 end [tmp, smach] = unix('hostname')
remove this annoying tset snl
remove this annoying tset Nlines = GetNextLine(smach, 2)
end smach = sprintf('Dunno')
end c = datevec(now)
 s
end Opt HAlign = ''
end Opt VAlign = ''
end Opt Position = []
end spec = 0
end fs = get(gcf,'defaultaxesfontsize')+2
store current units tmpunt = get(ht,'Units')
else AlgnV = 'middle'
end AlgnH = Opt.HAlign
else auto placement get the
size in normalized units of
the axes 
UntAxes = get(gca,'Units')
end AxSize = get(gca,'Position')
if the axes does not fill
the figure 
window
if the axes does not fill
the figure find out what would
fill it 
Mult = [1./AxSize(3) 1./AxSize(4)]
 Vpos = [0 0]
 Unt = 'normalized'
switch Opt relative to figure
or plot case 
F
switch Opt relative to figure
or plot case figure 
DoF = 1
case P
 otherwise
end switch Opt the Y axis case B
end case C
case T
end switch Opt the X axis case L
case R
Now you need to store the
handle to the object and give
it a number By giving each
object
number
Now you need to store the
handle to the object and give
it a number By giving each
object a you can store multiple
objects on the same figure
and manipulate them all individually
get the UserData of the figure 
ud = get (gcf,'UserData')
make sure there has been handle
stored 
previously
make sure there has been handle
stored otherwise add some
ud 
MaxHandle = 0
create the button callback
string 
stmp = sprintf('MoveFigObject(%g)',ud.MaxHandle)

Function Documentation

elseif eq_str(Opt.Font,'n')   ) 
 

elseif eq_str(Opt.Font,'s')   ) 
 

elseif nargin  = = 2  ) 
 

in case you want to specify a subplot elseif length(h = = 4  ) 
 

ErrEval mfilename  ,
'Err_Cannot interpret Opt.Place(3)' 
 

ErrEval mfilename  ,
'Err_Cannot interpret Opt.Place(2)' 
 

ErrEval mfilename  ,
'Err_Cannot interpret Opt.Place(1)' 
 

ErrEval mfilename  ,
Err_Sorry,
must have normalized units
 

else ErrEval mfilename  ,
'Err_Bad size for Opt.Pos parameter' 
 

initialize in case you return early figure h(1)   ) 
 

make sure there has been handle stored otherwise add some if isfield(ud,'MaxHandle')|isempty(ud.MaxHandle)  ) 
 

case if DoF   ) 
 

if eq_str(UntAxes,'normalized')  ) 
 

end if isempty(Opt.HAlign)  ) 
 

set position and alignment as fit if spec   ) 
 

set fonts if isfield(Opt,'FontName')&~isempty(Opt.FontName)   ) 
 

end if eq_str(Opt.Font,'l')   ) 
 

end if ischar(Opt.Font  ) 
 

end Fontsize for text if isfield(Opt,'Font')|isempty(Opt.Font)  ) 
 

end if isfield(Opt,'Color')|isempty(Opt.Color)  ) 
 

else if length(Opt.Pos)~  = 2 & length(Opt.Pos) ~= 3  ) 
 

end if isfield(Opt,'Pos')|isempty(Opt.Pos)  ) 
 

end if isfield(Opt,'Position')  ) 
 

end if isfield(Opt,'VAlign')  ) 
 

end if isfield(Opt,'HAlign')  ) 
 

end if isfield(Opt,'Place')|isempty(Opt.Place)  ) 
 

end if tmp   ) 
 

if Nlines >=  2  ) 
 

end end if length(ST)  ,
 

end end if nargin  = = 1  ) 
 

if length(h = = 2  ) 
 

if length(h ,
 

remove this annoying tset message some  bug....  ) 
 

Now add the handle in the MoveHandle vector ud MoveHandle ud.  MaxHandle  ) 
 

end switch Opt Place  ) 
 

end switch Opt Place  ) 
 

switch Opt Place  ) 
 

plot ,
Y 
 

plotsign2 cf  ,
Ssign  ,
Opt 
 

plotsign2 cf  ,
Ssign 
 

set the button down function set ht  ,
'ButtonDownFcn'  ,
stmp 
 

store the userdata back in the figure set gcf  ,
'UserData'  ,
ud 
 

end set ht  ,
'Units'  ,
tmpunt 
 

set ht  ,
'Position ,
Vpos 
 

set ht  ,
'Units'  ,
Unt 
 

set ht  ,
'verticalalignment'  ,
AlgnV 
 

end set ht  ,
'horizontalalignment'  ,
AlgnH 
 

set ht  ,
'Position ,
Opt.  Pos
 

set position and alignment as fit user specified location set ht  ,
'Units'  ,
'data
 

set interpreter set ht  ,
'Interpreter'  ,
'none' 
 

end set font size set ht  ,
'fontsize'  ,
fs 
 

set fonts set ht  ,
'FontName'  ,
Opt.  FontName
 

in case you want to specify a subplot subplot h(2)  ,
h(3)  ,
h(4) 
 

subplot h(2)   ) 
 

~isempty(Opt.VAlign VAlign  )  [virtual]
 

end switch Opt the X axis case bottom Vpos  ) 
 

end switch Opt the Y axis case bottom Vpos  ) 
 


Variable Documentation

end AlgnH = Opt.HAlign
 

Definition at line 240 of file plotsign2.m.

end AlgnV = 'middle'
 

Definition at line 215 of file plotsign2.m.

h is the figure if you need to specify a subplot within the figure pass the figure handle and the subplot number in if s is not a default string is used the default and the second character the X position For example FTC means Figure Top Center Your options for the relative positioning are
 

Definition at line 3 of file plotsign2.m.

end AxSize = get(gca,'Position')
 

Definition at line 183 of file plotsign2.m.

end switch Opt the Y axis case B
 

Definition at line 199 of file plotsign2.m.

case C
 

Definition at line 225 of file plotsign2.m.

end c = datevec(now)
 

Definition at line 91 of file plotsign2.m.

CallFname = mfilename
 

Definition at line 78 of file plotsign2.m.

else this function is called directly from command line CallPath = pwd
 

Definition at line 77 of file plotsign2.m.

cf = figure(1)
 

Definition at line 44 of file plotsign2.m.

end Opt Color = 'r'
 

Definition at line 126 of file plotsign2.m.

Referenced by SUMA_SetSVForegroundColor().

See also MoveFigObject HistoryTrace Ziad Saad Dec
 

Definition at line 57 of file plotsign2.m.

case plot DoF = 1
 

Definition at line 193 of file plotsign2.m.

end[tmp, smach] = unix('hostname')
 

Definition at line 80 of file plotsign2.m.

else err = ErrEval(FuncName,'Err_Bad size for input parameter h')
 

Definition at line 66 of file plotsign2.m.

switch Opt relative to figure or plot case F
 

Definition at line 190 of file plotsign2.m.

end Fontsize for text Opt Font = 16
 

Definition at line 131 of file plotsign2.m.

end else fs = get(gcf,'defaultaxesfontsize')+2
 

Definition at line 142 of file plotsign2.m.

Referenced by AFNI_gra_send_CB(), DELAY_main(), estimate_field(), exassign(), EXTRACT_main(), hunwrap(), new_frameset(), UTL_ConvertTimetoFloat(), warp_image(), and write_formats().

h is the figure if you need to specify a subplot within the figure pass the figure handle and the subplot number in h
 

Definition at line 3 of file plotsign2.m.

Referenced by algdiv(), basym(), bcorr(), betaln(), brcmp1(), brcomp(), colormap_diversity(), create_viewer_window(), CreateMainWindow(), crop_image(), Daubechies_forward_pass_1d(), Daubechies_inverse_pass_1d(), dlnbet(), DoGamma(), DoKillDim(), DRAW_ttatlas_CB(), EvalSpline(), fill_area(), gaminv(), ge4_swap_all_bytes(), ge4_validate_header(), Gif_FullReadFile(), Gif_FullReadRecord(), Gif_FullUncompressImage(), glutReshapeWindow(), GRAF_drawing_EV(), grat1(), gratio(), hash(), hashkey(), incbeta_inverse(), int_downsample(), int_upsample(), main(), make_plot(), memplot_to_RGB_sef(), memplot_to_X11_sef(), MResize(), open_URL_http(), put_background_in_screen(), put_image_in_screen(), read_ppm_map(), read_URL_ftp(), rlog1(), RWC_draw_rect(), simpleSort(), sortIt(), SUMA_CreatePromptActionArea(), SUMA_FromToRotation(), THD_autonudge(), and tred2().

end Opt HAlign = ''
 

Definition at line 106 of file plotsign2.m.

h is the figure handle
 

Definition at line 3 of file plotsign2.m.

Referenced by AIVVV_imseq_getim(), AIVVV_imseq_retitle(), AIVVV_imseq_send_CB(), dlclose(), dlsym(), ISQ_record_getim(), open_file_store(), PH_popup_image(), PLUGIN_imseq_getim(), PLUGIN_seq_send_CB(), PLUTO_imseq_addto(), PLUTO_imseq_destroy(), PLUTO_imseq_getim(), PLUTO_imseq_popim(), PLUTO_imseq_rekill(), PLUTO_imseq_retitle(), PLUTO_imseq_send_CB(), PLUTO_imseq_setim(), and PLUTO_popup_image().

end place text anywhere ht = plotsign2 (h,s,Opt)
 

Definition at line 148 of file plotsign2.m.

Referenced by addto_Htable(), BFIT_compute(), BFIT_main(), destroy_Htable(), findin_Htable(), hash(), listize_Dtable(), mk_hashtab(), new_Htable(), profile_Htable(), removefrom_Htable(), resize_Htable(), SUMA_Make_Edge_List_eng(), and x_rsne().

h is the figure if you need to specify a subplot within the figure pass the figure handle and the subplot number in if s is not a default string is used the default is
 

Definition at line 3 of file plotsign2.m.

end switch Opt the X axis case L
 

Definition at line 221 of file plotsign2.m.

a x1 vector of numbers or characters like = AFNI_OrientCode ([0 3 4])
 

Definition at line 29 of file AFNI_OrientCode.m.

end Increment the maximum number of handles ud MaxHandle = 0
 

Definition at line 261 of file plotsign2.m.

See also MoveFigObject HistoryTrace Ziad Saad latest fix Wed May
 

Definition at line 57 of file plotsign2.m.

if the axes does not fill the figure find out what would fill it Mult = [1./AxSize(3) 1./AxSize(4)]
 

Definition at line 185 of file plotsign2.m.

remove this annoying tset Nlines = GetNextLine(smach, 2)
 

Definition at line 82 of file plotsign2.m.

Now you need to store the handle to the object and give it a number By giving each object a number
 

Definition at line 251 of file plotsign2.m.

otherwise
 

Definition at line 233 of file plotsign2.m.

case P
 

Definition at line 192 of file plotsign2.m.

end Opt Place = 'FTC'
 

Definition at line 103 of file plotsign2.m.

or Opt Pos = [t(400) Y(400)]
 

Definition at line 51 of file plotsign2.m.

Referenced by SUMA_AllocateScrolledList().

end Opt Position = []
 

Definition at line 112 of file plotsign2.m.

Referenced by MCW_choose_integer(), MCW_choose_multi_editable_strlist(), MCW_choose_multi_strlist(), MCW_choose_ovcolor(), MCW_choose_string(), MCW_choose_timeseries(), MCW_choose_vector(), MCW_help_CB(), MCW_popup_message(), MCW_popup_meter(), MCW_widget_geom(), new_MCW_textwin_2001(), psfile_CB(), RWC_visibilize_widget(), SNAP_store_image(), SUMA_PositionWindowRelative(), and timeout_event().

make sure there has been handle stored previously
 

Definition at line 256 of file plotsign2.m.

case R
 

Definition at line 229 of file plotsign2.m.

return
 

Definition at line 271 of file plotsign2.m.

s
 

Initial value:

 sprintf ('Ziad Saad SSCC/NIMH/NIH\n%s : %s %s:%s:%s\n%s/%s', smach, date,...
                                 pad_strn(num2str(c(4)), '0', 2, 1),...
                                 pad_strn(num2str(c(5)), '0', 2, 1),...
                                 pad_strn(num2str(round(c(6))), '0', 2, 1),...
                                 CallPath, CallFname)

Definition at line 92 of file plotsign2.m.

end end use the calling function name as a signature[jnk1, CallPath, CallFname] = GetPath(ST(2).name)
 

Definition at line 75 of file plotsign2.m.

smach = sprintf('Dunno')
 

Definition at line 89 of file plotsign2.m.

remove this annoying tset snl
 

Definition at line 82 of file plotsign2.m.

end spec = 0
 

Definition at line 122 of file plotsign2.m.

Referenced by exdo(), fill_SUMA_structs(), main(), read_ems_store(), read_surf_files(), read_xms_store(), spec2SUMA(), SUMA_coord_file(), SUMA_IO_args_2_spec(), SUMA_RegisterGroup(), SUMA_SOGroup_2_Spec(), SUMA_spec_select_surfs(), SUMA_spec_set_map_refs(), SUMA_swap_spec_entries(), SUMA_unique_name_ind(), write_ems_store(), and write_xms_store().

Ssign = sprintf ('Z.S.Saad %s\n image:%s/%s', date, pwd, mfilename )
 

Definition at line 45 of file plotsign2.m.

create the button callback string stmp = sprintf('MoveFigObject(%g)',ud.MaxHandle)
 

Definition at line 267 of file plotsign2.m.

h is the figure if you need to specify a subplot within the figure pass the figure handle and the subplot number in if s is not supplied
 

Definition at line 3 of file plotsign2.m.

case T
 

Definition at line 212 of file plotsign2.m.

store current units tmpunt = get(ht,'Units')
 

Definition at line 159 of file plotsign2.m.

Now you need to store the handle to the object and give it a number By giving each object a you can store multiple objects on the same figure and manipulate them all individually get the UserData of the figure ud = get (gcf,'UserData')
 

Definition at line 255 of file plotsign2.m.

Referenced by DELAY_main(), DELAY_tsfuncV2(), DUMP_main(), Dumpit(), error_report(), EXTRACT_main(), EXTRACT_tsfunc(), indexTOxyz(), ISQ_actually_pan(), plot_strip_addto(), plot_strip_clear(), plot_strip_init(), plot_ts_addto(), plot_ts_init(), show_ud(), STATS_tsfunc(), SUMA_DestroyTextShell(), SUMA_response(), SUMA_TableF_cb_label_Modify(), write_ud(), and writets().

Unt = 'normalized'
 

Definition at line 188 of file plotsign2.m.

else auto placement get the size in normalized units of the axes UntAxes = get(gca,'Units')
 

Definition at line 177 of file plotsign2.m.

end Opt VAlign = ''
 

Definition at line 109 of file plotsign2.m.

else Vpos = [0 0]
 

if the axes does not fill the figure window
 

Definition at line 184 of file plotsign2.m.

Referenced by __glutCreateWindow(), __glutEstablishColormapsProperty(), __glutPostRedisplay(), __glutProcessDeviceEvents(), __glutPutOnWorkList(), __glutSetWindow(), __glutStartMenu(), __glutToplevelOf(), __glutUpdateInputDeviceMask(), addStaleWindow(), cleanStaleWindowList(), cleanWindowWorkList(), destroyWindow(), find_viewer(), findColormaps(), Gif_NewXContext(), glutCopyColormap(), glutCreateSubWindow(), glutCreateWindow(), glutDestroyWindow(), glutEstablishOverlay(), glutRemoveOverlay(), glutSetWindow(), glutSwapBuffers(), glutUseLayer(), processEvents(), processWindowWorkList(), queryTabletPos(), SUMA_ShowAllVisuals(), tabletPosChange(), updateWindowVisibility(), and view_frame().

h is the figure if you need to specify a subplot within the figure pass the figure handle and the subplot number in if s is not a default string is used the default and the second character the X position For example FTC means Figure Top Center Your options for the relative positioning unless you specify a Align option The default is FBR Pos (2x1 or 3x1 vector) pins the X Y postion (relative the X Y axis) of the plot % .Pos overrides .Place. % NOTE Y = sin(0.5.*t)
 

Definition at line 44 of file plotsign2.m.

 

Powered by Plone

This site conforms to the following standards: