Message Boards Message Boards

0
|
6639 Views
|
3 Replies
|
1 Total Likes
View groups...
Share
Share this post:

How to creat a specific/private legend in Mathematica 10 or 9 ?

Posted 10 years ago

A test program, perfect in Earlier Version, but not 9. The problem is, how to do it with Mathematica 10 or 9?

Needs["PlotLegends"] g1 = Plot[Sin[x], {x, 0, 2 Pi}]; legend = Join[{Graphics[{Thick, Blue, Dashed, Line[{{0, 2}, {15, 2}}]}], #1} & @@@ {{Style[ "\[CapitalOmega]=15", FontSize -> 11, FontFamily -> "Times New Roman"]}}, {Graphics[{Thick, Red, Dotted, Line[{{0, 2}, {15, 2}}]}], #1} & @@@ {{Style[ "\[CapitalOmega]=20", FontSize -> 11, FontFamily -> "Times New Roman"]}}, {Graphics[{Thick, Black, DotDashed, Line[{{0, 2}, {6, 2}}]}], #1} & @@@ {{Style[ "\[CapitalOmega]=30", FontSize -> 11, FontFamily -> "Times New Roman"]}}, {Graphics[{Thick, Black, Dashed, Line[{{0, 2}, {6, 2}}]}], #1} & @@@ {{Style[ "\[CapitalOmega]=40", FontSize -> 11, FontFamily -> "Times New Roman"]}}]; ShowLegend[ Show[g1], {legend, LegendPosition -> {0.5, 0.25}, LegendSize -> {0.5, 0.4`}, LegendShadow -> None, LegendBorder -> None}]

POSTED BY: xiaochao Chen
3 Replies
Posted 10 years ago
POSTED BY: David Keith
Posted 10 years ago
POSTED BY: David Keith
Posted 10 years ago

Thanks for your patience. it's useful for me. In fact, “Legended” may substitute for Needs["PlotLegends`"] in V9/10.

The label "lbl" in Legended[expr,lbl] can be any expression, including graphics.

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