I have some plots which are obtained from a long numerical integration. I have named each plot and then have tried to show them in a single plot using Show
command. Here, for the sake of simplicity I have used some simple functions as my plots as follows
p1 = Plot[x^2, {x, 0, 10}, PlotStyle -> {Black, Dashed}];
p2 = Plot[x^3, {x, 0, 10}, PlotStyle -> {Black, Dotted}];
p3 = Plot[x^4, {x, 0, 10}, PlotStyle -> {Black}];
when I use show
Show[Legended[p1,
LineLegend[{Directive[Thickness[0.006], Dashed, Black]}, {"p1"}]],
Legended[p2,
LineLegend[{Directive[Thickness[0.006], Dotted, Black]}, {"p2"}]],
Legended[p3,
LineLegend[{Directive[Thickness[0.006], Black]}, {"p3"}]]]
the following image is produced
which has ugly legends.
1: Why the length of legend line is different for solid one? and how can I equalize their lengths?
2: How can I change the vertical space of the legends? in this case I want to reduce them.
3: How can I change the position of all legends (as a whole) with respect to the plot? for example top or bottom of the plot?
Legended[Show[{p1,p2,p3}], LineLegend[{...}, {...}]]
. If you can, use a singlePlot
to plot all three things. This is slightly more convenient and allows you not to have to write the styles twice (one for Plot, one for the legend). $\endgroup$