Wolfram言語

可視化:ラベル,スケール,除外

データの自動ラベル付け

ListPlotおよび関連関数は,LabelingFunctionをサポートするようになった.

完全なWolfram言語入力を表示する
In[1]:=
Click for copyable input
SeedRandom[3]; data = Accumulate@Table[RandomInteger[5], 12];

適切なメタデータがある場合,LabelingFunctionはラベルとして自動的にこれを使う.

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]=

LabelingFunctionCalloutを使う.

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]=

データ点の上に,その点を中心にしてラベルを置く.

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]=

関連する例

de en es fr ko pt-br ru