Archive for April, 2008

Citations within a caption in Latex

April 28, 2008

Citations within a caption of a table or figure can produce errors. You will need to use the “\protect” statement.

\caption{The top line shows the result by Einstein et al \protect\cite{einstein}}.

EzyFit for Matlab

April 24, 2008

This looks quite good:

http://www.fast.u-psud.fr/ezyfit/

Power Laws and Matlab

April 24, 2008

Here is some info and software to fit Power Laws to your data.

Wiki

Matlab Software

Statistics with Python

April 11, 2008

Python for scientific use. Part I: Data Visualization

Python for scientific use, Part II: Data analysis

Power-Law Material

April 11, 2008

Interesting material on Power-Laws:

So You Think You Have a Power Law — Well Isn’t That Special?

Power-law distributions in empirical data

Zipf, Power-laws, and Pareto – a ranking tutorial

Do you want to put a black/white/both frame around your picture?

April 7, 2008

I was tired of looking at complicated (ehm, not free) applications to do this, so I wrote my own :)

Enjoy


#!/usr/bin/env python

from PIL import Image
import sys

if len(sys.argv)!=3 and len(sys.argv)!=4:
    print "USAGE: <command> <filename> <black border percentage> <white border percentage>"
    sys.exit(0)
    
filename=sys.argv[1]
percBlack=float(sys.argv[2])

if len(sys.argv)==3:
    percWhite=0
else:
    percWhite=float(sys.argv[3])
    

im = Image.open(filename)
blackWidth=int(im.size[0]*percBlack)
whiteWidth=int(im.size[0]*percWhite)
white = Image.new('RGB',(im.size[0]+whiteWidth,im.size[1]+whiteWidth),'white')
black = Image.new('RGB',(white.size[0]+blackWidth,white.size[1]+blackWidth),'black')
white.paste(im,(int(whiteWidth/2),int(whiteWidth/2)))
black.paste(white,(int(blackWidth/2),int(blackWidth/2)))
black.save('framed-'+filename)


Follow

Get every new post delivered to your Inbox.