0

I would like to make a single plot which contains two graphs on top of each other like the plot below (with frames, axes labels and the legend on the top right corner)

enter image description here

I read this question and tried to implement it, but it did not work because it removes the labels of the axes when I use ImagePadding . Could somebody give me an example of how to do this?

eemg
  • 57
  • 3

1 Answers1

2

Do you mean something like this?

p1 = Plot[Sin[x], {x, 0, 2 Pi},
   Frame -> True,
   PlotLegends -> Placed[Framed[LineLegend[{Automatic}, {"Something"}]], ImageScaled[{.8, .9}]]];

p2 = Plot[Cos[x], {x, 0, 2 Pi}, Frame -> True, PlotLegends -> Placed[Framed[LineLegend[{Automatic}, {"Something"}]], ImageScaled[{.8, .9}]]];

GraphicsColumn[{p1, p2}]

enter image description here

Rohit Namjoshi
  • 10,212
  • 6
  • 16
  • 67