« View all new features in
Mathematica
9
◄
previous
|
next
►
New in
Mathematica
9
›
Legends
Flexible Legend Placement
In[1]:=
X
Grid[{{ContourPlot[Re[ArcCos[-x + I y]], {x, -Pi, Pi}, {y, -Pi, Pi}, Contours -> Range[0.5, 2.5, 0.25], FrameTicks -> {{-Pi, 0, Pi}, {-Pi, 0, Pi}}, ClippingStyle -> Automatic, ColorFunction -> "Rainbow", ImageSize -> 200, PlotLegends -> Placed[BarLegend[Automatic, LegendLayout -> "Row"], Above], AspectRatio -> 1, Frame -> False, PlotRangePadding -> None], ContourPlot[Re[ArcCos[-y + I x]], {x, -Pi, Pi}, {y, -Pi, Pi}, Contours -> 10, FrameTicks -> {{-Pi, 0, Pi}, {-Pi, 0, Pi}}, ClippingStyle -> Automatic, ColorFunction -> ColorData["TemperatureMap"], ImageSize -> 200, PlotLegends -> Placed[BarLegend[Automatic, LegendLayout -> "Column"], After], AspectRatio -> 1, Frame -> False, PlotRangePadding -> None]}, {ContourPlot[ Re[ArcCos[y + I x]], {x, -Pi, Pi}, {y, -Pi, Pi}, Contours -> 15, FrameTicks -> {{-Pi, 0, Pi}, {-Pi, 0, Pi}}, ClippingStyle -> Automatic, ColorFunction -> ColorData["RedGreenSplit"], ImageSize -> 200, PlotLegends -> Placed[BarLegend[Automatic, LegendLayout -> "ReversedColumn"], Before], AspectRatio -> 1, Frame -> False, PlotRangePadding -> None], ContourPlot[Re[ArcCos[x + I y]], {x, -Pi, Pi}, {y, -Pi, Pi}, Contours -> 9, FrameTicks -> {{-Pi, 0, Pi}, {-Pi, 0, Pi}}, ClippingStyle -> Automatic, ColorFunction -> ColorData["AvocadoColors"], ImageSize -> 200, PlotLegends -> Placed[BarLegend[Automatic, LegendLayout -> "ReversedRow"], Below], AspectRatio -> 1, Frame -> False, PlotRangePadding -> None]}}, Alignment -> {{Right, Left}, {Bottom, Top}}]
Control the location and orientation of legends.
Out[1]=