Wolfram Language

Visualização: legendas, escalas, exclusões

Anotações automáticas de dados

ListPlot e funções relacionadas agora dão suporte a LabelingFunction.

mostre o input completo da Wolfram Language
In[1]:=
Click for copyable input
SeedRandom[3]; data = Accumulate@Table[RandomInteger[5], 12];

Quando os metadados apropriados estão presentes, LabelingFunction utiliza-os automaticamente como anotações.

In[2]:=
Click for copyable input
months = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
In[3]:=
Click for copyable input
DateListPlot[data -> months, {2000, 1}, PlotMarkers -> {Automatic, 13}, ImageSize -> 550, Frame -> {{True, False}, {False, False}}, PlotTheme -> {"LargeLabels", "Business"}]
Out[3]=

Use Callout em LabelingFunction.

In[4]:=
Click for copyable input
DateListPlot[data -> months, {2000, 1}, LabelingFunction -> Callout[ Automatic, Automatic], PlotMarkers -> {Automatic, 13}, ImageSize -> 550, Frame -> {{True, False}, {False, False}}, PlotTheme -> {"LargeLabels", "Business"}]
Out[4]=

Coloque as anotações centradas onde os dados estão.

In[5]:=
Click for copyable input
opts = {PlotTheme -> {"LargeLabels", "Marketing"}, ImageSize -> 550, Frame -> {{True, False}, {False, False}}, PlotRangePadding -> Scaled[.05], Frame -> {{True, False}, {False, False}}};
In[6]:=
Click for copyable input
SeedRandom[4]; DateListStepPlot[ RandomReal[{0, 0.3}, 12] -> months, {2000, 1}, LabelingFunction -> Center, opts]
Out[6]=

Exemplos Relacionados

de en es fr ja ko ru