Skip to main content
edited body
Source Link

I have used ListLinePlot to generate this grid of plots:

enter image description here

and I want to add a legend in Row Layout below this grid. My code, has as follows:

graphs = Table[
   ListLinePlot[
    Table[Transpose@{vdd, power[[i, j, All]]}, {j, 1, Wl}],
    PlotLabel -> "T=" <> ToString[T[[i]]] <> "\[Degree]C",
    Frame -> {{True, False}, {True, False}},
    FrameLabel -> {"\!\(\*SubscriptBox[\(V\), \(DD\)]\)(V)","P(nW)"},
    AspectRatio -> 1/GoldenRatio,
    ImageSize -> Medium
    ],
   {i, 1, Tl}];
a = {graphs[[1 ;; 3]], graphs[[4 ;; 6]]};
grid = GraphicsGrid[a, Spacings -> Scaled[0], 
   AspectRatio -> 0.6/GoldenRatio];

where vdd[[...]], W[[...]], T[[...]],power[[...,...,...]] are lists with the measured values and each colored curve in the above plots, corresponds for a different (but known) value of W.

I was thinking to use

Column[{grid, 
  LineLegend[{...colors...}, Table[ToString[W[[n]]]<>"nm",{n,1,Wl}], 
   LegendLayout -> "Row"]}]

but I cannot generate the default colour pallete, which Mathematica uses. Also., I need the legend to be justified to the center (presentation purposes, as you can see).

Any help please?

I have used ListLinePlot to generate this grid of plots:

enter image description here

and I want to add a legend in Row Layout below this grid. My code, has as follows:

graphs = Table[
   ListLinePlot[
    Table[Transpose@{vdd, power[[i, j, All]]}, {j, 1, Wl}],
    PlotLabel -> "T=" <> ToString[T[[i]]] <> "\[Degree]C",
    Frame -> {{True, False}, {True, False}},
    FrameLabel -> {"\!\(\*SubscriptBox[\(V\), \(DD\)]\)(V)","P(nW)"},
    AspectRatio -> 1/GoldenRatio,
    ImageSize -> Medium
    ],
   {i, 1, Tl}];
a = {graphs[[1 ;; 3]], graphs[[4 ;; 6]]};
grid = GraphicsGrid[a, Spacings -> Scaled[0], 
   AspectRatio -> 0.6/GoldenRatio];

where vdd[[...]], W[[...]], T[[...]],power[[...,...,...]] are lists with the measured values and each colored curve in the above plots, corresponds for a different (but known) value of W.

I was thinking to use

Column[{grid, 
  LineLegend[{...colors...}, Table[ToString[W[[n]]]<>"nm",{n,1,Wl}], 
   LegendLayout -> "Row"]}]

but I cannot generate the default colour pallete, which Mathematica uses. Also. I need the legend to be justified to the center (presentation purposes, as you can see).

Any help please?

I have used ListLinePlot to generate this grid of plots:

enter image description here

and I want to add a legend in Row Layout below this grid. My code, has as follows:

graphs = Table[
   ListLinePlot[
    Table[Transpose@{vdd, power[[i, j, All]]}, {j, 1, Wl}],
    PlotLabel -> "T=" <> ToString[T[[i]]] <> "\[Degree]C",
    Frame -> {{True, False}, {True, False}},
    FrameLabel -> {"\!\(\*SubscriptBox[\(V\), \(DD\)]\)(V)","P(nW)"},
    AspectRatio -> 1/GoldenRatio,
    ImageSize -> Medium
    ],
   {i, 1, Tl}];
a = {graphs[[1 ;; 3]], graphs[[4 ;; 6]]};
grid = GraphicsGrid[a, Spacings -> Scaled[0], 
   AspectRatio -> 0.6/GoldenRatio];

where vdd[[...]], W[[...]], T[[...]],power[[...,...,...]] are lists with the measured values and each colored curve in the above plots, corresponds for a different (but known) value of W.

I was thinking to use

Column[{grid, 
  LineLegend[{...colors...}, Table[ToString[W[[n]]]<>"nm",{n,1,Wl}], 
   LegendLayout -> "Row"]}]

but I cannot generate the default colour pallete, which Mathematica uses. Also, I need the legend to be justified to the center (presentation purposes, as you can see).

Any help please?

Source Link

Another one problem with legends on GraphicsGrid

I have used ListLinePlot to generate this grid of plots:

enter image description here

and I want to add a legend in Row Layout below this grid. My code, has as follows:

graphs = Table[
   ListLinePlot[
    Table[Transpose@{vdd, power[[i, j, All]]}, {j, 1, Wl}],
    PlotLabel -> "T=" <> ToString[T[[i]]] <> "\[Degree]C",
    Frame -> {{True, False}, {True, False}},
    FrameLabel -> {"\!\(\*SubscriptBox[\(V\), \(DD\)]\)(V)","P(nW)"},
    AspectRatio -> 1/GoldenRatio,
    ImageSize -> Medium
    ],
   {i, 1, Tl}];
a = {graphs[[1 ;; 3]], graphs[[4 ;; 6]]};
grid = GraphicsGrid[a, Spacings -> Scaled[0], 
   AspectRatio -> 0.6/GoldenRatio];

where vdd[[...]], W[[...]], T[[...]],power[[...,...,...]] are lists with the measured values and each colored curve in the above plots, corresponds for a different (but known) value of W.

I was thinking to use

Column[{grid, 
  LineLegend[{...colors...}, Table[ToString[W[[n]]]<>"nm",{n,1,Wl}], 
   LegendLayout -> "Row"]}]

but I cannot generate the default colour pallete, which Mathematica uses. Also. I need the legend to be justified to the center (presentation purposes, as you can see).

Any help please?