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?

  1. 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.
  2. 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.
  3. 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.
  4. 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.niceZoom
  5. (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.

Generating vectorial images for papers
Send to Kindle
Tagged on:                 

Leave a Reply

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