Rank: 40 based on 1023 downloads (last 30 days) and 16 files submitted
photo

Kelly Kearney

E-mail
Company/University
University of Miami/NOAA AOML

Personal Profile:
Professional Interests:
ocean biogeochemistry, ecosystem modeling

 

Watch this Author's files

 

Files Posted by Kelly View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
28 Aug 2014 Screenshot Color Palette Tables (.cpt) for Matlab Create and apply GMT-style colormaps in Matlab Author: Kelly Kearney color palette table, colormap, gradient, color 71 16
  • 5.0
5.0 | 6 ratings
26 Aug 2014 Screenshot legendflex: a more flexible legend Create a legend with more flexible positioning and labeling capabilities Author: Kelly Kearney legend, label, potw, pick of the week 193 38
  • 4.63636
4.6 | 22 ratings
23 Jul 2014 Screenshot contourfcmap: filled contour plot with precise colormap Creates a filled contour plot, with more precise control over colors than contourf. Author: Kelly Kearney contour, filled, contourf, contor 54 10
  • 4.6
4.6 | 5 ratings
10 Jul 2014 Screenshot plotboxpos Returns the position of a plotted axis region Author: Kelly Kearney annotation, customization, plotted, area, axis, position 22 8
  • 4.76923
4.8 | 13 ratings
10 Jul 2014 Screenshot line2arrow: Add an arrowhead to a plotted line Combines line plotting with annotation arrows. Author: Kelly Kearney line, arrow 109 2
  • 5.0
5.0 | 2 ratings
Comments and Ratings by Kelly View all
Updated File Comments Rating
25 Aug 2014 legendflex: a more flexible legend Create a legend with more flexible positioning and labeling capabilities Author: Kelly Kearney

@Jose,

Legendflex does not always play nicely with the Latex interpreter, because the Latex interpreter interacts unpredictably with the Extent property of text objects (which I rely on to reposition everything). I'm uploading a small text document to this function to explain this. The document offers a few workarounds if text is running into each other or overflowing the legend box, but I'm not sure I have a good suggestion for misaligned baselines, as in your case. My crystal ball suggests things will be a bit better in the 2014b release, but still not perfect.

02 Aug 2014 contourfcmap: filled contour plot with precise colormap Creates a filled contour plot, with more precise control over colors than contourf. Author: Kelly Kearney

@Carla,

Your x, y, and z data need to formatted in the same way as for the native contourf function, so you'll need to grid your data (not knowing the arrangement of the points in your vectors, I don't know whether you'd have to simply reshape, regrid, or use a scattered interpolant). Type help contourfcmap to see an example of use.

30 Apr 2014 Taylor Diagram Plot a Taylor Diagram Author: Guillaume MAZE

Very helpful function. My only issue is that the font sizes are difficult to alter. The axis labels inherit from the original axis, but the tick labels themselves are hardcoded and their handles are hidden on creation, so one can't alter that later.

14 Mar 2014 Plot and compare histograms; pretty by default Compares multiple sets of data elegantly. Set bins and axis bounds to be appropriate for the data. Author: Jonathan C. Lansey

I want to love this function; its basic function is great, and it has helped me analyze datasets many times. Two things would make it better...

1) Return graphics handles! It drives me crazy that I always have to handle-dive via findobj to modify properties and analyze details after plotting.

2) Set default line width, axis font size, font name, etc. to match the user's defaults. You may prefer the bigger font size and thicker lines, but not everyone does, and it's a bit of a hassle to pass these properties with every call to nhist just to maintain no change.

02 Feb 2014 boundedline: line plots with shaded error/confidence intervals Plot one or more lines with a shaded boundary (can represent error, confidence intervals, etc). Author: Kelly Kearney

@Omar,

The cmap input option should allow you to specify the colors you want to use for the lines, so that you can maintain the correlation between line and patch. For example:

[hl,hp] = boundedline(1:10, rand(10,1), 0.1, 'cmap', [0.3 0.2 0.5]);
set(hl, 'linewidth', 3);

Line style, etc. still need to be modified after the fact; color is treated specially due to the link between line and patch that you point out.

Comments and Ratings on Kelly's Files View all
Updated File Comment by Comments Rating
25 Aug 2014 legendflex: a more flexible legend Create a legend with more flexible positioning and labeling capabilities Author: Kelly Kearney Jose

Just in case somebody else would like to use the latex interpreter and an horizontal legend. A quick fix is to either add $^{~}$ or $_{~}$ if one wants to adjust the top or bottom height of the word, respectively. This worked for me.

25 Aug 2014 legendflex: a more flexible legend Create a legend with more flexible positioning and labeling capabilities Author: Kelly Kearney Jose

@ Kelly

thanks for the quick reply. I guess I will have to find some quick fix for this :)

25 Aug 2014 legendflex: a more flexible legend Create a legend with more flexible positioning and labeling capabilities Author: Kelly Kearney Kearney, Kelly

@Jose,

Legendflex does not always play nicely with the Latex interpreter, because the Latex interpreter interacts unpredictably with the Extent property of text objects (which I rely on to reposition everything). I'm uploading a small text document to this function to explain this. The document offers a few workarounds if text is running into each other or overflowing the legend box, but I'm not sure I have a good suggestion for misaligned baselines, as in your case. My crystal ball suggests things will be a bit better in the 2014b release, but still not perfect.

25 Aug 2014 legendflex: a more flexible legend Create a legend with more flexible positioning and labeling capabilities Author: Kelly Kearney Jose

great work! I believe I found a bug with the current program.

When trying to use it with the latex interpreter and having an horizontal legend, apparently, all word items in the legend must have the same height, otherwise the legend becomes not properly aligned.

Here is an example code:

close all
figure,
p1 = plot(1,1,'b-','LineWidth',linewidthl)
hold on
p2 = plot(1,1,'r--','LineWidth',linewidthl)
hold on
p3 = plot(1,1,'g--','LineWidth',1.5)

legendflex([p1,p2,p3], {'P','Ap','R'}, 'ref', gcf,...
'anchor', {'n','n'},...
'buffer', [0 0],...
'box','off','nrow',1,...
'Interpreter','latex','FontSize',fontleg)

Since Ap does not have the same heigth as P and R, Ap becomes unaligned. However, if Ap is switched to Ac, then all is OK. Anybody has experienced this problem before?

20 Aug 2014 plotboxpos Returns the position of a plotted axis region Author: Kelly Kearney Greene, Chad

Thank you Kelly for solving a problem I've had for months. This function is well written. You've saved me a world of headaches.

Contact us