Étiquetage automatique de données
ListPlot et les fonctions connexes prennent désormais en charge LabelingFunction.
Afficher l'entrée complète de Wolfram Language
Lorsque les métadonnées appropriées sont présentes, LabelingFunction les utilise automatiquement comme des étiquettes.
In[2]:=
![Click for copyable input](assets.fr/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.fr/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.fr/auto-labeling-data/O_28.png)
Utilisez Callout dans LabelingFunction.
In[4]:=
![Click for copyable input](assets.fr/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.fr/auto-labeling-data/O_29.png)
Placez les étiquettes au centre de l'endroit où se trouvent les données.
In[5]:=
![Click for copyable input](assets.fr/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.fr/auto-labeling-data/In_34.png)
SeedRandom[4]; DateListStepPlot[
RandomReal[{0, 0.3}, 12] -> months, {2000, 1},
LabelingFunction -> Center, opts]
Out[6]=
![](assets.fr/auto-labeling-data/O_30.png)