Code for bending Matlab's figures to your will.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
addpstars.m
addptext.m
axscale.m
barchart.m
centerinaxis.m
chanceshade.m
cmap_bgr.m
cmap_bwp.m
cmap_bwr.m
cmap_glasbey.m
cmap_pastel.m
cmap_redyellow.m
cmap_wb.m
cmap_wr.m
colorScale.m
colorbarbetter.m
contrastlines.m
datavec2sliceimage.m
deleten.m
errorbar_tick.m
errorshade.m
figurebetter.m
getdatalims.m
getn.m
histline.m
im_canvas.m
im_imposemag.m
im_isolatebiggest.m
im_magphase.m
im_mask.m
im_phasescramble.m
im_reconstruct.m
im_resizeandcrop.m
im_trim.m
im_wmpscramble.m
imageaxes.m
imagend.m
imageplot.m
imageticks.m
imoutline.m
intensity2rgb.m
invertfaceedgecolors.m
lockaxisaspect.m
lslinebetter.m
mat2strcell.m
matchaxis.m
matchplotbox.m
matchticklength.m
mdscale_robust.m
meshaxes.m
minimalticks.m
p2str.m
padaxislims.m
plot2dclassifier.m
plotarray.m
plotboxpos.m
plotcircles.m
plotmdslines.m
plotorigin.m
plotrdms_batch.m
plotspectrum.m
polargrid.m
polarpoints.m
printbyname.m
printstandard.m
rdmfig.m
rdmplot.m
readimages.m
renamenewfigures.m
rgbchar.m
rotateXLabels.m
roundplotlimits.m
scaleaxbydata.m
seconds2str.m
setn.m
setplotz.m
setprintsize.m
settextpos.m
showimages.m
showvideo.m
slicefigure.m
spm2movie.m
str2cellrows.m
textscatter.m
ticklabel2text.m
titlebetter.m
uistackn.m
uniquehandle.m
weightedmeanphase.m

README.md

This repo is a collection of utility functions for figures in Matlab. Below is a quick demo illustrating how the code can be used to visualise distance matrices.

function plotdemo
% control variables
ncon = 24;
imdim = 30;
% cook ncon noise patches with a colour gradient 
colours = [ones(1,ncon); ((1:ncon)/ncon); ((ncon:-1:1)/ncon)]';
images = arrayfun(@(x)bsxfun(@times,rand(imdim,imdim,3),...
    reshape(colours(x,:),[1 1 3])),1:ncon,'uniformoutput',false);
% generate a distance matrix according to the colours and some (independent)
% noise
rdm = squareform(pdist(colours+rand(ncon,3)*.4));
fh = figure;
set(fh,'name','distance matrix');
% visualise distance matrix with image labels
rdmplot(gca,rdm,'labels',images,'nrows',4,'gridlines',4:4:ncon);
% visualise in 2D with multidimensional scaling
xy = mdscale(rdm,2,'criterion','metricstress');
fh = figure;
set(fh,'name','multidimensional scaling')
imageaxes(gca,xy,images);