Menu

Generating vectorial images for papers

When I wrote my first two papers with the work I had done for my PhD I had to generate several diagrams and graphs. I had no idea about how to generate nice graphs to show the measurements, so I just made them with OpenOffice Calc [1] and captured the screen. Results, I must say, were a bit lousy. From a safe distance it was not very bad, but when you zoomed in the pdf…

Plain jpg showed pixels as large ugly squares and the results were very far away from being sexy. So I realized I needed to change that. But after looking into different figure creation programs, I could not find one without a high learning curve (which required a time I did not have) or with ugly figures style. In the end, after trying different things, I came up with the method I have been using all the times since then. You only need to have OpenOffice [2] and Inkscape installed.

There are probably better ways of doing it but… Hey, this one is easy and it works. What else do you need?

Generate your figures using OpenOffice
The potential for creating flow graphs, figures and graphs with OpenOffice is great. You can draw almost any figure you need for your papers in Impress, and if what you need is to generate graphs from data, Calc offers a large variety of 2-D and 3-D representations.
Tip: Use line widths of ~0.05 to get the best results from this method.

Export your figure as SVG“File -> Export -> SVG (in file type)”. Easy as pie! With this, you get a vectorial image of your figure. The first important step is already given.

Open the SVG with Inkscape and edit it
Ok, maybe this step can be a bit trickier if you have never used Inkscape before. But the knowledge you need of the program for this matter is minimal. In fact, if you have created a figure with Impress, you already have all the skills you need to edit the figure here. Sometimes you have to do small corrections to crooked arrows, or if you have created your figure from Calc you will have to delete the data rows until only the figure you want to put in the paper remains. Work the different possibilities of Inkscape around until you can use its basic characteristics without problem. It won’t take long.

Export the figure as EPS
And here we are, the final step. First, go to the “File->Document properties” dialog box. Click on the “Adjust page to content” line and press the “Adjust page to figure or selection” button. In the main window the page should shrink to the size of your figure (if it doesn’t maybe you forgot to remove some remaining element, check for it). Now go to “File -> Save As…” and select Encapsulated Postscript (EPS) as file extension. Once you accept, a new window with EPS properties will pop up. Uncheck the “The exported area is the drawing” box and make sure the “The exported area is the page” one is selected. Now save the file and you are done. You have your vectorial figure that will not lose quality no matter how much you zoom into it.

(Optional) Transform the EPS into PDF
Finally, some LaTeX packages require that the figure format is PFD. In that case, the process is as simple as using the Linux tool epstopdf. I do not recommend the use of ps2pdf, it shows a severe lack of respect for the bounds of your figures and generates A4-sized pages.

I hope this little tutorial helps you to improve the visual quality of your scientific communications. It for sure did it with mine.

[1] Use free software as much as you can!

[2] Every time I refer to OpenOffice I also mean LibreOffice. Both of them work just as great for this purpose.

Your email address will not be published. Required fields are marked *

Comment

Name *

Email *

Website

CPU Design Engineer at Arm. Doctor in Electronic Engineering by the UPM. Father of two lovely little girls. Skunkworks projects commando. I love computer architecture, digital hardware design, research, clean code and black coffee. From time to time I also tinker with high performance computing, FPGAs and board games.

I also have some experience in scientific communication. In my free time I enjoy reading science-fiction and fantasy as well as technical books.

Recommended books

See MIPS Run: Second Edition by Dominic Sweetman – With MIPS back in the game through ADAS and high-end routers, this is one of the best resources to get a hang on the MIPS architecture. Despite being a bit dated now (it’s a 2006 book, after all!) it still has some of that “wow!” factor in it with some very interesting cases of memory management and other aspects of the ISA.