Rank: 1721 based on 65 downloads (last 30 days) and 4 files submitted
photo

Ken Purchase

E-mail
Lat/Long
35.8485, -78.8295

Personal Profile:

Matlab enthusiast

Professional Interests:
Optics, Engineering, Photography

 

Watch this Author's files

 

Files Posted by Ken View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
26 Apr 2013 Screenshot TextZoomable for text that scales as you zoom Text that zooms as you zoom your plot, rather than staying at a fixed font size. Author: Ken Purchase text, zoom, text zoom, text scaling, scaling, annotation 11 4
  • 4.5
4.5 | 5 ratings
26 Apr 2013 Screenshot TextZoomable for text that scales as you zoom Adds text to a figure that grows/shrinks with figure content as the figure is zoomed/scaled Author: Ken Purchase text, zoomable text, scalable text, text zoom, label, rescale 16 0
07 Jan 2010 Screenshot RenderText Draws text (font) into a matrix, by first drawing it in a figure, then capturing the screen. Author: Ken Purchase graphics, text, render text, text renderer, draw text, font 13 0
03 Dec 2007 fminsearchbnd new improved bounded fminsearch algorithm Author: Ken Purchase optimization, optimize, fminsearch, bound, bounded, output 25 7
  • 5.0
5.0 | 2 ratings
Comments and Ratings by Ken View all
Updated File Comments Rating
19 Mar 2013 check if coordinates are inside the hexagon check if coordinates are within the hexagon, can be used to filter out positions outside. Author: Yuanye Wang

Simple and elegant - thanks!

26 Jul 2012 optprop - a color properties toolbox General routines for calculation and analysis of color related properties. Author: Jerker Wagberg

22 Aug 2011 Windows System Sounds Play any Windows system sound from within MATLAB. Author: Drew Weymouth

Does just what it said and just what I needed

18 Aug 2009 writedxf.m Given filename, 3-D mesh - generated DXF file with surface specified by the mesh. Author: Greg Siegle

Some documentation and preferably an example would be very helpful - I'm trying to reverse engineer how to use this. Thanks.

Comments and Ratings on Ken's Files View all
Updated File Comment by Comments Rating
27 Mar 2014 TextZoomable for text that scales as you zoom Text that zooms as you zoom your plot, rather than staying at a fixed font size. Author: Ken Purchase Matt J

Here's a better version of the DeleteFcn,

function DeleteMethod(src,event)
% when called, rescale all fonts in image
hAx=gca;
hFig = get(hAx,'Parent');
ud=get(hAx, 'UserData');
idx=(ud.handles==src);

ud.ratios(idx)=[];
ud.handles(idx)=[];



if isempty(ud.handles)
setappdata(hFig,'KenAxeResizeListeners',[]);
set(hAx, 'UserData',[]);
else
set(hAx, 'UserData',ud);
end

delete(src);

end

27 Mar 2014 TextZoomable for text that scales as you zoom Text that zooms as you zoom your plot, rather than staying at a fixed font size. Author: Ken Purchase Matt J

Ken,

There seems to be a duplicate of this submission at

http://www.mathworks.com/matlabcentral/fileexchange/41501-textzoomable-for-text-that-scales-as-you-zoom

Which is the most official/current version? Also, when I do a very high zoom on the text, parts of the text appear outside the axes. Is there a way to prevent this, i.e., so that only text within the window of the axes is visible?

27 Mar 2014 TextZoomable for text that scales as you zoom Text that zooms as you zoom your plot, rather than staying at a fixed font size. Author: Ken Purchase Matt J

I get the same errors/warnings as Nispio, but setting txtHandle's DeleteFcn callback to the following seems to fix it.

function DeleteMethod(src,event)
% when called, rescale all fonts in image
hAxes=gca;
hFig = get(hAxes,'Parent');
setappdata(hFig,'KenAxeResizeListeners',[]);
set(hAxes, 'UserData',[]);
delete(src);
end

04 Nov 2013 TextZoomable for text that scales as you zoom Text that zooms as you zoom your plot, rather than staying at a fixed font size. Author: Ken Purchase Nispio

This gives the following warnings/errors whenever I try to plot over the top of my old plot.

Warning: Error occurred while evaluating listener callback.
> In axis>LocSetTight1 at 332
In axis>LocSetTight at 277
In axis>LocSetImage at 414
In axis at 135
In showimage at 5
Attempt to reference field of non-structure array.

Error in TextZoomable>getBestFontSize (line 70)
fs = round(ud.ratios * hFigFactor / axHeight);

Error in TextZoomable>localLimitListener (line 106)
fs = getBestFontSize(imAxes);

04 Nov 2013 TextZoomable for text that scales as you zoom Text that zooms as you zoom your plot, rather than staying at a fixed font size. Author: Ken Purchase Nispio

Contact us