Rank: 140 based on 346 downloads (last 30 days) and 9 files submitted
photo

Rob Campbell

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Rob View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
25 Jan 2013 Screenshot sigstar - add signifiance stars to bar charts, box plots, etc Add significance bars and asterisks to various plot types Author: Rob Campbell statistics, plotting, pvalue, bar chart, box plot, asterisk 58 6
  • 5.0
5.0 | 1 rating
11 Jul 2012 Screenshot labelEdgeSubPlots Automatically apply x and y labels to subplots only along the edges. Author: Rob Campbell plotting, label, subplot 4 10
  • 4.66667
4.7 | 3 ratings
19 Mar 2012 Screenshot notBoxPlot - alternative to box plots. This function visualizes raw (grouped) data along with the mean, 95% confidence interval, and 1 SD. Author: Rob Campbell box plot, data exploration, error bars, plotting, statistics, potw 79 23
  • 4.875
4.9 | 10 ratings
15 Aug 2010 Screenshot mat2im Convert 2D matrix to a 3D image matrix as used by the image processing toolbox Author: Rob Campbell image processing, conversion, colormap, ind2rgb 7 7
  • 5.0
5.0 | 4 ratings
18 Jun 2010 Screenshot rug plots Creates a so-called "rug" plot similar to those produced by the free stats package, R. Author: Rob Campbell rug, histogram, plot, distribution, scatter plot 9 1
  • 4.0
4.0 | 1 rating
Comments and Ratings by Rob View all
Updated File Comments Rating
27 Mar 2013 sigstar - add signifiance stars to bar charts, box plots, etc Add significance bars and asterisks to various plot types Author: Rob Campbell

Awesome graph! I'm glad the function can cope with this sort of thing.

27 Mar 2013 sigstar - add signifiance stars to bar charts, box plots, etc Add significance bars and asterisks to various plot types Author: Rob Campbell

Sure, here's an example:
>> clf
>> bar(rand(3,5))
>> sigstar([1,2])

I just tested it, it works.

15 Mar 2013 notBoxPlot - alternative to box plots. This function visualizes raw (grouped) data along with the mean, 95% confidence interval, and 1 SD. Author: Rob Campbell

Julia,

The notBoxPlot function returns the handles of the plotted data. It's probably best to use these to do what you want. e.g:

H=notBoxPlot(randn(20,2));
x1=get(H(1).data,'XData');

x1 are the x values of the points in the first box. You can use this approach to get all the x and y data and then plot the lines. You can alter the order of the plot elements on the screen like this: http://www.matlab-cookbook.com/recipes/0050_Plotting/0010_Plot_Manipulation/changingPlotOrder.html

My only note of caution is that the plot may look messy because of the jitter along the x axis. You can modify the jitter with the 3rd input argument. If you have many data points then what you're doing may work better as a scatter plot. Perhaps my rug plot command would be of interest? http://www.mathworks.com/matlabcentral/fileexchange/27582-rug-plots

01 Mar 2013 Zoom an image by repeating pixels Zoom an image by repeating pixels first read an image then take small patch, after that enlarge it Author: Haya Mohammad

Why not just smooth the original image with interp2 then downsample? Two lines of code. There's also filter2. You've done the same thing but in 20 lines of code and used 3 nested loops. It's confusing and not well written because it doesn't make good use of the language. There are no comments and it converts to 8 bit for no reason. Also, you've created a sock-puppet account for this stuff rather than publishing under "Amarjot", as you have done previously.

People here, including me, would like to help beginners learn to code better. However, you're posting the same bad code with no modifications after at least two of us have given you advice and suggestions on virtually identical code in the past. What reaction are you expecting from the community if you have no interest in helping yourself?

25 Jan 2013 sigstar - add signifiance stars to bar charts, box plots, etc Add significance bars and asterisks to various plot types Author: Rob Campbell

Felix, I have submitted an update that should fix the issue with the grouped error bars.

Comments and Ratings on Rob's Files View all
Updated File Comment by Comments Rating
13 Apr 2013 notBoxPlot - alternative to box plots. This function visualizes raw (grouped) data along with the mean, 95% confidence interval, and 1 SD. Author: Rob Campbell Jessica

