• Quickstart
    • Installation
    • Using With Docker
    • 5 Minutes to PyhDToolkit
      • Cpymadtools
      • Plotting
      • Utilities
      • Additional Helpers
  • Gallery
    • Machine Survey
    • Tune Diagram
    • LHC Crossing Schemes
    • Accelerator Aperture
    • Segment-by-Segment Results
    • LHC IR Errors Assignments
    • Free Tracking Spectrum
    • Accelerator Lattice
    • AC Dipole Driven Tracking Spectrum
    • Phase Space
    • Beam Enveloppe
    • Distributions Fitting
    • Quick LHC Setup
      • Preparing the LHC setups
      • As a context manager
    • LHC Rigid Waist Shift
      • Showcasing the Waist Shift
      • Determining the Waist Shift
      • Seeing the effect through values of the knob
  • API Reference
    • Cpymadtools
      • Useful Constants
      • Betatron Coupling Utilities
      • LHC-Specific Utilities
      • Matching Routines
      • Beam Parameters
      • PTC Routines
      • Tracking Routines
      • Tune Utilities
      • TWISS Routines
      • Miscellaneous Utilities
    • Maths
      • Stats Fitting
      • Utilities
    • Models
      • Particle Beam Models
      • HTCondor Models
      • MAD-X Models
    • Optics
      • Beam Optics
      • Resonance Driving Terms Utilities
      • Ripken Parameters
      • Twiss Optics
    • Plotting
      • Plotting Styles
      • Paper Styles
      • Thesis Styles
      • Aperture Plotters
      • Crossing Scheme Plotters
      • Beam Enveloppe Plotters
      • Lattice Plotters
      • Layout Plotters
      • Phase Space Plotters
      • Tune Diagram Plotters
      • Segment-by-Segment Coupling
      • Segment-by-Segment Phase
      • Plotting Utility Functions
    • Utils
      • Command Line Utilities
      • Decorator Utilities
      • Context Utilities
      • HTCondor Monitoring
      • Logging Utilities
  • Contributing
    • Asking for Help
    • Bug Reports
    • Enhancement Proposals
    • Contributing Code and/or Documentation
      • Forking the Repository
      • Creating a Development Environment
      • Creating a Branch
      • Running the Test Suite
      • Code Standards
      • Documentation
  • Release Notes
    • Version 1.7.0
      • 1.7.0
    • Version 1.6.0
      • 1.6.0
    • Version 1.5.0
      • 1.5.0
    • Version 1.4.0
      • 1.4.0
    • Version 1.3.2
      • 1.3.2
    • Version 1.3.1
      • 1.3.1
    • Version 1.3.0
      • 1.3.0
    • Version 1.2.0
      • 1.2.0
    • Version 1.1.1
      • 1.1.1
    • Version 1.1.0
      • 1.1.0
    • Version 1.0.0
      • 1.0.0
    • Version 0.21.0
      • 0.21.0
    • Version 0.20.1
      • 0.20.1
    • Version 0.20.0
      • 0.20.0
    • Version 0.19.1
      • 0.19.1
    • Version 0.19.0
      • 0.19.0
    • Version 0.18.0
      • 0.18.0
    • Version 0.17.0
      • 0.17.0
    • Version 0.16.1
      • 0.16.1
    • Version 0.16.0
      • 0.16.0
    • Version 0.15.1
      • 0.15.1
    • Version 0.15.0
      • 0.15.0
    • Version 0.14.1
      • 0.14.1
    • Version 0.14.0
      • 0.14.0
    • Version 0.13.3
      • 0.13.3
    • Version 0.13.2
      • 0.13.2
    • Version 0.13.1
      • 0.13.1
    • Version 0.13.0
      • 0.13.0
    • Version 0.12.0
      • 0.12.0
    • Version 0.11.0
      • 0.11.0
    • Version 0.10.0
      • 0.10.0
    • Version 0.9.2
      • 0.9.2
    • Version 0.9.1
      • 0.9.1
    • Version 0.9.0
      • 0.9.0
    • Version 0.8.5
      • 0.8.5
    • Version 0.8.4
      • 0.8.4
    • Version 0.8.3
      • 0.8.3
    • Version 0.8.2
      • 0.8.2
    • Version 0.8.1
      • 0.8.1
    • Version 0.8.0
      • 0.8.0
    • Version 0.7.0
      • 0.7.0
    • Version 0.6.0
      • 0.6.0
    • Version 0.5.0
      • 0.5.0
    • Version 0.4.1
      • 0.4.1
    • Version 0.4.0
      • 0.4.0
    • Version 0.3.0
      • 0.3.0
    • Version 0.2.1
      • 0.2.1
    • Version 0.2.0
      • 0.2.0
  • Reference bibliography
PyhDToolkit
  • Gallery
  • Edit on GitHub

Gallery

This page contains a gallery showcasing either plotting functionality provided in the pyhdtoolkit.plotting submodules, or plots made from results of convenient functions available in pyhdtoolkit.

Important

The examples shown here are plotted with a customized but simple rcParams style, simply for visibility in these galleries. If one uses this package and sets their own preferences or uses their own mplstyle, the resulting plots might look significantly different.

The package provides several plotting styles in the styles submodules, which are tailored for good rendering in my LaTeX documents and are made for good compatibility with the various plotters in plotting. These styles are described in the styles documentation section.

One can use them in two ways, shown below with as example the MEDIUM style defined in pyhdtoolkit.plotting.styles.thesis.

Update the rcParams at runtime with:

from matplotlib import pyplot as plt
from pyhdtoolkit.plotting.styles.thesis import MEDIUM

plt.rcParams.update(MEDIUM)
# plotting code here

Or, for a temporary update of the rcParams:

from matplotlib import pyplot as plt
from pyhdtoolkit.plotting.styles.thesis import MEDIUM

with plt.rc_context(MEDIUM):
    # Plotting code here

Do a one-time install of the styles as .mplstyle files to use in matplotlib:

from matplotlib import pyplot as plt
from pyhdtoolkit.plotting.styles import install_mpl_styles

install_mpl_styles()  # only run this once
plt.style.use("thesis-medium")  # loaded from created file 'thesis-medium.mplstyle'

In both cases, re-updating the rcParams later on will always overwrite these settings.

Click on any image thumbnail to see the corresponding gallery page with full images and access to the source code.

Machine Survey

Machine Survey

Tune Diagram

Tune Diagram

LHC Crossing Schemes

LHC Crossing Schemes

Accelerator Aperture

Accelerator Aperture

Segment-by-Segment Results

Segment-by-Segment Results

LHC IR Errors Assignments

LHC IR Errors Assignments

Free Tracking Spectrum

Free Tracking Spectrum

Accelerator Lattice

Accelerator Lattice

AC Dipole Driven Tracking Spectrum

AC Dipole Driven Tracking Spectrum

Phase Space

Phase Space

Beam Enveloppe

Beam Enveloppe

Distributions Fitting

Distributions Fitting

Quick LHC Setup

Quick LHC Setup

LHC Rigid Waist Shift

LHC Rigid Waist Shift

Download all examples in Python source code: gallery_python.zip

Download all examples in Jupyter notebooks: gallery_jupyter.zip

Gallery generated by Sphinx-Gallery

Previous Next

© Copyright 2019, Felix Soubelet.

Built with Sphinx using a theme provided by Read the Docs.