Skip to main content

PyFigures will assist you assemble publication ready scientific figures in no time.

Project description

PyFigures

Effortless creation of high-quality scientific figures in Python.

Watch the video

Since a video is better than a thousand (click on the image above to view the demo). Or click here to access the complete demo playlist.

Note: Most demo images are public domain and sourced from the Cell Image Library.

Installation

1. Conda Installation (Advanced Users)

For advanced users, we recommend installing the software using Conda. This will offer unlimited scripting capabilities.

Prerequisites

  • Install Miniconda if it is not already installed on your system.

Installation Steps

Perform the following steps only once to set up your environment:

  1. Open a Command Prompt or Terminal.

    • To open a command prompt on Windows, press Windows+R then type cmd.
    • To open a command prompt on MacOS, press Command+Space then type Terminal.
    • To open a command prompt on Ubuntu, press Ctrl+Alt+T.
  2. Create and activate a new Conda environment:

    conda create -y -n PyFigures python==3.10.12
    conda activate PyFigures
    
  3. Upgrade pip:

    pip install -U pip
    
  4. Install the pyfigures package:

    pip install -U pyfigures
    
  5. Optional: Install openjdk8 if you plan to use bioformats

    pip install install-jdk
    python -c "import os; import jdk; jdk_path = os.path.join(os.path.expanduser('~'), '.jdk/jdk8'); jre_path = os.path.join(os.path.expanduser('~'), '.jre/jdk8'); os.makedirs(jdk_path, exist_ok=True); os.makedirs(jre_path, exist_ok=True); jdk.install('8', path=jdk_path); jdk.install('8', path=jre_path, jre=True)"
    
  6. Optional: Install additional dependencies for bioformats support:

    pip install -U pyfigures[all]
    

    Note: if you received errors, you may not have a compiler installed (see the Troubleshooting section after)

Run

Note: The following steps need to be performed only after the software has been installed.

Open a command prompt and type:

conda activate PyFigures
python -m pyfigures

Optional: After running the software, you may deactivate the Conda environment if you wish:

conda deactivate

2. Standalone Executable Installation (Easy)

Alternatively, you can install the software as a standalone executable. This does not require Conda and can be run on any system without the need for additional dependencies, but scripting capabilities will be limited to the bundled dependencies.

  • Windows coming soon!
  • MacOS coming soon!
  • Linux coming soon!

Troubleshooting Installation Issues

If you encounter issues related to installing the python-javabridge package, follow these steps:

  1. Prerequisites for All Systems Before installing python-javabridge, ensure the following:

    • Ensure a C Compiler is Available:

      • The package requires a C compiler to build C extensions. Depending on your operating system, this will be different.
  2. Windows-Specific Instructions

    If you are on Windows and encounter the error Microsoft Visual C++ 14.0 or greater is required, follow these steps to resolve it:

    • Download the Build Tools:

    • Run the installer.

      • During the installation process, select the "Desktop development with C++" workload.
    • Verify Installation:

      • Open a command prompt and run 'cl'. If the command is recognized and provides output, the installation was successful.
    • Retry Installation:

      • After installing the build tools, try to install the python-javabridge package again:

        pip install python-javabridge
        
  3. MacOS and Linux

    For MacOS and Linux systems, ensure you have the necessary build tools:

    • MacOS:

      Install Xcode Command Line Tools by running:

      xcode-select --install
      
    • Linux:

      Install build-essential (on Debian-based systems) or the equivalent development tools package for your distribution. For example, on Ubuntu, you can run:

      sudo apt-get install build-essential
      

    After ensuring that a suitable compiler is available, retry the installation:

    pip install python-javabridge
    

    By following these steps, you should be able to resolve issues and successfully install python-javabridge. If you continue to experience problems, consult the relevant documentation or seek support from the community

Third party libraries

Below is a list of the 3rd party libraries used by PyFigures.

IMPORTANTLY: if you disagree with any license below, please uninstall PyFigures.

Library name Use Link License
Markdown Python implementation of Markdown https://pypi.org/project/Markdown/ BSD
matplotlib Plots images and graphs https://pypi.org/project/matplotlib/ PSF
numpy Array/Image computing https://pypi.org/project/numpy/ BSD
Pillow Reads 'basic' images (.bmp, .png, .pnm, ...) https://pypi.org/project/Pillow/ HPND
PyQt6 Graphical user interface (GUI) https://pypi.org/project/PyQt6/ GPL v3
QtPy An abstraction layer for PyQt and PySide https://pypi.org/project/QtPy/ MIT
read-lif Reads Leica .lif files https://pypi.org/project/read-lif/ GPL v3
czifile Reads Zeiss .czi files https://pypi.org/project/czifile/ BSD (BSD-3-Clause)
tifffile Reads .tiff files (also reads Zeiss .lsm files) https://pypi.org/project/tifffile/ BSD
python-bioformats A library to open scientific images https://pypi.org/project/python-bioformats/ GPLv2
python-javabridge A library to run java executables (required for bioformats) https://pypi.org/project/python-javabridge/ BSD
scikit-image Image processing https://pypi.org/project/scikit-image/ BSD (Modified BSD)
scipy Great library to work with numpy arrays https://pypi.org/project/scipy/ BSD
scikit-learn Great library for machine learning https://pypi.org/project/scikit-learn/ BSD
tqdm Command line progress https://pypi.org/project/tqdm/ MIT, MPL 2.0
natsort 'Human' like sorting of strings https://pypi.org/project/natsort/ MIT
numexpr Speeds up image math https://pypi.org/project/numexpr/ MIT
urllib3 Model architecture and trained models download https://pypi.org/project/urllib3/ MIT
qtawesome Elegant icons for PyQT/PySide https://pypi.org/project/QtAwesome/ MIT
pandas Data analysis toolkit https://pypi.org/project/pandas/ BSD (BSD-3-Clause)
numba GPU acceleration of numpy ops https://pypi.org/project/numba/ BSD
roifile A library to read ImageJ ROIs https://pypi.org/project/roifile/ BSD 3-Clause

Other Figure-Making Software

FigureJ

ScientiFig

omero.figure

EzFig

QuickFigures

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyfigures-0.1.10.tar.gz (152.9 kB view details)

Uploaded Source

Built Distribution

pyfigures-0.1.10-py3-none-any.whl (160.9 kB view details)

Uploaded Python 3

File details

Details for the file pyfigures-0.1.10.tar.gz.

File metadata

  • Download URL: pyfigures-0.1.10.tar.gz
  • Upload date:
  • Size: 152.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for pyfigures-0.1.10.tar.gz
Algorithm Hash digest
SHA256 ebaf5d2cc9d4c00fd277f28125d1f0e6c2cbd50d9c50946ed3549030d4470fa9
MD5 fb3c1d88f97e9ab8e40ccba58991e780
BLAKE2b-256 0659b12fa4929d7471efef1a7971edadfb14921d5f83a016660587cc719c54a5

See more details on using hashes here.

File details

Details for the file pyfigures-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: pyfigures-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 160.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for pyfigures-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 55d47966f0e8d61e0fe4b9b59816977ea178899b1be2970812dfe2ba5558bcb8
MD5 9d43ee415eebaa58f53495dcc5011ba8
BLAKE2b-256 fd4d3bd4de8961bc3edd121101853c008cb448e42ab2cf720fe8858d6de48754

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page