Skip to content

How I made a poster; 2014

I made a scientific poster last week, for the first time in five years.

I drew it in Inkscape, a free opensource vector drawing package. I’m have quite a lot of experience using Inkscape in drawing cave surveys, but I believe it’s both relatively easy to use, and has some extremely useful tools for constructing posters (most notably the alignment & distribution tool). The one gotcha is that you have to explicitly ask for it to spell check your text fields! It’s native fileformat is SVG based, and it is very happy to import PDFs (i.e. figures / graphs – from gnuplot I use the colour postscript terminal, then ‘ps2pdf’ on the command line).

Crystal Kinematics Poster

Like most scientists, I am no designer. So I’m mainly winging it, and can’t rely on whether things look right or not! I found a colour scheme that was close to some of my figures from Adobe’s Color CC [1], and then put those five colours in a swatch just outside the page on the Inkscape. I put all the main text in a medium weight Futura clone, because I like it.

These days I make my talk slides in Google Present, viewing a certain slide and then selecting “Download as SVG”, opened in Inkscape as a fairly well-behaved vector images with embedded bitmaps, to then have the slide template objects deleted & used within the poster.

I also made a tie-in website, linked from a QR code (generated with a free web service) on the poster, as a place to collate links to the YouTube videos and a reprint of the poster itself.
This I generated with GitHub pages and the Flatdoc HTML/JS code [2], a lightweight and modern responsive web framework. You put the Flatdoc HTML file (template.html) as index.html on the ‘gh-pages’ branch of your GitHub repo, having edited the HTML to set the USER/REPO/Title correctly. It then pulls down the from your ‘master’ branch of the repo, and live renders any changes on the browser. Assuming you are used to GitHub & have (fairly minimal) HTML/CSS abilities this is a really quick way to put together something that looks pretty acceptable. [3]

Overall I was quite pleased with how easy it is to put together something that looks acceptable. If you are interested – have a look at the Inkscape SVG & the structure of the github REPO. [4]


Maximum coverage for loops; bit reversing integars

So I was live-plotting some results from a simulation code (written in C), which was producing results for an input parameter¬†(in this case Temperature), over a range generated by a for loop. Pretty standard computational physics. It was clearly suboptimal watching the new dataset arrive in small, fine, increments from zero upwards; the obvious thing was to change the discretisation of the for loop & make it more coarse. Yet, surely there is some way to get better coverage of the dataset, like a ‘streaming’ JPEG or GIF arriving with increasing discretisations of the blockiness?

What about some mathematical function that would jump around the space with good coverage? A pseudo-random number generator with a fixed period? Some mathematical function that would map an ascending series of integers into spatial coverage? Modulus arithmetic on some prime or co-prome addition?

How about reversing the binary digits in an incrementing integer? So instead of going 0,1,2,3…254,255; you would bounce around the number line: 0,128,64,192,32,160 … 127,255. So it’s sort of doing a binary split of the unoccupied locations on the number line at each step. You get maximum coverage, with increasing levels of fidelity, ending up with a complete (but missorted) dataset.

