Hot answers tagged

7

This looks like a bug. Please report it to Wolfram Support. A simple workaround is to specify your own colour function. ArrayPlot[{{1, 0.1, 0}, {0.1, 0, 0}}, PlotLegends -> Automatic, ColorFunction -> (GrayLevel[1 - #] &)]


6

incRange = 0.020; maxRange = 0.120; BarLegend[{"Rainbow", {0, maxRange}}, Ticks -> Table[i, {i, incRange, maxRange - incRange, incRange}], TickLengths -> 25, RotateTicks -> 180, TicksStyle -> Directive[Opacity[1], White, Dashed, FontColor -> Black], LabelStyle -> {FontSize -> 12}, LegendMarkerSize -> {20, 300}]


5

I don't know about PolygonPlotMarkers` package, so I am presenting a general solution. You can always define your own Graphics as markers. For example, I use here regular polygons col = {Red, Blue, Green, Orange, Black}; marker[col_, n_] := Graphics[{col, Polygon[{Cos[2 Pi #/n], Sin[2 Pi #/n]} & /@ Range[n]]} ,...


4

You can use Legended (look at documentation to customize for your needs). Dummy data for illustrative purposes: Legended[Grid[ Partition[ Plot[{##}, {x, -1, 1}, PlotStyle -> {Red, Blue}] & /@ {{1 - x, x^2}, {2 - x, x^2 - 1}, {x, 1 - x^2}, {x + 1, 2 - x^2}}, 2]], LineLegend[{Red, Blue}, {"Condition 1", "Condition 2"}]]


4

Starting with the Szabolcs' Notebook from the comment, it is as simple as follows using Mathematica 10: << PolygonPlotMarkers` fm[name_, size_: 7] := Graphics[{EdgeForm[], PolygonMarker[name, Offset[size]]}] ListPlot[ Table[Accumulate@RandomReal[1, 10] + i, {i, 3}], PlotMarkers -> fm /@ {"Triangle", "Square", "Diamond"}, Joined -> True, ...


3

The option LegendMargins can be used to significantly reduce the spacing. This option can be added directly to LineLegend plots = Table[ Plot[x i, {x, 0, 1}, PlotStyle -> {Hue[i/11]}, PlotLegends -> LineLegend[{"Serial " <> ToString[i]}, LabelStyle -> {FontFamily -> "Times", 10}, LegendMargins -> {0, 0}], ...


2

Thank you for your post, but I now plot the Legend with a Contourplot and get the full control over all options: plotoptions = {ColorFunction -> (ColorData["Rainbow"][ Rescale[#, {0, .125}]] &), MeshFunctions -> Table[#3 &, {i, 1, Length[{0, .025, .05, .075, .1, .125}]}], Mesh -> Table[{{tick, Lighter[White, ...


1

Maybe this is helpful: myR = Range[10, 80, 10]; lp1 = ListPlot[Sqrt[Range[myR[[1]]]], PlotStyle -> Red, PlotMarkers -> "☐"]; lp2 = ListPlot[Sqrt[Range[myR[[2]]]], PlotStyle -> Blue, PlotMarkers -> "⦿"]; lp3 = ListPlot[Sqrt[Range[myR[[3]]]], PlotStyle -> Blue, PlotMarkers -> "⦿"]; lp4 = ListPlot[Sqrt[Range[myR[[4]]]], PlotStyle -> ...



Only top voted, non community-wiki answers of a minimum length are eligible