Create simple timeline plots with flexible control of the output styles based on different attributes.
To make your own plots, clone this repo and edit this notebook. The required packages are: pandas, matplotlib, numpy.
To add or correct a project description in this repo, please create an issue or make a pull request.
The repo README.md is generated automatically from this file using:
jupyter nbconvert --to markdown README.ipynb
%matplotlib inlinefrom bluebox.io import load
from bluebox.plot import Style, timelineA group of items are described in a text file, e.g.
!head -5 CMB.txt name | start | duration | location | method | status | ramp_up | ramp_down | row
PLANCK | 2009.5 | 4.3 | Space | Microwave | Approved | | |
SPIDER-2 | 2021.9 | 0.2 | Balloon | Microwave | Approved | | |
BFORE | 2025.9 | 0.2 | Balloon | Microwave | Proposed | | |
LiteBIRD | 2027.0 | 3.0 | Space | Microwave | Approved | | |
Load these text files as pandas dataframes:
CMB = load("CMB.txt")
LSS = load("LSS.txt")Draw a timeline with fill color based on the instrumentation method and edgecolor and alpha based on approval status:
timeline(
CMB, LSS,
fillcolor=Style('method', Spectro='yellowgreen', Imaging='yellowgreen', Microwave='cyan'),
edgestyle=Style('status', Approved='-', Proposed='--'),
alpha=Style('status', Approved=1, Proposed=0.5),
)Change the fillcolor to indicate location:
timeline(
CMB, LSS,
fillcolor=Style('location', Atacama='tan', Pole='tan', Ground='tan', Space='lightslategray', Balloon='lightslategray'),
edgestyle=Style('status', Approved='-', Proposed='--'),
alpha=Style('status', Approved=1, Proposed=0.5)
)Isolate the CMB projects and split CMB-S4 to show it dual locations. Use more vertical space with item_height and item_space:
timeline(
CMB,
item_height=0.5, item_space=0.1,
fillcolor=Style('location', Atacama='goldenrod', Pole='powderblue', Space='lightslategray', Balloon='lightslategray', split=True),
)Isolate the LSS projects and split Euclid and Roman to show their hybrid instrumentation. Remove the vertical red line with now=None:
timeline(
LSS,
item_height=0.5, item_space=0.1, now=None,
fillcolor=Style('method', Imaging='cyan', Spectro='gold', legend='color', split=True),
)


