Rank: 5061 based on 2 downloads (last 30 days) and 1 file submitted
photo

Geoffrey Adams

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Geoffrey
Updated   File Tags Downloads
(last 30 days)
Comments Rating
24 Jan 2008 Screenshot AddReorderButtons Add toolbar buttons to move plot objects forward and backward within axes. Author: Geoffrey Adams order, plot, annotation, customization, reorder, toolbar 2 8
  • 4.66667
4.7 | 3 ratings
Comments and Ratings on Geoffrey's Files View all
Updated File Comment by Comments Rating
21 Jan 2008 AddReorderButtons Add toolbar buttons to move plot objects forward and backward within axes. Author: Geoffrey Adams hongx, zhang

Could you give an exact examplt,please?I try the function,but the effect of the buttons.I'm sorry to disturb you! Thank a lot!

07 Jan 2008 AddReorderButtons Add toolbar buttons to move plot objects forward and backward within axes. Author: Geoffrey Adams P, V

Geoffrey, please, sorry for misprint.

06 Jan 2008 AddReorderButtons Add toolbar buttons to move plot objects forward and backward within axes. Author: Geoffrey Adams P, V

>>just saving small versions of them for use in your program.

Thanks, Jeoffrey, that's exactly what I currently do.

02 Jan 2008 AddReorderButtons Add toolbar buttons to move plot objects forward and backward within axes. Author: Geoffrey Adams Adams, Geoffrey

Hello again, Vassili.

As of R2007b, the help documentation on the CData property of uipushtool objects states:

"If your CData array is larger than 16 in the first or second dimension, it may be clipped or cause other undesirable effects. If the array is clipped, only the center 16-by-16 part of the array is used."

Therefore it seems that the "official" behavior for oversized icons is clipping rather than scaling. If you wish to use larger icons and scale them down to size, it seems you will have to do it manually. If you have access to the Image Processing Toolbox, you could use the IMRESIZE function, but this would create additional computational overhead every time you want to add these buttons to a figure. I would suggest rescaling your icons ahead of time in an image manipulation program like the GIMP or Photoshop, and just saving small versions of them for use in your program.

Good luck.

01 Jan 2008 AddReorderButtons Add toolbar buttons to move plot objects forward and backward within axes. Author: Geoffrey Adams P, V

I confirm my fears that CData for uipushtool ARE NOT resized automatically. If I use as CData some image from a file, and look what is the size of CData in the icon, like:

h=uipushtool(tb(1), ...
               'Tag', 'MoveBackwardTool', ...
               'HandleVisibility', 'off', ...
               'Separator', 'on', ...
               'TooltipString', 'Move Current Plot Object Backward', ...
               'CData', backward_cdata, ...
               'ClickedCallback', @MoveObjBackward);
end

d=get(h,'CData')
size(d)
......
function c = backward_cdata
c=imread('iconx.jpg'); %big green X at red %background
return

then I see
size(d)=[800 1200 3]

It is not excluded that in later versions of ML this point was corrected (I have R14). Was it?

Top Tags Applied by Geoffrey
annotation, button, customization, order, plot
Files Tagged by Geoffrey
Updated   File Tags Downloads
(last 30 days)
Comments Rating
24 Jan 2008 Screenshot AddReorderButtons Add toolbar buttons to move plot objects forward and backward within axes. Author: Geoffrey Adams order, plot, annotation, customization, reorder, toolbar 2 8
  • 4.66667
4.7 | 3 ratings

Contact us at files@mathworks.com