kids encyclopedia robot

Image: Confirmed exoplanets by methods EPE

Kids Encyclopedia Facts
Original image(SVG file, nominally 1,350 × 900 pixels, file size: 91 KB)

Description: Bar chart of exoplanets by their discovery dates and methods.   Direct imaging   Microlensing   Transit   Radial velocity   Timing Basic chart: Confirmed exoplanets EPE.svg iThe source code of this SVG is valid.  This plot was created with Matplotlib by betseg: Python import pandas as pd import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl yrange = range(1988, 2021) df = pd.read_csv("exoplanet.eu_catalog.csv", usecols = ["planet_status", "discovered", "detection_type"]) conf = df.query("""planet_status  != "unconfirmed" \ & discovered  != "NaN" \ & detection_type != "Controversial" \ & detection_type != "Default" """) \ .drop(columns = "planet_status") \ .replace("Astrometry", "Radial Velocity") \ .replace("TTV", "Timing") # different names for the same methods gb = conf.groupby(["discovered", "detection_type"]) methods = sorted(list(set([i[0][1] for i in gb]))) data = {(int(i[0][0]), i[0][1]): int(i[1].size / 2) for i in gb} df = pd.concat([ pd.DataFrame( yr, data.get((yr, mt), 0)) for yr in yrange for mt in methods ], ignore_index = True) npa = df.to_numpy() # thanks stackoverflow answer #43094244 npa = np.array(np.split( npa[:, 1], np.cumsum(np.unique(npa[:, 0], return_counts=True)[1])[:-1] )) sums = zip(yrange, [sum(i) for i in npa]) npa = npa.transpose() mpl.rcParams['text.color'] = 'darkgrey' mpl.rcParams['xtick.color'] = 'grey' mpl.rcParams['ytick.color'] = 'grey' fig = plt.figure(figsize=(15, 10), constrained_layout=True) ax = fig.add_subplot() for i in range(len(npa)): plt.bar(yrange, npa[i], 0.95, bottom = sum(npa[:i])) for i in sums: ax.annotate(str(i[1]), (i[0], 1530), va="center", ha="center") plt.box(False) ax.grid(axis='y', alpha=.5, ls=':') ax.tick_params(left=False, bottom=False, labelright=True) plt.xticks(yrange) plt.yticks(np.arange(0, 1600, 50)) plt.savefig("Confirmed exoplanets by methods EPE.svg")
Title: Confirmed exoplanets by methods EPE
Credit: Own work
Author: Betseg
Usage Terms: Creative Commons Attribution-Share Alike 4.0
License: CC BY-SA 4.0
License Link: https://creativecommons.org/licenses/by-sa/4.0
Attribution Required?: Yes

The following 2 pages link to this image:

kids search engine