https://github.com/muhammedhasan/figure_panel
https://github.com/muhammedhasan/figure_panel
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/muhammedhasan/figure_panel
- Owner: MuhammedHasan
- Created: 2023-03-02T04:29:20.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-10-18T06:22:26.000Z (over 2 years ago)
- Last Synced: 2025-04-11T18:55:39.825Z (about 1 year ago)
- Language: Python
- Size: 409 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Figure_Panel
Create figure panel for publications from svg files.
# Installation
### Creating a Python Environment
```bash
conda create -n figure_panel python=3.9 -y
```
### Activate Created Environment
```bash
conda activate figure_panel
```
### figure_panel installation
```bash
pip install git+https://github.com/MuhammedHasan/figure_panel.git
```
### Cairo-SVG and Wand installation
```bash
conda install -c conda-forge cairosvg wand -y
```
# Usage
```bash
figure_panel -f x.svg,y.svg,z.svg -o fig.pdf --width 1200 --fontsize 24
```
`-f` input svg files separated by `,` indicating figure arrange in the same row
`--width` of figure in pixels and height determined based on the aspect ratio. `--fontsize` is relative to width so need adjustment accordingly.
`-o` output format `.svg`, `.png` and `.pdf` is supported.
```bash
figure_panel -f "[x.svg,y.svg],[z.svg, k.svg]" -o fig.pdf
```
`[]` indicates row in the panel. Figures labeled based on the sequence order in the input.
```bash
figure_panel -f "[x.svg, y.svg],[z.svg, [[x.svg, y.svg], [z.svg, k.svg]]]" -o fig.pdf
```

See [examples](examples/example.ipynb) for further examples and python api.
## TODOS
- [] Add more test-cases
- [] Margin between figures
- [] Padding between figures and labels
- [] pdf input support