Friday, 29 October 2010

Save excel graphs as vector images

This is a lame workaround to get excel plots as vector images.

Select your Micro$oft Excel plots. Copy. Open Micro$oft PowerPoint. Paste-special as enhanced metafile (emf) into an otherwise empty slide. Save your PowerPoint slide as an "other format" file (on the 2007 menu), and choose "emf" (an enhanced windows metafile! wow!). Import your emf file into inkscape and ungroup the object. Delect all the a4-sized crappy blank space from the image and enjoy.

Excel axis labels workaround

Problem:
When making an x-y scatter plot in Micro$oft Excel 2007, there appears to be a bug which prevents the x-axis tick labels displaying correctly (at least on my machine). When you set the x-axis tick labels to text, e.g. "apple", "banana", "pear"..., the chart just displays the labels as 1, 2, 3... even when you are careful to select the cells containing the text labels as your x-data, and despite them showing up correctly in the "select data" dialogue box. This only appears to be an issue for the x-y scatter plot type.

Workaround 1:
Install linux boot disc...

Workaround 2:
Add a new dummy data series to your graph with x = {"apple", "banana", "pear"...} and y = {0, 0, 0...}, or some other value below the y-axis minimum. Select only this series, and set the chart type to area. The x-axis tick labels should now display correctly for the whole chart. Obviously delete the dummy data label from your legend, if you have one.

Friday, 1 October 2010

Stupid papersize stupid stupid

After finally getting to the stage where my thesis would compile on a different computer (see last post to install the extra .sty files), I then discover my page headers have disappeared on my pdf output. It turns out that this is due to the default ps2pdf setting being US letter paper, rather than the A4 size that the rest of my document is on. The answer (for the moment, anyway) is this:
ps2pdf -sPAPERSIZE=a4 thesis.ps
I'm forced to go a-latexin' followed by dvipsin' then ps2pdf because of some bounding box issues with my images with pdflatex that I can't be bothered to solve.
That will serve me right for having a typo in my thesis.