Inkscape extensions for figure resizing and editing

Overview

Academic-Inkscape: Extensions for figure resizing and editing

This repository contains several Inkscape extensions designed for editing plots.

  1. Scale Plots: Changes the size or aspect ratio of a plot without modifying its text and ticks. Especially useful for assembling multi-panel figures.
  2. Flatten Plots: A utility that eliminates much of the structure generated by common vector graphics plotting programs. Makes editing much easier.
  3. The Homogenizer: Quickly sets uniform fonts, font sizes, and stroke widths in a selection.
  4. The Auto-Exporter: A program that will automatically export your SVG files to various formats and keep them updated.

All were written by David Burghoff at the University of Notre Dame. If you find it useful, tell your collegaues!

Installation

You must have the latest release version of Inkscape (1.0.2), and the extensions should be installed using the instructions provided here. Download all of these files, then copy them into the directory listed at Edit > Preferences > System: User extensions. After a restart of Inkscape, the group extensions will be available under Extensions > Academic.

Scale Plots

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 program, but precludes quick modification.

For most plots, Scale Plots generates acceptable scalings with little effort. Lines and data are scaled while text and ticks are merely 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 assumed to be a label. (If your plot's axes do not have lines, temporarily add a box to define a plot area.)

Scale Plots example

To use:

  1. Run Flatten Plots on your plot to remove structure generated by the PDF/EPS/SVG exporting process.
  2. Place any objects that you wish to remain unscaled in a group.
  3. Select the elements of your plot and run Scale Plots.

Scale Plots has two modes. In Scaling Mode, the plot is scaled by a constant factor. 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.

Advanced options

  1. If "Auto tick correct" is enabled, the extension assumes that any small horizontal or vertical lines near the edges of the plot area are ticks, and automatically leaves them unscaled.
  2. If a layer name is put into the "Scale-free layer" option, any elements on that layer will remain unscaled. This is basically the same thing as putting an object in a group, but can be easier if there are many such objects (e.g, if your plot has markers).

Flatten Plots

Flatten Plots is a useful utility that eliminates many of the difficulties that arise when plots are exported from common plotting programs.

  1. Deep ungroup: The Scale Plots utility uses grouping to determine when objects are to be kept together, so a deep ungroup is typically needed to remove any existing groupings initially. It also unlinks any clones.
  2. Apply text fixes: Applies a series of fixes to text described below (particularly useful for PDF/EPS text).
  3. Remove white rectangles: Removes any rectangles that have white fill and no stroke. Mostly for removing a plot's background.

Text fixes

  1. Split distant text: Depending on the renderer, it is often the case that the PDF/EPS printing process generates text implemented as a single text object. For example, all of the x-axis ticks might be one object, all of the y-axis ticks might be another, and the title and labels may be another. Internally, each letter is positioned independently. This looks fine, but causes issues when trying to scale or do anything nontrivial.

    drawing

  2. Repair shattered text: Similarly, text in PDFs is often 'shattered'β€”its letters are positioned individually, so if you try to edit it you will get strange results. This option reverses that, although the tradeoff is that text may be slightly repositioned.

    drawing

  3. Replace missing fonts: Useful for imported documents whose original fonts are not installed on the current machine.

The Homogenizer

The Homogenizer is a utility that does what its name implies: it will set all of the fonts, font sizes, and stroke widths in a selection to the same value. This is most useful when assembling sub-figures, as it allows you to ensure that the whole figure has a uniform look.

Auto-Exporter

The Auto-Exporter is not technically an extension, it is a Python script meant to be run in the background as a daemon. If you frequently export your figures to other formats, you know that updating them whenever you change your figure is a nuisance. This program does it automatically: you specify a directory that the program monitors, and whenever any SVGs are changed, it automatically converts them to the formats you specify. Just select (a) the location where the Inkscape binary is installed, (b) what directory you would like it to watch, and (c) where you would like it to put the exports.

It is currently implemented as a Python script and requires at least Python 3.7. If someone would like to package it into a nice GUI and create executables, let me know.

You might also like...
(ICCV 2021) Official code of
(ICCV 2021) Official code of "Dressing in Order: Recurrent Person Image Generation for Pose Transfer, Virtual Try-on and Outfit Editing."

Dressing in Order (DiOr) πŸ‘š [Paper] πŸ‘– [Webpage] πŸ‘— [Running this code] The official implementation of "Dressing in Order: Recurrent Person Image Gene

Implements the training, testing and editing tools for
Implements the training, testing and editing tools for "Pluralistic Image Completion"

Pluralistic Image Completion ArXiv | Project Page | Online Demo | Video(demo) This repository implements the training, testing and editing tools for "

A large-scale face dataset for face parsing, recognition, generation and editing.
A large-scale face dataset for face parsing, recognition, generation and editing.

CelebAMask-HQ [Paper] [Demo] CelebAMask-HQ is a large-scale face image dataset that has 30,000 high-resolution face images selected from the CelebA da

Core ML tools contain supporting tools for Core ML model conversion, editing, and validation.

Core ML Tools Use coremltools to convert machine learning models from third-party libraries to the Core ML format. The Python package contains the sup

Official codebase for running the small, filtered-data GLIDE model from GLIDE: Towards Photorealistic Image Generation and Editing with Text-Guided Diffusion Models.

GLIDE This is the official codebase for running the small, filtered-data GLIDE model from GLIDE: Towards Photorealistic Image Generation and Editing w

Colour detection is necessary to recognize objects, it is also used as a tool in various image editing and drawing apps.

Colour Detection On Image Colour detection is the process of detecting the name of any color. Simple isn’t it? Well, for humans this is an extremely e

Official implementation for
Official implementation for "Style Transformer for Image Inversion and Editing" (CVPR 2022)

Style Transformer for Image Inversion and Editing (CVPR2022) https://arxiv.org/abs/2203.07932 Existing GAN inversion methods fail to provide latent co

Editing a Conditional Radiance Field
Editing a Conditional Radiance Field

Editing Conditional Radiance Fields Project | Paper | Video | Demo Editing Conditional Radiance Fields Steven Liu, Xiuming Zhang, Zhoutong Zhang, Rich

Disentangled Face Attribute Editing via Instance-Aware Latent Space Search, accepted by IJCAI 2021.

Instance-Aware Latent-Space Search This is a PyTorch implementation of the following paper: Disentangled Face Attribute Editing via Instance-Aware Lat

Comments
  • Working with multiple subfigures in a single layer

    Working with multiple subfigures in a single layer

    Hi there! Thanks for making an amazing extension - I've just discovered it, but I'm sure it'll become a dear companion!

    For my current workflow, I prepare all figures for a paper in the same file, but on separate layers. This means that figures containing multiple subfigures have a few groups within them. Currently, it seems that the flattener flattens to the top group, even if I select only select a single subgroup (i.e. all the subfigures become a single group). Is there a way (or could there be) of only doing the deep ungrouping from the chosen group and down?

    Thanks!

    opened by roaldarbol 7
  • Points not adjusting size

    Points not adjusting size

    Hi again, sorry to pile on. Please address these at your own pace. :-)

    It seems that the Scaling doesn't work well with markers such as points. Here's a simple raw example: Screenshot 2022-12-15 at 11 32 16

    And here's the scaled version of it, tried both with Scaling mode and Correction mode: Screenshot 2022-12-15 at 11 34 21

    There also seems to be something funky happening with the header, but I think that's simply because it's not rendered well in the original (I can create a separate issue if you'd like me to dig into it a bit).

    opened by roaldarbol 3
  • Flatten Plots does not fully support differential kerning

    Flatten Plots does not fully support differential kerning

    Text that has a dx component will not always be properly de-kerned. This is not a problem for anything imported by Inkscape, but SVG files generated by other programs may cause issues.

    x_and_dx.zip

    opened by burghoff 0
Releases(v1.2.28)
face_recognization (FaceNet) + TFHE (HNP) + hand_face_detection (Mediapipe)

SuperControlSystem Face_Recognization (FaceNet) ι’ιƒ¨θ―†εˆ« (FaceNet) Fully Homomorphic Encryption over the Torus (HNP) ηŽ―ι’ε…¨εŒζ€εŠ ε―† (TFHE) Hand_Face_Detection (M

liziyu0104 2 Dec 30, 2021
Pytorch implementation of NeurIPS 2021 paper: Geometry Processing with Neural Fields.

Geometry Processing with Neural Fields Pytorch implementation for the NeurIPS 2021 paper: Geometry Processing with Neural Fields Guandao Yang, Serge B

Guandao Yang 162 Dec 16, 2022
IsoGCN code for ICLR2021

IsoGCN The official implementation of IsoGCN, presented in the ICLR2021 paper Isometric Transformation Invariant and Equivariant Graph Convolutional N

horiem 39 Nov 25, 2022
Propagate Yourself: Exploring Pixel-Level Consistency for Unsupervised Visual Representation Learning, CVPR 2021

Propagate Yourself: Exploring Pixel-Level Consistency for Unsupervised Visual Representation Learning By Zhenda Xie*, Yutong Lin*, Zheng Zhang, Yue Ca

Zhenda Xie 293 Dec 20, 2022
Python PID Tuner - Based on a FOPDT model obtained using a Open Loop Process Reaction Curve

PythonPID_Tuner Step 1: Takes a Process Reaction Curve in csv format - assumes data at 100ms interval (column names CV and PV) Step 2: Makes a rough e

6 Jan 14, 2022
Constrained Logistic Regression - How to apply specific constraints to logistic regression's coefficients

Constrained Logistic Regression Sample implementation of constructing a logistic regression with given ranges on each of the feature's coefficients (v

1 Dec 29, 2021
[CVPRW 21] "BNN - BN = ? Training Binary Neural Networks without Batch Normalization", Tianlong Chen, Zhenyu Zhang, Xu Ouyang, Zechun Liu, Zhiqiang Shen, Zhangyang Wang

BNN - BN = ? Training Binary Neural Networks without Batch Normalization Codes for this paper BNN - BN = ? Training Binary Neural Networks without Bat

VITA 40 Dec 30, 2022
Implementation of momentum^2 teacher

Momentum^2 Teacher: Momentum Teacher with Momentum Statistics for Self-Supervised Learning Requirements All experiments are done with python3.6, torch

jemmy li 121 Sep 26, 2022
Deep Illuminator is a data augmentation tool designed for image relighting. It can be used to easily and efficiently generate a wide range of illumination variants of a single image.

Deep Illuminator Deep Illuminator is a data augmentation tool designed for image relighting. It can be used to easily and efficiently generate a wide

George Chogovadze 52 Nov 29, 2022
Implementation of Change-Based Exploration Transfer (C-BET)

Implementation of Change-Based Exploration Transfer (C-BET), as presented in Interesting Object, Curious Agent: Learning Task-Agnostic Exploration.

Simone Parisi 29 Dec 04, 2022
Source code of generalized shuffled linear regression

Generalized-Shuffled-Linear-Regression Code for the ICCV 2021 paper: Generalized Shuffled Linear Regression. Authors: Feiran Li, Kent Fujiwara, Fumio

FEI 7 Oct 26, 2022
AFLNet: A Greybox Fuzzer for Network Protocols

AFLNet: A Greybox Fuzzer for Network Protocols AFLNet is a greybox fuzzer for protocol implementations. Unlike existing protocol fuzzers, it takes a m

626 Jan 06, 2023
YOLOv7 - Framework Beyond Detection

πŸ”₯πŸ”₯πŸ”₯πŸ”₯ YOLO with Transformers and Instance Segmentation, with TensorRT acceleration! πŸ”₯πŸ”₯πŸ”₯

JinTian 3k Jan 01, 2023
Garbage Detection system which will detect objects based on whether it is plastic waste or plastics or just garbage.

Garbage Detection using Yolov5 on Jetson Nano 2gb Developer Kit. Garbage detection system which will detect objects based on whether it is plastic was

Rishikesh A. Bondade 2 May 13, 2022
Dynamic hair modeling from monocular videos using deep neural networks

Dynamic Hair Modeling The source code of the networks for our paper "Dynamic hair modeling from monocular videos using deep neural networks" (SIGGRAPH

53 Oct 18, 2022
Scripts and outputs related to the paper Prediction of Adverse Biological Effects of Chemicals Using Knowledge Graph Embeddings.

Knowledge Graph Embeddings and Chemical Effect Prediction, 2020. Scripts and outputs related to the paper Prediction of Adverse Biological Effects of

Knowledge Graphs at the Norwegian Institute for Water Research 1 Nov 01, 2021
Vikrant Deshpande 1 Nov 17, 2022
Pytorch implementation of SELF-ATTENTIVE VAD, ICASSP 2021

SELF-ATTENTIVE VAD: CONTEXT-AWARE DETECTION OF VOICE FROM NOISE (ICASSP 2021) Pytorch implementation of SELF-ATTENTIVE VAD | Paper | Dataset Yong Rae

97 Dec 23, 2022
Code for ACL 21: Generating Query Focused Summaries from Query-Free Resources

marge This repository releases the code for Generating Query Focused Summaries from Query-Free Resources. Please cite the following paper [bib] if you

Yumo Xu 28 Nov 10, 2022
A Multi-modal Model Chinese Spell Checker Released on ACL2021.

ReaLiSe ReaLiSe is a multi-modal Chinese spell checking model. This the office code for the paper Read, Listen, and See: Leveraging Multimodal Informa

DaDa 106 Dec 29, 2022