Group Abstract Group Abstract

Message Boards Message Boards

0
|
353 Views
|
1 Reply
|
1 Total Like
View groups...
Share
Share this post:

Could PlotLegends->Placed[] inconsistency be fixed?

Posted 1 month ago
POSTED BY: Anton Lutsenko

i think the problem is that Frame is not a Graphics objects. The coordinate issue (which is a bug I guess) can be solved by doing:

Placed[… , {Scaled[{1, 1}], Scaled[{1, 1}]}]

And not-so-nice solution would be to add the 'box' manually:

Plot[{Sin[x], Cos[x]}, {x, 0, 2 \[Pi]}, Frame -> True, 
 FrameLabel -> {{"y", "y"}, {"x", "Trigonometric functions"}}, 
 ImageSize -> 400, PlotRange -> {{0, 2 Pi}, {-1.1, 1.2}}, 
 PlotRangePadding -> None, 
 PlotLegends -> 
  Placed[LineLegend["Expressions"], {Scaled[{1, 1}], Scaled[{1, 1}]}],
  Epilog -> {EdgeForm[Black], FaceForm[], 
   Line[{{5, 1.2}, {5, 0.65}, {2 Pi, 0.65}}]}, FrameStyle -> Black]
POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard