Skip to content

saraedum/svgdigitizer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SVGDigitizer — (x,y) Data Points from SVG files

Logo

The purpose of this project is to digitize plots in scientific publications, recovering the measured data visualized in such a plot.

Installation

pip install -e .

Command Line Interface

There's a simple command line interface.

$ svgdigitizer
Usage: python -m svgdigitizer [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  digitize
  paginate
  plot
$ svgdigitizer plot test/data/Ni111_NaOH_Beden1985_Fig2c.svg
[displays a plot]
$ svgdigitizer digitize test/data/Ni111_NaOH_Beden1985_Fig2c.svg
[creates test/data/Ni111_NaOH_Beden1985_Fig2c.csv]
$ svgdigitizer digitize test/data/Ni111_NaOH_Beden1985_Fig2c.svg
[creates test/data/Ni111_NaOH_Beden1985_Fig2c.csv]
$ svgdigitizer paginate <pdf file>
[paginates the pdf file]

API

You can also use the svgdigitizer package directly from Python.

from svgdigitizer.svgplot import SVGPlot
filename='Ni111_NaOH_Beden1985_Fig2c.svg'
svg = SVGPlot(filename)
svg.plot()

svgdigitizer.csvcreator should contain converters for specific data. At the moment to create CV data.
Note that it is invoked with the SVG's and YAML's basename without extension.

from csvcreator import CreateCVdata
csv = CreateCVdata('Ni111_NaOH_Beden1985_Fig2c', create_csv=False)
csv.df.head()
csv.plot_CV()

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%