Skip to main content

A collection of tools for writing papers and creating publication-quality figures.

Project description

paper-figure-tools

Code to generate figures and tables for publication, including thread diagrams and LaTeX tables including such thread diagrams.

Installation

  1. clone this repo git clone https://github.com/SherrillGroup/paper-figure-tools.git
  2. Install locally in developer mode pip install -e paper-figure-tools

Usage

Thread tables

import cdsg_plot

cdsg_plot.qcdb_plot.flat(
    data,
    color='blue',
    view=False,
    title=f"{i}_total_error",
    xlimit=20.0,
)
merge_dats = [
    {
        "show": "a",
        "db": "HSG",
        "sys": "1",
        "data": [0.3508, 0.1234, 0.0364, 0.0731, 0.0388],
    },
    {
        "show": "b",
        "db": "HSG",
        "sys": "3",
        "data": [0.2036, -0.0736, -0.1650, -0.1380, -0.1806],
    },
    {
        "show": "c",
        "db": "S22",
        "sys": "14",
        "data": [None, -3.2144, None, None, None],
    },
    {
        "show": "d",
        "db": "S22",
        "sys": "15",
        "data": [-1.5090, -2.5263, -2.9452, -2.8633, -3.1059],
    },
    {
        "show": "e",
        "db": "S22",
        "sys": "22",
        "data": [0.3046, -0.2632, -0.5070, -0.4925, -0.6359],
    },
]

threads(
    merge_dats,
    labels=["d", "t", "dt", "q", "tq"],
    color="sapt",
    title="MP2-CPa[]z",
    mae=[0.25, 0.5, 0.5, 0.3, 1.0],
    mape=[20.1, 25, 15, 5.5, 3.6],
)

Gallery

cdsg_plot

aka (C. David Sherrill Group Plotting Tools)

import cdsg_plot
import pandas as pd
import numpy as np

df = pd.DataFrame(
    {
        "MP2": 5 * np.random.randn(1000) + 0.5,
        "HF": 5 * np.random.randn(1000) - 0.5,
        "MP2.5": 5 * np.random.randn(1000) + 0.5,
    }
)
# Only specify columns you want to plot
vals = {
    "MP2 label": "MP2",
    "HF label": "HF",
}
cdsg_plot.error_statistics.violin_plot(df, vals, ylim=[-20, 35], output_filename="example.png")

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

cdsg_tools-0.0.1.tar.gz (41.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cdsg_tools-0.0.1-py3-none-any.whl (43.8 kB view details)

Uploaded Python 3

File details

Details for the file cdsg_tools-0.0.1.tar.gz.

File metadata

  • Download URL: cdsg_tools-0.0.1.tar.gz
  • Upload date:
  • Size: 41.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for cdsg_tools-0.0.1.tar.gz
Algorithm Hash digest
SHA256 7f1a2579cc491ddc85e15198ce4a1af9fedb17c704bc341d79bd385a2dec0b91
MD5 c7abab2865ac0ce7e47635bfaa33b99b
BLAKE2b-256 d644b884e832b4e312982acf9d2952cc3401112cda34db71d5ad47f02f504d67

See more details on using hashes here.

File details

Details for the file cdsg_tools-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: cdsg_tools-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 43.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for cdsg_tools-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 57d541b97c8e31a723355f0c606504342fd2d6db7b133a2f10e0f9d70f7d3ed5
MD5 eee2527c73d1545936d2b293aeebe020
BLAKE2b-256 1d94309330b7b1bfca7b9534a64409f218fdf5388a0f2d3a1ce471c317989fcd

See more details on using hashes here.

Supported by

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