Wolfram Language

Unidades e datas

Visualize objetos de datas

Use TimelinePlot para visualizar durações de tempo com legendas. Faça uma lista de ganhadores do Prêmio Nobel em física.

In[1]:=
Click for copyable input
people = {Entity["Person", "AlbertEinstein::6tb7g"], Entity["Person", "RichardFeynman::qdvj4"], Entity["Person", "MarieCurie::v9f84"], Entity["Person", "MaxPlanck::73z39"], Entity["Person", "NielsBohr::8snv9"], Entity["Person", "EnricoFermi::9k57b"]};
In[2]:=
Click for copyable input
lifespan = EntityValue[people, {"BirthDate", "DeathDate"}]
Out[2]=
In[3]:=
Click for copyable input
TimelinePlot[Thread[Labeled[Interval /@ lifespan, people]]]
Out[3]=

Misture expressões de DateObject e intervalos de tempo.

mostre o input completo da Wolfram Language
In[4]:=
Click for copyable input
TimelinePlot[{{DateObject[{1921}], Labeled[Interval[{DateObject[{1879, 3, 14}], DateObject[{1955, 4, 18}]}], Entity["Person", "AlbertEinstein::6tb7g"], After]}, {DateObject[{1965}], Labeled[Interval[{DateObject[{1918, 5, 11}], DateObject[{1988, 2, 15}]}], Entity["Person", "RichardFeynman::qdvj4"], After]}, {DateObject[{1903}], Labeled[Interval[{DateObject[{1867, 11, 7}], DateObject[{1934, 7, 4}]}], Entity["Person", "MarieCurie::v9f84"], After]}, {DateObject[{1918}], Labeled[Interval[{DateObject[{1858, 4, 23}], DateObject[{1947, 10, 4}]}], Entity["Person", "MaxPlanck::73z39"], After]}, {DateObject[{1922}], Labeled[Interval[{DateObject[{1885, 10, 7}], DateObject[{1962, 11, 18}]}], Entity["Person", "NielsBohr::8snv9"], After]}, {DateObject[{1938}], Labeled[Interval[{DateObject[{1901, 9, 29}], DateObject[{1954, 11, 28}]}], Entity["Person", "EnricoFermi::9k57b"], After]}}, PlotLayout -> "Overlapped", PlotTheme -> "Web", PlotLegends -> Placed[PointLegend[{Black}, {"Year Awarded Nobel Prize"}, LegendMarkerSize -> 15], Above]]
Out[4]=

Exemplos Relacionados

de en es fr ja ko zh