Wolfram Language

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

Controlando legendas com anotações

Especifique os estilos de fonte para o texto da anotação.

In[1]:=
Click for copyable input
Plot[{Callout[Sin[x] + 1, "label", Above, LabelStyle -> Directive[Italic, Small, ColorData[106, 1]]], Callout[Sin[x] + 2, "label", Above, LabelStyle -> Directive[Bold, Medium, ColorData[106, 2]]], Callout[Sin[x] + 3, "label", Above, LabelStyle -> Directive[Underlined, Large, ColorData[106, 3]]]}, {x, 0, 2 Pi}, ImageSize -> 400, PlotTheme -> "Business"]
Out[1]=

Coloque um quadro em volta da leganda e especifique o tamanho da margem.

In[2]:=
Click for copyable input
Plot[{Callout[Sin[x + Pi/3], "no frame", Above], Callout[Sin[x], "frame", Above, Frame -> True], Callout[Sin[x - Pi/2], "Margins: 10", Above, Frame -> True, FrameMargins -> 10], Callout[Sin[x - 6 Pi/5], "Margins: {5, 15}", Above, Frame -> True, FrameMargins -> {5, 15}]}, {x, 0, 2 Pi}, ImageSize -> 400, PlotRange -> {-1, 2}, PlotTheme -> "Business"]
Out[2]=

Especifique o raio dos cantos do quadro.

In[3]:=
Click for copyable input
Plot[{Callout[Sin[x + Pi/4], "Radius: 0", Above, Frame -> True, FrameMargins -> 10, RoundingRadius -> 0], Callout[Sin[x - Pi/4], "Radius: 5", Above, Frame -> True, FrameMargins -> 10, RoundingRadius -> 5], Callout[Sin[x - 3 Pi/4], "Radius: 10", Above, Frame -> True, FrameMargins -> 10, RoundingRadius -> 10], Callout[Sin[x - 5 Pi/4], "Radius: 20", Above, Frame -> True, FrameMargins -> 10, RoundingRadius -> 20]}, {x, 0, 2 Pi}, ImageSize -> 400, PlotRange -> {-1, 2}, PlotTheme -> "Web"]
Out[3]=

Especifique uma cor para o fundo e para o texto.

In[4]:=
Click for copyable input
Plot[{Callout[Sin[x], Sin[x], Above, Background -> RGBColor[0.790588, 0.201176, 0], LabelStyle -> Directive[10, White]], Callout[Cos[x], Cos[x], Below, Background -> RGBColor[0.192157, 0.388235, 0.807843], LabelStyle -> Directive[10, White]]}, {x, 0, 2 Pi}, PlotTheme -> "Web"]
Out[4]=

Especifique uma cor para o quadro e para a linha de referência.

In[5]:=
Click for copyable input
ListPlot[{Callout[Table[Sin[x], {x, 0, 2 Pi, Pi/16}], Sin[x], Above, Frame -> True, CalloutStyle -> RGBColor[0.34398, 0.49112, 0.89936]], Callout[Table[.4 + Cos[x], {x, 0, 2 Pi, Pi/16}], Cos[x], Below, Frame -> True, CalloutStyle -> RGBColor[0.97, 0.606, 0.081]]}, ImageSize -> 400, PlotTheme -> "Business"]
Out[5]=

Especifique a opacidade para o fundo.

In[6]:=
Click for copyable input
ListPlot[Table[ Callout[n, ToString[n], Right, FrameMargins -> {15, 10}, Background -> Directive[RGBColor[0.34398, 0.49112, 0.89936], Opacity[n]], LabelStyle -> Directive[Bold, White]], {n, .2, 1, .2}], ImageSize -> Medium, PlotRange -> {{.5, 6.5}, {0, 1.2}}, PlotTheme -> "Business"]
Out[6]=

Anotações de fundos são semitransparentes, de forma padrão, para revelar os gráficos subjacentes.

In[7]:=
Click for copyable input
Plot[{Cos[x], Cos[x + 0.5], Cos[x + 1], Cos[x + 1.5], Callout[Cos[x + 2], "transparency", 1.75, 2.5, FrameMargins -> {10, 10}, LabelStyle -> Large]}, {x, 0, Pi}, ImageSize -> 400, PlotTheme -> "Marketing"]
Out[7]=

Exemplos Relacionados

de en es fr ja ko ru zh