I am very excited to use this plotting tool but I'm having an issue. When I try to run the notboxplot code I get the following error.
"??? Maximum recursion limit of 500 reached. Use set(0,'RecursionLimit',N)
to change the limit. Be aware that exceeding your available stack space can crash MATLAB and/or your computer.

Error in ==> findobjhelper"

What should I set my recursion limit to so that the code works but I do not crash my computer? Or is there something else wrong?

Thanks,
Jessica

27 Mar 2013 sigstar - add signifiance stars to bar charts, box plots, etc Add significance bars and asterisks to various plot types Author: Rob Campbell Campbell, Rob

Awesome graph! I'm glad the function can cope with this sort of thing.

27 Mar 2013 sigstar - add signifiance stars to bar charts, box plots, etc Add significance bars and asterisks to various plot types Author: Rob Campbell Maria

Thank you for your quick answer!

I was able to figure out how. Here is my example for within groups and between groups comparisons :

figure
barvalues=rand(3,5);
errorsL=zeros(3,5);
errorsU=ones(3,5)*0.05;
handles.bars=bar(barvalues);
hold on
numgroups=size(barvalues, 1);
numbars=size(barvalues, 2);

for i=1:numbars
x=get(get(handles.bars(i), 'children'), 'xdata');
x=mean(x([1 3],:));
pos_bars(i,:)=x;
handles.errors(i)=errorbar(x,barvalues(:,i), errorsL(:,i), errorsU(:,i), 'k', 'linestyle', 'none', 'linewidth', 1);
end
handles.pos_bars=pos_bars;
comp_wgroups={ [handles.pos_bars(1),handles.pos_bars(2)], ...
[handles.pos_bars(1),handles.pos_bars(3)], ...
[handles.pos_bars(1),handles.pos_bars(4)], ...
[handles.pos_bars(2),handles.pos_bars(3)], ...
[handles.pos_bars(2),handles.pos_bars(4)], ...
[handles.pos_bars(3),handles.pos_bars(4)]};
sigstar(comp_wgroups)

comp_bgroups={ [handles.pos_bars(5),handles.pos_bars(6)], ...
[handles.pos_bars(5),handles.pos_bars(7)], ...
[handles.pos_bars(5),handles.pos_bars(8)]};
sigstar(comp_bgroups)

27 Mar 2013 sigstar - add signifiance stars to bar charts, box plots, etc Add significance bars and asterisks to various plot types Author: Rob Campbell Campbell, Rob

Sure, here's an example:
>> clf
>> bar(rand(3,5))
>> sigstar([1,2])

I just tested it, it works.

27 Mar 2013 sigstar - add signifiance stars to bar charts, box plots, etc Add significance bars and asterisks to various plot types Author: Rob Campbell Maria

This function is great, exactly what I was looking for!

But I am still not able to make it work with a grouped bar graph. Can you please provide an example?

Top Tags Applied by Rob
plotting, statistics, image processing, plot, subplot
Files Tagged by Rob View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
25 Jan 2013 Screenshot sigstar - add signifiance stars to bar charts, box plots, etc Add significance bars and asterisks to various plot types Author: Rob Campbell statistics, plotting, pvalue, bar chart, box plot, asterisk 58 6
  • 5.0
5.0 | 1 rating
11 Jul 2012 Screenshot labelEdgeSubPlots Automatically apply x and y labels to subplots only along the edges. Author: Rob Campbell plotting, label, subplot 4 10
  • 4.66667
4.7 | 3 ratings
19 Mar 2012 Screenshot notBoxPlot - alternative to box plots. This function visualizes raw (grouped) data along with the mean, 95% confidence interval, and 1 SD. Author: Rob Campbell box plot, data exploration, error bars, plotting, statistics, potw 79 23
  • 4.875
4.9 | 10 ratings
15 Aug 2010 Screenshot mat2im Convert 2D matrix to a 3D image matrix as used by the image processing toolbox Author: Rob Campbell image processing, conversion, colormap, ind2rgb 7 7
  • 5.0
5.0 | 4 ratings
18 Jun 2010 Screenshot rug plots Creates a so-called "rug" plot similar to those produced by the free stats package, R. Author: Rob Campbell rug, histogram, plot, distribution, scatter plot 9 1
  • 4.0
4.0 | 1 rating

Contact us