So with a Bit Twiddling hack found via Stackoverflow (, the totally crazy bit-shifting code (for a byte, so covering 256 values) looks like:

It’s pretty low level (in Python or similar, you could reorder a list, and iterate over that instead), but the result is nice! It’s almost so useful that perhaps one should write it into a mini function or macro…

Snippet: Tiddlywiki for Scholars

This looks like it might be extremely useful for a personal knowledge base / article discussion. It’s setup more for humanities work currently (books, biographies and authors), than science (some way to import a DOI to build a paper-discussion place would be fantastic). A collaborative journal club / papercore / paper summary might also work wonderfully within here.

Snippet: Mendeley Desktop (Mac OS) failed update

Mendeley Desktop on my Mac at work had silently stopped working – clicking the button in Launchpad did nothing. Navigating to the directory on the shell, cd “/Applications/Mendeley\” it appeared a prior update had broken halfway through, leaving a null file for ‘Mendeley Desktop’. Whoops. However there was a ‘Mendeley Desktop.bak’. Running this from the shell, Mendeley Desktop appeared, and then offered to update itself, this time completing successfully.

Links from Julia Land

Julia 0.3 Release Candidate 1 has quietly appeared on the nightly builds page; release notes in the very active GitHub repository – improvements to the REPL (tab conversion of ‘latex maths’ to unicode), and a lot of interesting linear algebra improvements.

The inaugural JuliaCon has been held, and the presentation slidedecks are already online:; videos are coming but the upload date has been pushed back as they are edited and transcribed.

On the Julia users email list, there was a link published to a very interesting essay on the history of programming languages:!topic/julia-users/T6f9hCkDW6g. It ends on a very pro-Julia note!

I’ve personally just been using Julia ‘for real’ in preparing some data for a publication (rather than just using iJulia as a glorified unicode-capable calculator for physical identities). Here I used Julia to calculate the partition function on the fly (by Monte Carlo integration) for an arbitrary torsional potential in a polymer, then form a tight binding Hamiltonian & evaluate the density of states extremely quickly with the Sturm sequence method. If I hadn’t discovered Julia, I would have been trying to do this with Python, and though totally feasible I’m not sure I would have got here. You are perpetually operating at the absolute limit of your cognitive capacity in scientific theory (and for me, I’m pretty limited); the more powerful the tools you have the more you can achieve, and Julia does indeed seem a very well geared ‘bicycle for the mind’ in scientific computing.

Snippet: Console diary – vimwiki (now with more git & autohooks)

I’ve dallied with keeping a computer / online logbook. I’ve tried many products, even wrote my own (retrospectively crazy) set of scripts called ‘freck’*. But all of these methods were only ever used for a week or two before falling by the wayside. Just too much extra effort for (me) to follow through with. And therefore they all become walled-gardens with no way of getting the information out.

I keep paper notebooks for talks; I think it is essential to be able to sketch maths and diagrams, and I honestly think my brain is more engaged when I’m making notes by hand versus either typing or just listening (i.e. daydreaming). But they’re impossible to search through, and just a bit ridiculous to use when sitting in front of a computer.

The one I’ve returned to vaguely reliably is ‘vimwiki’ (~10’000 words over 4 years). Probably because it lives in vim, and is thus only ever two keystrokes away. It runs in two modes, a ‘diary’ linked to ‘\w\w’ which drops you into a sensibly dated file for today, and a full blown personal wiki at ‘\ww’. All files are just… files in ~/vimwiki.

Mailing list:!forum/vimwiki

So now my ~/vimwiki is a BitBucket private repository, my work machine and laptop both feed from it. But the extra struggle of changing to the correct directory & then ‘git pull’ or ‘git add / commit / push’ was just a bit too much effort for me. So I was thinking of doing something primitive like put it in Dropbox, before coming across this blog entry:

I’ve no interest in encrypting my diary but the auto-hooks to commit to a DVCS are a fantastic idea.

Here’s the hooks, translated for git:
tail ~/.vim/ftplugin/vimwiki.vim
augroup vimwiki
au! BufRead /home/jarvist/vimwiki/ !git pull
au! BufWritePost /home/jarvist/vimwiki/* !git add ;git commit -m "Auto commit + push.";git push
augroup END

[ * ‘Freck’, evidently a word read here:

This was a set of scripts I wrote essentially the day after I submitted my PhD thesis – having struggled with finding original data sources to things I only had as poorly named postscripts and PDFs, or even just hard annotated printouts from supervisor meetings.
They worked both remotely on the HPC + locally. I recall that ‘freck’ would take a figure as an argument, send a copy of this back to my workstation, demand a caption, and automatically add a figure to a ‘labbook’ Latex file, with some commented out sections ‘%’ informing future-me where exactly this data came from, auto date stamp, where it was generated etc. Different projects were set by an environmental variable, which were then sub-directories in the local ~/freck/ directory with Latex files & figures. I think the idea was that I would have a vim session running locally, and would reload the text, now with a generated figure.

Writing it’s description, it still sounds like a good idea! I’d probably now do it with more markdown (at least at the raw ‘freck’ end), and a DVCS.

Only surviving remnant:
Though who knows, maybe I’ll make it a Friday afternoon project to refind the code & update it for something more sane / general. ]

Making Talk Slides in 2014

These days I almost exclusively make my talks in Google Drive / Present. It just works, I can work on my talk from anywhere (my laptop is Linux, my work machine is Mac OS) the modern interface is really quite nice (at least in Chrome). Most importantly for me it has very sensible auto-hints for placing items (a feint alignment lines pop up when you are centre / left / right aligned with other elements on the page).

I download the Talk as PDF for actually putting on my laptop / USB stick. This used to sometimes cause really irritating behaviour with lines reflowing compared to what you saw on screen (sometimes disappearing a word / reference off the page or under another element) but it seems to be ~pixel perfect recently.

I use the codecogs Latex renderer for bits of maths and physics (18pt / 300 / white background with Latin Modern), simply copy and pasting the gif into the slide & then copy + pasting the Latex into the Google Drive ‘speaker notes’ at the bottom of the screen, for future reference / adaptation for another talk or paper.

I often find myself dragging and dropping .pngs directly from a directory of post-processing codes to make up a talk. All my Python codes which plot to Matplotlib now automatically save figures they generate as PDFs and PNGs, with a name that ensures they don’t overwrite each other & you can cross reference to commit versions in the future. This I have found so incredibly useful, barely remembered runs of old codes and datasets are sitting there with ‘talk ready’ images.

import datetime"%Y-%m-%d-%H%M") #String of standardised year-leading time
fig.savefig("%s-LongSnakeMoan.pdf"%now) #Save figures as both PDF and easy viewing PNG (perfect for talks)

Previously I made talks with OpenOffice / LibreOffice (Horrible, buggy experience) and Latex/Beamer (too slow to include figures, horrific / absent control about where to place elements. Leave it for the mathematicians!)

My only two issues with Google Present are no videos (if not online – it will link to YouTube), and no Futura font (I use Open Sans in its stead).

There’s a few quirks in the user interface, most particularly if you’re making a derivative talk, you must use ‘Insert / Import slides…’ rather than trying to copy+paste a load of slides from a different browser window – this makes it unhappy! (I guess because it’s bringing them to the local clipboard and then trying to push them back up to Google?)