1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
import plotly.express as px import pandas as pd
df = pd.DataFrame([ dict(Satellite="GEOSAT", Start='1985-3-1', Finish='1989-12-1',Country="USA"), dict(Satellite="ERS-1", Start='1991-7-1', Finish='1995-6-1',Country="EU"), dict(Satellite="TP", Start='1992-8-11', Finish='2005-12-31',Country="USA-FR"), dict(Satellite="ERS-2", Start='1995-4-1', Finish='2002-6-1',Country="EU"), dict(Satellite="GFO", Start='1998-5-1', Finish='2008-9-1',Country="USA"), dict(Satellite="Jason-2", Start='2001-11-1', Finish='2013-7-1',Country="USA-FR"), dict(Satellite="ENVISAT", Start='2002-3-1', Finish='2012-4-1',Country="EU"), dict(Satellite="Icesat-1", Start='2003-1-1', Finish='2010-2-1',Country="USA"), dict(Satellite="Jason-2", Start='2008-6-1', Finish='2019-10-1',Country="USA-FR"), dict(Satellite="Cryosat-2", Start='2010-4-1', Finish='2024-4-1',Country="EU"), dict(Satellite="HY-2A", Start='2011-8-1', Finish='2020-4-1',Country="CN"), dict(Satellite="Saral", Start='2013-2-1', Finish='2022-12-31',Country="IN-FR"), dict(Satellite="Sentinel-3A", Start='2016-2-1', Finish='2023-4-1',Country="EU"), dict(Satellite="Jason-3", Start='2016-1-1', Finish='2022-4-1',Country="USA-FR"), dict(Satellite="Sentinel-3B", Start='2018-4-1', Finish='2025-4-1',Country="EU"), dict(Satellite="Sentinel-3C", Start='2024-4-1', Finish='2031-4-1',Country="EU"), dict(Satellite="Sentinel-3D", Start='2028-4-1', Finish='2035-4-1',Country="EU"), dict(Satellite="Icesat-2", Start='2018-9-1', Finish='2023-1-1',Country="USA"), dict(Satellite="HY-2B", Start='2018-10-1', Finish='2023-4-1',Country="CN"), dict(Satellite="HY-2C", Start='2020-9-1', Finish='2025-4-1',Country="CN"), dict(Satellite="Sentinel-6 Michael Freilich", Start='2020-11-1', Finish='2027-1-1',Country="USA-FR"), dict(Satellite="HY-2D", Start='2021-5-1', Finish='2026-4-1',Country="CN"), dict(Satellite="HY-2E", Start='2022-5-1', Finish='2027-4-1',Country="CN"), dict(Satellite="HY-2F", Start='2023-5-1', Finish='2028-4-1',Country="CN"), dict(Satellite="HY-2G", Start='2024-5-1', Finish='2029-4-1',Country="CN"), dict(Satellite="HY-2H", Start='2025-5-1', Finish='2030-4-1',Country="CN"), dict(Satellite="SWOT", Start='2022-5-1', Finish='2026-4-1',Country="USA-FR"), dict(Satellite="Sentinel-6B", Start='2025-1-1', Finish='2032-1-1',Country="USA-FR"), dict(Satellite="COMPIRA", Start='2022-10-1', Finish='2026-1-1',Country="JP"), ])
fig = px.timeline(df, x_start="Start", x_end="Finish", y="Satellite", color = "Country",text ="Satellite",width=1000,height=800) fig.update_yaxes(autorange="reversed") fig.update_layout(showlegend=True,legend_x=0.89,legend_y=0.99) fig.update_yaxes(title_text="Satellite") fig.update_xaxes(title_text="Time")
fig.add_vline(x='2022-7-1',line_color="black",line_dash="dot",opacity=0.5)
fig.add_vrect(x0='2022-7-1', x1='2038-1-1',line_color="green",fillcolor="red", opacity=0.2, annotation_text="", annotation_position="bottom left", annotation=dict(font_size=20, font_family="Times New Roman"))
fig.update_xaxes(showgrid=True, gridwidth=1, gridcolor='LightPink') fig.update_yaxes(nticks=30) fig.update_yaxes(showgrid=False,showticklabels=False) fig.show()
fig.write_image("fig_sat.pdf") fig.write_image("fig_sat.png")
|