scifig
Software to compose figures for scientific articles
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.2%) to scientific vocabulary
Repository
Software to compose figures for scientific articles
Basic Info
- Host: GitHub
- Owner: humbertolvarona
- License: mit
- Language: Python
- Default Branch: main
- Size: 29.9 MB
Statistics
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
SciFig
Software to compose figures for scientific articles
DOI
Date-released
Version
License
Programming language
OS
Requirements
```shell
pip install Pillow
pip install pytest-warnings
```
Installation
python
from PIL import Image
import os
import warnings
Function list
- removewhiteborders > Remove white borders around a figure
- increaseimageborder > Create a border around the image of a specific color
- split_image > Divide a figure into equal parts. The number of parts must be even.
- unify_images > Unify several figures that are ordered in a directory by specifying the number of rows and columns. The unified parts will be from left to right and from top to bottom.
- compress_image > Compress an image
- converttoPDF_image > Convert an image to PDF
Usage examples
Function increaseimageborder
```python inputimagepath = "./test/fig1.jpeg" outputimagepath = "./test/new_fig2.jpeg"
bordercolor = (0, 0, 255) borderwidth = 150 increaseimageborder(inputimagepath, outputimagepath, bordercolor, borderwidth) ```
Function removewhiteborders
python
input_image_path = "./test/fig1.jpeg"
output_image_path = "./test/newtest_fig.jpeg"
remove_white_borders(input_image_path, output_image_path)
Function split_image
python
output_directory = "./test/parts/"
num_parts = 4
split_image(input_image_path, output_directory, num_parts)
|
01part.jpeg
<img src="/figures/parts/01 part.jpeg" width="300"> |
02part.jpeg
<img src="/figures/parts/02 part.jpeg" width="300"> |
|---|---|
|
03part.jpeg
<img src="/figures/parts/03 part.jpeg" width="300"> |
04part.jpeg
<img src="/figures/parts/02 part.jpeg" width="300"> |
Function unify_images
```python tile_size = (4, 1)
directorypath = "./test/parts/" outputimagename = "./test/unifiedimage.jpeg"
unifyimages(directorypath, outputimagename, tile_size) ```
```python tile_size = (3, 2)
directorypath = "./test/parts/" outputimagename = "./test/unifiedimage.jpeg"
unifyimages(directorypath, outputimagename, tile_size) ```
```python tile_size = (1, 4)
directorypath = "./test/parts/" outputimagename = "./test/unifiedimage.jpeg"
unifyimages(directorypath, outputimagename, tile_size) ```
Function compress_image
python
input_image_path = "./test/fig1.png"
compress_image(input_image_path, quality=50)
Function converttoPDF_image
python
input_image_path = "./test/fig1.jpeg"
output_path = "./test/fig1.pdf"
converttoPDF_image(input_image_path, output_path)
Owner
- Name: Humberto L. Varona
- Login: humbertolvarona
- Kind: user
- Location: Brazil
- Repositories: 2
- Profile: https://github.com/humbertolvarona
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: >-
Software to compose figures for scientific articles (SciFig)
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- family-names: Varona
given-names: Humberto L.
email: humberto.varona@gmail.com
affiliation: >-
Department of Oceanography. Federal University
of Pernambuco. Recife-PE. Brazil
orcid: 'https://orcid.org/0000-0001-7405-4827'
repository-code: 'https://doi.org/10.5281/zenodo.7951495'
abstract: >-
Software to compose figures for scientific articles.
keywords:
- Scientific articles
- Figures
license: MIT
version: '1.0'
date-released: '2023-01-05'
