Inkscape for scientists: tips & tricks

Want to make some polished figures and posters but don’t want to pay for expensive software? Inkscape is a free, open-source image-editing program like Adobe Illustrator, Corel Draw, Freehand, or Xara X. It’s a flexible and advanced tool, but sometimes all of that flexibility can be intimidating. Anastasia Sares put together a list of super-helpful tips and hacks she’s discovered while editing her science images in Inkscape – enjoy!

General tip: Always keep in mind your image’s final destination

If you’re planning to show this image on screen, make sure that the settings on your editing screen are similar to the settings on the presenting screen. I often like to work with a lower light and warmer colors on my screen to protect my eyes (and some programs like flux do this automatically at night).  However, when working with images, I can periodically check how they will look on the projector by pumping up the brightness and removing the yellow tint. Do you happen to know that the projector in your conference room doesn’t display green very well? Avoid using it as your primary color in a figure.

Also keep in mind the requirements of your final printed product if you are making a figure for a paper or a poster. You might want to avoid black or dark backgrounds, as some printing groups (or those printing from home!) do not like using that much ink. Also think about how a figure in your paper will look in black-and-white, for example, if someone prints it at home.

 Know your file types

Importing: in my experience, Inkscape likes .svg files the best, followed by .eps, .ai and .pdf.  Of course you can always import bitmap files (.png, .tiff, .jpeg, etc), but you won’t be able to edit the individual elements.

Exporting: I always keep my original.svg as a master file so that I can go back to the image later. After that, my most common operations are: File – Save a Copy so that I can create a pdf version (or other file type: there is a list with many options), or File – Export PNG Image. This will bring up the following menu, where you can specify everything from the part of the image to export to the resolution (dpi) and the filename. Just click the export button when you’re done.

Ungroup! Again!

Many figures, when imported into Inkscape from other programs, will have a bunch of junk that is not necessary. One of the first things I do upon importing an image is to ungroup it using control U (yes, for you mac users, you still need to use the control key for shortcuts). In fact, I ungroup it three times in a row. This can solve bizarre issues like having text whose font size is obviously wrong, and it also allows you to see how your image is really composed.

Remove manual kerns

If your text on an imported file is behaving strangely, you might want to highlight all of the text (using the text tool, click into the box and use control A to select everything in there). Then, press shift control R or go to Text – Remove Manual Kerns. This works most of the time, but there are a few cases where the text is garbled enough that I will decide to just rewrite it.

Use the status bar

The status bar can tell you how many objects you have selected, the fill and stroke color of the current object, and the location of an object on the page (its x/y values), and whether you just deleted or undid something. It’s a great friend when things get confusing.

Align & distribute tool

This is my favorite tool. You can call it up using control shift A, or Object – Align and Distribute. It lets me space the sections evenly on my poster template, line up numbers with their ticks on the axes of a graph, make sure that the end-cap of an error bar is centered correctly, and more. You can mouse over the symbols to know what each one does, but really you should just learn this tool inside-out.

Alignment example: center something over two or more objects

There are a few ways you could do this: (1) If all objects are the same size and they are odd in number (i.e. there is actually a center object), center the text over the center object, (2) Select the objects and group them temporarily, align your new object with the center of this group, and then ungroup the objects, (3) If the center of the object to align falls right in between two objects, use the align tool to distribute the centers. Here’s an example of option number 3:

Manipulating many objects at once

After ungrouping, you may find a ton of objects that you’d really like to manipulate together, like dots on a scatter plot. Instead of clicking all of them separately using shift + click (though this will work in a pinch), you can search for a unique property that they all share in the XML code. Go to Edit – XML editor or shift control X, and with your object selected, click on “style”. You can find objects that all have the same fill, for example, by copying the fill property (highlighted below in the lower right window):

Next, you want to go to Edit – Find/Replace or control F, and enter the text you copied. Don’t forget to search in “Properties” as indicated below:

Click “Find”. Now, everything that has that property should be selected. You might have to de-select a few objects that have come along for the ride, and you can do so using shift + click. Then, I usually group the items so that I don’t have to perform this process every single time I want to access them.

I also use the transform tool often to scale many objects at once. You can get here using control shift M, or Object – Transform. On the second tab labeled “scale”, you can make many objects larger or smaller quite easily by entering the desired percentage, but just be sure to check “apply to each object separately” or else the location of your dots will change!

Making one figure look like another & duplicating elements

Often, we have a few figures that we want to give a uniform makeover. In this case, I will either import them all into one file (using control I) so that I can go back and forth easily and make sure everything is the same, or I will temporarily import a finished figure into my next figure and move it off to one side so I can steal things like axis labels and colors. I delete the imported figure when I’m finished.

To quickly copy color or formatting from one object to another, use the dropper tool (you can look up on other tutorials how to use it).

If you want to duplicate something in your drawing, like a text label or an annotation symbol, be sure to use control D. This is better than control C/ control V, which will actually paste a bitmap of the object (yuck).

Nodes Tool

This is a way of seeing the “skeleton” of the objects you are manipulating. It can be helpful for seeing how an object is really constructed.

It can also be useful to access nodes if you want to make something curvy instead of angular: for example, a lot of the scatterplots that I get out of Matlab will have some kind of polyhedron rather than a circle. If I want to change those to circles, I can select all of my dots (see the XML find/replace method above), and then click on the nodes tool. By typing control A, I can select all the nodes at once (they will turn yellow), and then on the node toolbar above, I can make them curved nodes instead of corner nodes.

Clipping and masking

You may have imported bitmap images that you want to crop in Inkscape (a brain, a microscope image, etc). Unfortunately, Inkscape doesn’t use the term “crop”. Instead, it uses “clipping” or “masking”. Basically, you have to create a separate object and use it to cut your desired object down to size. I would tell you more but I think this tutorial does a much better job of explaining it.

Planning a poster

When creating a poster, I often plan out what I want the general format to be on paper first. Let’s say I want something like this:

First, I create a document that is the same size as the final poster I want under File—document properties. Then, if I calculate where the bottom left corner of each of those rectangles should be, and what their height and width are, I can manually edit my rectangles in the toolbar above and get my template, with perfect margins and everything! You can also do this by putting down the content boxes in approximately the right position, and then adjust it by editing the numbers in the toolbar.

My background and content boxes are usually kept in a separate layer from the rest of my poster, so that I don’t have to worry about accidentally selecting them. How to do this? Access the layers tool by using control shift L or using the Layer menu. Here I can add an extra layer on top of the previous one, and label them accordingly. By clicking the little lock icon next to my background layer, I can make sure that nothing on that layer can be changed. If I want to align something relative to a box in my background layer, I can always unlock the layer temporarily and re-lock it again when I’m done.

To move things up or down within a layer, so that they appear in front or behind other objects, you can use the handy arrangement tools in the toolbar (mouse over each one to see what it does):

You’re ready to start making a poster!

That’s it from me for now. For more information, check out these other tutorials that can help get you started:

https://inkscape.org/en/learn/tutorials/

https://design.tutsplus.com/articles/back-to-school-28-easy-inkscape-tutorials–cms-21870

Bio: Anastasia Sares

I’m a PhD candidate in Neuroscience at McGill. I love everything auditory— music, language, perception, and production. Hailing from Colorado, I came to McGill to study auditory processing in specific populations, like musicians and people with a stutter.

Researchgate:  rgate://anastasias
Website: https://www.mcgill.ca/graccolab/people#Anastasia
E-mail: firstname.lastname (at) mail.mcgill.ca
Dec 2, 2017
Edited by: Anastasia Glushko