Message Boards Message Boards

0
|
3423 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Create a framed legend at the third plot with Show?

Posted 6 years ago

Anyone who can help me use legend with Show command. I have three plots, and I need to frame the legend in the final graph that gathers them. I have two problems, first, for the last plot(fig) the vertical axes has a different name, when I used Show to gather the three plots, the output depends on the first element to name the axes and I can't use the third one because its range is smaller than the others. Secondly, I don't know how to frame the legend in the plot that gathers them.

Please see my code that is attached

Attachments:
POSTED BY: Ghady Almufleh
2 Replies

I would make a single plot, after defining the two functions f1 and f2, and avoid giving a white FrameStyle, because it is usually invisible:

ListLinePlot[{Table[{q, f1[q]}, {q, .7, .85, .005}],
  Table[{q, f2[q]}, {q, .7, .85, .005}],
  Transpose[{kk, dxs}]}, 
 PlotLegends -> 
  Placed[LineLegend[{"lg1", "lg2", "lg3"}, LegendMargins -> 0, 
    LegendFunction -> (Framed[#1, FrameMargins -> Small] & )], {0.77, 
    0.8}], PlotRange -> All, Axes -> False, Frame -> True, 
 FrameLabel -> {{a, b}, {c, d}}]
POSTED BY: Gianluca Gorni
Posted 6 years ago

Finally, It works.Thank you so much!!

POSTED BY: Updating Name
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract