Thursday, November 1, 2012

find a good protocol website!

springer protocols

http://www.springerprotocols.com/BookToc/doi/10.1385/1597450073?uri=/Abstract/doi/10.1385/1-59745-007-3:103

Thursday, September 13, 2012

highlight scripts/codes in blog (just for Blogger)

I searched online, and found a good code-highlighter project called "SyntaxHighlighter"

There's an easy way to do it, just by copying code provided here:
http://www.cyberack.com/2007/07/adding-syntax-highlighter-to-blogger.html

However, this only supports a few brushes (means support highlighting certain type of code).

All the brushes are shown here
http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/

And all brushes to download plus brushes that are being worked on:
http://www.undermyhat.org/blog/2009/09/list-of-brushes-syntaxhighligher/

However, this does not support R language. Hope it will get better soon!

plot multiple axis in one graph and save in R


The useful blog I found is the following:

plot multiple axis in one graph in R


The basic idea is
1<code>> plot  <-- first plot
2 
3> par(new=T)   <-- tell R to overwrite the first plot
4 
5> plot( ..., axes=F, ... )   <-- plot our second plot, but don't touch the axes
6</code

Also, another trick when plotting a graph first, and then save to file is the following:

plot(...)
dev.copy(svg,"*.svg")
dev.off()

http://statistics.berkeley.edu/classes/s133/saving.html

1st Poster for retreat 9/16/12

Part I before started

Some good websites before making the poster:

1. a post I read at the beginning about how to make a poster, very useful
http://colinpurrington.com/tips/academic/posterdesign

2. A very useful blog for making poster using inkscape (very detailed, step by step) http://orangenarwhals.blogspot.com/2012/05/caffeines-impact-on-sleep-inkscape-a0.html

and her previous post for making poster too
http://nouyang.blogspot.com/2012/04/tools-for-scientific-posters-braindump.html

3. Kuler, a website for color pallets
http://kuler.adobe.com/#

4. Some poster examples
1) F1000 posters
http://f1000.com/posters/browse/summary/1092168

2) Some flicker albums
pimp my poster
http://www.flickr.com/groups/pimpmyposter/pool/with/5451179867/

poster sessions
http://www.flickr.com/groups/postersessions/

There are actually more templates for powerpoint poster than in inkscape. I just found template of inkscape from a source from ref [2] (and traced one back) above. Actually the use of inkscape is quite smooth, and can have higher quality (I think). However, there's a little pain when I want to export to pdf, and when I want to insert equation into the poster.


Part II some problems and my solutions

I used inkscape v0.47 on our machine (linux, centOS), there are several problems that I encountered.
1. latex into inkscape
2. superscript
3. export to pdf

1. Although under label "extension->render->latex...", there's an option to type in latex grammar equation, and generate svg graph inside of inkscape, there're some bugs in it that for some reason, some symbols cannot be recognized and keeping outputting errors.

I looked at the webpage about inkscape,
http://wiki.inkscape.org/wiki/index.php/Extension_repository
and tried inklatex and textext extension. For some reason, they won't work on the version I have or keep throwing errors or forced to quit my program. I tried another way. I go to my latex editor on my mac to generate .tex file, and then with the help of this svg latex site, I used linux command to convert my .tex file into svg by using the same command as shown.

latex 
dvips
pstoedit


2. There is superscript function in the version v0.48, but not in v0.47. Because our centOS system needs updated, we lack some components or would bring into conflict if we install v0.48. The basic trick is to select the number or word. Press "Alt" and upper arrow to move upwards. For some reason, it does not work every time. I haven't figured out why it sometimes work, sometimes don't.

3. For export to pdf, the default "save as .." option in inkscape will generate a very large pdf file (~24MB), and cannot usually open by my mac or the PC at the printing facility. The alternative way is to generate .eps file and then convert eps to pdf. The output file is about 2.2MB.


http://linux.die.net/man/1/epstopdf

One annoying thing is that the resolution does not seem high, and even I adjust the dpi from 150 to 300 for outputing eps file, it still generate file with the same size, which made no difference. I hope there will be better ways to do this. 



orange narwhals: Caffeine's Impact on Sleep, Inkscape A0 Scientific...

orange narwhals: Caffeine's Impact on Sleep, Inkscape A0 Scientific...: This is post is continued at  Inkscape A0 Scientific Poster w/ SVG source (Caffeine's Impact on Sleep)  with detailed information. Good example to learn

How to rename files in linux (regular expression)

Here is a very useful link to this question, just need to download their perl script and then use perl regular expression to rename file!! ...