udibehar
(Ehud Behar)
1
I have a couple of ListLinePlots that I create in my notebook. I want the title of each plot to appear as
Style["〈the title〉", FontSize -> 18, Black]
Doing
SetOptions[ListLinePlot,
PlotLabel -> Style["my title", FontSize -> 18, Black],
]
doesn’t seem to work. For example,
ListLinePlot[
{}
,PlotLabel -> "Plot no. 1"]
inserts the title “Plot no.1” but all the directives from SetOptions are not taken into effect. Why?
The option LabelStyle -> {FontSize -> 18, Black} does that, but unfortunately it affects tick labels too, which may be remedied with TicksStyle.
udibehar
(Ehud Behar)
3
I just tried
SetOptions[ListLinePlot,
LabelStyle -> {FontSize -> 18, Red},
TicksStyle -> {Directive[Black, 20]},
AxesStyle -> Directive[Black, 8]
];
ListLinePlot[
{}
, PlotLabel -> "Plot no. 1"]
but I I see no change in the ticks font size. Why?
Hmm, it seems that LabelStyle overrides TicksStyle. I wonder why.
As a workaround one can define a custom plot:
myPlot[data_, myTitle_, opts___] :=
ListLinePlot[data, opts,
PlotLabel -> Style[myTitle, 18, Black]]