The Scientific Inkscape extensions help you craft beautiful scientific figures, and they allow you to export fully vector graphics that can be inserted into any document (including LaTeX, Word, and Powerpoint).

The core extensions are: 1. Scaler: Changes the size or aspect ratio of a plot without modifying its text and ticks, making it easy to assemble multi-panel figures. Also works on non-plots. 2. Autoexporter: Automatically refreshes exports of SVGs in a folder, while producing plain SVG exports immune to the rendering bugs of Office and Acrobat. 3. Flattener: Eliminates the structure of imported figures, making them easier to edit. For most imports, this should be the first thing you run. 4. Homogenizer: Sets uniform fonts, font sizes, and stroke widths in a selection. 5. Gallery Viewer: Quickly view and edit all SVGs in a file or folder.
It also includes the following utilities:
All were written by David Burghoff of UT Austin ECE. If you find it useful, tell your collegaues! We would also appreciate it if you could give us a star on Github and on Inkscape's website. You may also find it helpful to map the extensions to hotkeys (done in the Edit > Preferences > Interface > Keyboard menu).
You must have the latest release version of Inkscape (1.4), and the extensions should be installed using the instructions provided here. Download all of the files in the scientific_inkscape folder, then copy them into the directory listed at Edit > Preferences > System: User extensions. After a restart of Inkscape, the extensions will be available under Extensions > Scientific.
When dealing with vector graphics generated by plotting environments like Matlab and Matplotlib, resizing plots after the plot has been generated can be difficult. Generally, one wants to resize the lines and data of a plot while leaving text, ticks, and stroke widths unaffected. This is best done in the original environment, but may be time-consuming.
For most plots, the Scaler generates acceptable scalings with little effort. Lines and data are scaled while text and ticks are only repositioned. The extension attempts to maintain the distance between axes and labels/tick labels by assigning a plot area—a bounding box that is calculated from the largest horizontal and vertical lines. Anything outside is left unscaled. (If your plot's axes do not have lines, temporarily add a framed box to define a plot area.)
To use:
The Scaler has two modes. In Correction Mode, a plot that has already been (badly) manually scaled by normal dragging will be corrected. In Matching Mode, the plot area is made to match the size of the first object you select. This can be convenient when assembling subfigures, as it allows you to match the size of one plot to another plot or to a template rectangle. In any case, to scale something that is not a plot while leaving text and groups unaffected, check the "Selection has no well-defined plot area" option.
Sometimes, you may want to lock the aspect ratio of certain objects while scaling, or you may want to leave them unscaled altogether. For example, this is common for plots with markers—changing the aspect ratio usually makes them look bad. To exclude objects, (a) select them, (b) open the "Advanced" tab of the Scaler, (c) select the appropriate option under Exclusions, and (d) click Apply. They are now invisibly marked for exclusion, and any subsequent scaling will ignore them. Alternatively, groups (inside your grouped plot) are treated scale-free by default (as is text), so you may simply wrap items in a sub-group.
When writing, it is common to iterate between figure adjustment and writing. The Autoexporter makes this easy, automatically exporting files to their final form as they are saved. It runs in the background and watches a directory; whenever any SVGs are changed, it automatically converts them to the specified formats. Just select (a) the formats you would like to export, (b) what directory you would like it to watch, and (c) where you would like the Autoexporter to put the exports. This is especially convenient for documents typset in LaTeX: edits to your SVGs can automatically show up in your document.
The Advanced options can be used to configure how images and text are stored. It can also generate plain SVGs resistant to Microsoft Office rendering bugs that can be directly inserted into Powerpoint and Word, as well as PDFs that are immune to Adobe Acrobat's rendering bugs. It also provides additional options for rasterizing certain elements during the export. For additional information on best practices for exporting, see this page.
The Flattener removes unwanted structure from figures imported into Inkscape. Several of the other extensions require the figure be pre-Flattened, so it is recommended that you map it to a keyboard shortcut for easy calling. 1. Deep ungroup: Imported figures often have highly nested groupings. The Deep Ungroup removes these and unlinks any clones. 2. Apply text fixes: Applies a series of fixes to text described below (particularly useful for text from PDFs). 3. Remove white background rectangles: Removes background rectangles with white fill and no stroke.
The Homogenizer is a utility that can set all fonts, font sizes, and stroke widths in a selection to common values. It also removes any text or path distortions. This is most useful when assembling sub-figures, as it allows you to ensure that the whole figure has a uniform look.
Placing text labels can sometimes be difficult for dense or small plots. The Text Ghoster adds a blurry semi-transparent background to text, allowing it to be legible without obscuring the underlying data.
If you have used Inkscape for editing plots with thousands of elements, you have probably found that it behaves sluggishly. Often, this can be solved by combining paths of the same color together into a single path, but when your plot has multiple curves then you have to select the elements belonging to different curves separately. Combine by Color simplifies this, automatically fusing paths of the same style together. Not only does this tend to improve responsiveness, but typically it will also reduce the file size of the output.
Note: If you subsequently run the Scaler on a path generated by Combine by Color, the Scaler can treat the merged sub-paths independently—just specify the path as a scale-free element.
Favorite Markers lets you designate certain marker sets as favorites, so you do not have to find them in the Fill & Stroke menu. You can also adjust their size.
These extensions have been thoroughly tested on PDFs imported using Inkscape's internal importer. However, there is an ocean of potential issues that can arise when they are used with arbitrary SVGs. Bugs are fixed frequently, so first make sure you have the latest version. If the bug persists, please make a new Issue and include (a) the SVG that caused it, (b) a copy of any error message, and (c) the debug information (found under Help > About Inkscape... > Bug icon). In the meantime, try converting the SVG to a PDF and importing it—that should fix many issues.
$ claude mcp add Scientific-Inkscape \
-- python -m otcore.mcp_server <graph>