Rank: 371 based on 320 downloads (last 30 days) and 2 files submitted
photo

Simon Henin

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Simon View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
14 Apr 2013 Screenshot columnlegend Creates a legend with a specified number of columns Author: Simon Henin columns, figure, legends, potw, pick of the week, legend 294 31
  • 4.7
4.7 | 11 ratings
28 Feb 2011 Screenshot popout creates a popout plot (e.g. zoom-in outset plot) from a specified figure. Author: Simon Henin plotting, zoom, inset 26 1
  • 4.0
4.0 | 1 rating
Comments and Ratings by Simon View all
Updated File Comments Rating
17 Sep 2014 freezeColors / unfreezeColors Use multiple colormaps per figure! Version 2, now works for many types of objects, not only images. Author: John Iversen

Worked like a charm. Thanks!

17 Oct 2013 columnlegend Creates a legend with a specified number of columns Author: Simon Henin

@Pavlov

As you know, this error is a general MATLAB error when it cannot find the function in its path. The reason why it is 'double' is because the first argument of columnlegend is a figure handle cast as a double.

Best,
Simon

05 Aug 2013 columnlegend Creates a legend with a specified number of columns Author: Simon Henin

@ Mik

Thanks for your comment. Not included in the documentation is the fact that the function returns the legend's object handles. Therefore, you could alter these properties on your own.

Something like this would do it:

[legend_h,object_h,plot_h,text_strings] = columnlegend(...);

set(legend_h,'box','on', ...
'color','y', ...
'ycolor','m', ...
'xcolor','b', ...
'visible','on');

16 Mar 2012 columnlegend Creates a legend with a specified number of columns Author: Simon Henin

@ Javier

Unfortunately, at this time this script only works for line graphs, such as created via the plot command. You were probably trying to use the script on a bar or other non-typical matlab figure object.

Best,
Simon

06 Dec 2011 columnlegend Creates a legend with a specified number of columns Author: Simon Henin

@Mathias

Please refer to the full file description. To export to vector graphics files, use an advanced figure export (I recommend export_fig, http://www.mathworks.com/matlabcentral/fileexchange/23629).

Comments and Ratings on Simon's Files View all
Updated File Comment by Comments Rating
05 Feb 2014 columnlegend Creates a legend with a specified number of columns Author: Simon Henin van Dijk, Thomas

Dear reader,

I tried to plot the exact code as you wrote it but get the error: Undefined function 'columnlegend' for input arguments of type 'cell'.

Error in test (line 9)
columnlegend(3, legend_str, 'Location', 'NorthWest', 'boxon');

Does anyone have a suggestion what it might be?
Thanks!

10 Jan 2014 columnlegend Creates a legend with a specified number of columns Author: Simon Henin Matthew

This is a great tool for relatively simple needs, but I found immediately that I can't do much additional legend customization. Just doing
set(lh,'fontsize',8) caused my legend to revert to a single column. Could you include more input options or perhaps make the legend in a way that changing other properties won't affect the layout?

09 Jan 2014 columnlegend Creates a legend with a specified number of columns Author: Simon Henin laoya

That's great! Thank you very much.
I wish it also support 'Best' location like the legend of Matlab.

30 Dec 2013 columnlegend Creates a legend with a specified number of columns Author: Simon Henin Jhabriel

It works very fine with me, I highly recommend to use export_fig to print the plots. I think that it will be a nice improvement if we can pick a 'North' location for example, 'cause if you need to put in the middle of the figure you must move the legend with get 'Position' and set 'Position'. Best Regards Simon.

14 Nov 2013 columnlegend Creates a legend with a specified number of columns Author: Simon Henin Morten

@Aslak Grinsted
I you want to give it a vector of handles like you can do in the legend function, its a small change in columnlegend.m
first give it a extra input, e.g. 'hdl' in line 1:

function legend_h,object_h,plot_h,text_strings] = columnlegend(numcolumns, hdl, str, varargin)

and then change line 49 as well to:

[legend_h,object_h,plot_h,text_strings] = legend(hdl,str);

Contact us