marferit
(margherita ferrucci)
1
Hi,
I have these command lines, but I would like to increase the font size of the Legend. How i can do?
Needs["PlotLegends`"];
ListLinePlot[cpdiff[[All, All, All]],PlotRange -> All, Frame->{{True,True},{True,True}},PlotLegend-> rapp, LegendPosition->{1,-0.4},PlotMarkers-> {Automatic,9},ImageSize->1000,
LegendShadow ->None,
FrameLabel->{{ DCp,DCp },{obstacle perimeter," \[Alpha] = 0\[Degree]"}},
RotateLabel -> False, Axes ->True,AxesStyle->Directive[Black, Thick,Dashed],
FrameStyle->Directive[Black,Thick,Bold, FontSize->20], GridLines ->{{0.5,1,1.5,2,2.5,3,3.5,4},Automatic},
GridLinesStyle -> Directive[Gray, Dashed]]
this is the graphic
Thanks
Margherita
sghuisman
(Sander Huisman)
2
Which version of Mathematica are you using? depending on the version the answer is easy or hard…
Hi Margherita,
I hope this will help. Cheers,…Jos (MM Version 10.4.0.0)
a = {10, 11, 15, 14};
b = {2, 5, 4, 6};
ListLinePlot[{a, b}
, Frame -> True
, PlotLabel -> Style["Test"]
, PlotRange -> {{1, 4}, {0, 20}}
, PlotLegends -> {"a", "b"}
, FrameLabel -> {"X-axis [n]", "Y-axis"}
, LabelStyle -> Directive[FontFamily -> "Arial", Red, FontSize -> 20]
, InterpolationOrder -> 2
]
marferit
(margherita ferrucci)
4
Hi,
Thanks a lot for your suggestions.
I have 10.2 version of Mathematica. I have tried the suggested command
Directive[FontFamily -> "Arial", Red, FontSize -> 20]
without good result.
In fact It is necessary to separate the font size of the frame and the font size of the legend, but how?
sghuisman
(Sander Huisman)
5
What did you try yourself? A simple command like:
a={10,11,15,14};
b={2,5,4,6};
ListLinePlot[{a,b},
Frame->True,
PlotLabel->Style["Test"],
PlotRange->{{1,4},{0,20}},
PlotLegends->LineLegend[{"a","b"}, LabelStyle->Directive[Blue,18]],
FrameLabel->{"X-axis [n]","Y-axis"},
LabelStyle->Directive[FontFamily->"Arial",Red,FontSize->20],
InterpolationOrder->2
]
might give you what you want? Have a look in the documentation at “guide/Legends” (without quotes).
Have you tried applying the styles to the individual labels?
ListLinePlot[{a, b}, Frame -> True,
PlotLabel ->
Style["Test", FontFamily -> "Arial", Red, FontSize -> 20],
PlotRange -> {{1, 4}, {0, 20}},
PlotLegends -> {Style["a", Blue], Style["b", 25]},
FrameLabel -> {Style["X-axis [n]", Magenta, 18], "Y-axis"},
InterpolationOrder -> 2]