Skip to main content

Introduction

ehtplot is a python module that assists scientists in the Event Horizon Telescope (EHT) Collaboration to create publication quality, elegant, and consistent plots. It provides a set of easy-to-use plotting functions for EHT and Very-Long-Baseline Interferometry (VLBI) specific figures (see the documentation of the Figure class). This includes plotting visibility and images for both synthetic and real data, adding uv-tracks to the plots, adding the expected event horizon size to the plots, etc.

Special Features

Hierarchically Panels

By introducing a logical layer to hierarchically organize subplots and manage subplot properties, ehtplot is capable to combining many simple plots in a complex figure (see the documentation of the Panel class). For example, the following code place multiple figures side-by-side:

import ehtplot as ep
fig = ep.Figure(ep.Panel(image="1.fits"),
                ep.Panel(image="2.fits"),
                ep.Panel(image="3.fits"),
                ep.Panel(image="4.fits"))
fig.show()

This feature can help generating comparative plots for the EHT Imaging Challenge.

Multiple Themes Rendering

In a typical scientific workflow, a publication quality plot often goes to multiple places, which may have very different typesetting and coloring requirements. For example, a plot first needs to be rendered clearly and accurately onscreen; then, when exported into vector graphic formats for publications, the lines need to be visible, the font sizes of labels should match the caption font size, etc; finally, important plots also go into talks, where larger fonts and wider lines are usually preferred; in addition, slides come with different theme—dark and light backgrounds—which may require changing the color theme in a plot. In order to make creating these multi-style-multi-destination figures easy, ehtplot is theme based (see the documentation in "ehtplot/theme.py"). After creating a plot, its presentation and rendering depend on the user selected targeted outputs.

fig.save("figure.eps")
fig.save("figure-seaborn.eps", style="seaborn")
fig.save("figure-talk-dark.png", format="talk", theme="dark")

It is straightforward to enable ehtplot's theme even without using ehtplot for plotting. One simply loads the theme submodule:

import ehtplot.theme

and all ehtplot theme will be registered to matplotlib.

Perceptually Uniform Colormap

We also spent a lot of time to create perceptually uniform colormaps based on the CAM02-UCS color appearance model. For more information, see ehtplot's color submodule documentation.

It is also straightforward to enable ehtplot's colormaps even without using ehtplot for plotting. One simply loads the color submodule:

import ehtplot.color

and all ehtplot colormaps will be registered to matplotlib.

Related Links

Metadata

Release files for pyehtplot 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyehtplot 0.9.0
File Size Uploaded Provenance Actions
pyehtplot-0.9.0.tar.gz 468.8 kB Without provenance Details for pyehtplot-0.9.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyehtplot 0.9.0
File Interpreter ABI Platform Actions
pyehtplot-0.9.0-py3-none-any.whl Python 3 none any Details for pyehtplot-0.9.0-py3-none-any.whl

Total release size: 1.1 MB

Release files / pyehtplot-0.9.0.tar.gz

Download URL pyehtplot-0.9.0.tar.gz
Size 468.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0cfe56d7bee584e0ad7e7538740b2566fb1affb18c4af3596faf22e55236da0c
BLAKE2b-256 checksum
How to use checksums
97948807451f54f2cc6b5ec7968c71d64898b6fabb957ccb0554b80661cb726e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.5

Release files / pyehtplot-0.9.0-py3-none-any.whl

Download URL pyehtplot-0.9.0-py3-none-any.whl
Size 591.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b6b8af1b486723013f49a65577410bb0e1c1eee1a0bdd9e96b7b640afd3717fa
BLAKE2b-256 checksum
How to use checksums
98e6bccc881c3fbfc1572573e06ac60c4503e54b26565691b293062cc162d23a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.5

Security for pyehtplot 0.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page