Rank: 1115 based on 147 downloads (last 30 days) and 9 files submitted
photo

Malcolm McLean

E-mail
Company/University
Weizmann Institute

Personal Profile:

 

Watch this Author's files

 

Files Posted by Malcolm McLean View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
13 Sep 2011 Screenshot Faded bar chart Bar chart add-on that shows the error as a fade-out rather than using error bars. Author: Malcolm McLean bar chart, error bars, faded errors, gaussian, data representation 12 2
08 Jun 2011 Screenshot Data density plot Plots data density of a two-dimensional distribution for human viewing. Author: Malcolm McLean data density, visualization, statistics 69 10
  • 3.85714
3.9 | 7 ratings
02 Jan 2011 Screenshot Coloured bar chart Simple wrapper to bar allowing you to specify bar colors and labels. Author: Malcolm McLean bar, bar chart 14 1
  • 5.0
5.0 | 1 rating
13 Sep 2010 Screenshot seqlogo generator Generates a sequence logo as a true colour array. Author: Malcolm McLean seqlogo, sequence logo, dna, bioinformatics 1 0
22 Aug 2010 uidendrogram Interactive dendrogram viewer using nested boxes Author: Malcolm McLean gui, dendrogram, clustering, linkage 18 0
Comments and Ratings by Malcolm McLean View all
Updated File Comments Rating
04 Aug 2011 Data density plot Plots data density of a two-dimensional distribution for human viewing. Author: Malcolm McLean

J G. Yes. Just pass in a dimension of one pixel for the y axis, and it ought to provide you with a data density plot. You'll have to stretch the image to see it.

29 Nov 2010 MATLAB Goto Statement The one and only. Author: Husam Aldahiyat

Matlab should have a goto.

The reason is that often you want skip code in scratch scripts. Currently the only way to do that is to comment out, which creates its own problems.
e.g. the first hundred lines of the script execute lengthy functions, the last 100 lines print out the results in a nice format. During testing, you want to fiddle about with the printout to make it nicer. So you want to be able to run the analysis once, put the results into the workspace, and then run the formatting code several times, quickly, until you get it right.

15 Sep 2010 Increase Image Resolution Increases the resolution of an image by interpolation Author: Francisco de Castro

Cris: that's sort of true. You can't create information out of nowhere. However if I have a curve specified by several points, and the curve represents the true underlying data, I can improve the representation of the data by taking more points.

If you look at Fransisco's images, he's clearly improved the definition of the teeth. Unless he's cheating, the image quality has been improved.

14 Sep 2010 Increase Image Resolution Increases the resolution of an image by interpolation Author: Francisco de Castro

THis could be incorporated into my sequence logo program to scale the fonts (see my recent contribution). But for that I'd need it to work on arrays - presumably not a big change to the function.

03 Mar 2010 portable matfile exporter (in C) Export matfiles from C programs, regardless of the platform the file is running on. Author: Malcolm McLean

Duh. Rank beginner's error. Of course the file must be opened with "wb".
The problem is that on some platforms it makes no difference. Where it does, you'll only see errors when writing line feeds. So that's as why I couldn't replicate your bug.
I've uploaded a fix.
I'll address ypur other points later.

Comments and Ratings on Malcolm McLean's Files View all
Updated File Comment by Comments Rating
04 Aug 2014 Data density plot Plots data density of a two-dimensional distribution for human viewing. Author: Malcolm McLean Alain

For the y axis issue and to write your own ranges along the axes, you may modify the DataDensityPlot function as follows:

function [ f ] = DataDensityPlot( x, y, levels, limits)

map = dataDensity(x, y, 256, 256, limits);
map = map - min(min(map));
map = floor(map ./ max(max(map)) * (levels-1));

f = figure();
image(map);
colormap(jet(levels));

if(nargin == 4)

set(gca, 'XTick', [1 256]); % --
set(gca, 'XTickLabel', [limits(1) limits(2)]); % --
set(gca, 'YTick', [1 256]); % --
set(gca, 'YTickLabel', [limits(3) limits(4)]); % --
set(gca, 'YDir', 'normal'); % --

else

set(gca, 'XTick', [1 256]);
set(gca, 'XTickLabel', [min(x) max(x)]);
set(gca, 'YTick', [1 256]);
set(gca, 'YTickLabel', [min(y) max(y)]);

end

uiwait;

end

---------------------

It may then be called for instance as follows:

limits = [1 4 1 4];
DataDensityPlot(x, y, 100, limits);

---------------------

If you have weights associated to your data points, you can transform your x and y vectors before feeding them to DataDensityPlot function as follows:

function [wx, wy] = WeightedDensityTransform(x, y, weights)

if (isequal(size(x),size(y),size(weights)) == 0)
error('The input vectors must have the same dimensions');
end

sizeX = size(x);
length = sizeX(2);

index=0;

for i=1:1:length

depth = round(weights(i));
index=index+1;
wx(index) = x(i);
wy(index) = y(i);

if (depth > 1)

for j=1:1:depth-1
index = index + 1;
wx(index) = x(i);
wy(index) = y(i);
end;

end;
end;
end

---------------------

You may then call it in the following way:

[wx, wy] = WeightedDensityTransform(x,y, w);
limits = [1 4 1 4];
DataDensityPlot(wx, wy, 100, limits);

20 Jul 2014 Faded bar chart Bar chart add-on that shows the error as a fade-out rather than using error bars. Author: Malcolm McLean Dr. Jens Koopmann

Hi Malcom,

great effect. I like it.

KR

Jens

08 Apr 2013 Data density plot Plots data density of a two-dimensional distribution for human viewing. Author: Malcolm McLean Jeremy

http://www.mathworks.com/matlabcentral/fileexchange/41185-datadensityplot2d

08 Apr 2013 Data density plot Plots data density of a two-dimensional distribution for human viewing. Author: Malcolm McLean Jeremy

Functional, but a bit slow. I wrote a similar function using hist3 to perform the density calculation, runs a million samples in less than a second.

19 Oct 2012 Data density plot Plots data density of a two-dimensional distribution for human viewing. Author: Malcolm McLean Nina

Great in it does what I want, but I have the same problem with the yaxis reversed and matlab frozen while window open. Is there an improved or similar function?

Contact us