Etiquetado automático de datos
ListPlot y las funciones relacionadas ahora dan soporte a LabelingFunction.
muestre la entrada completa de Wolfram Language
Cuando los metadatos apropiados están presentes, LabelingFunction los utiliza automáticamente como etiquetas.
In[2]:=
![Click for copyable input](assets.es/auto-labeling-data/In_30.png)
months = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug",
"Sep", "Oct", "Nov", "Dec"};
In[3]:=
![Click for copyable input](assets.es/auto-labeling-data/In_31.png)
DateListPlot[data -> months, {2000, 1},
PlotMarkers -> {Automatic, 13}, ImageSize -> 550,
Frame -> {{True, False}, {False, False}},
PlotTheme -> {"LargeLabels", "Business"}]
Out[3]=
![](assets.es/auto-labeling-data/O_28.png)
Use Callout en LabelingFunction.
In[4]:=
![Click for copyable input](assets.es/auto-labeling-data/In_32.png)
DateListPlot[data -> months, {2000, 1},
LabelingFunction -> Callout[ Automatic, Automatic],
PlotMarkers -> {Automatic, 13}, ImageSize -> 550,
Frame -> {{True, False}, {False, False}},
PlotTheme -> {"LargeLabels", "Business"}]
Out[4]=
![](assets.es/auto-labeling-data/O_29.png)
Coloque las etiquetas centradas donde están los datos.
In[5]:=
![Click for copyable input](assets.es/auto-labeling-data/In_33.png)
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](assets.es/auto-labeling-data/In_34.png)
SeedRandom[4]; DateListStepPlot[
RandomReal[{0, 0.3}, 12] -> months, {2000, 1},
LabelingFunction -> Center, opts]
Out[6]=
![](assets.es/auto-labeling-data/O_30.png)