Message Boards Message Boards

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

Inserting PlotLegends inside the data Frame

Posted 10 years ago

Hi guys, Is there anyway I can locate PlotLegends inside the data Frame? Plus, can I control its location inside the Frame? Let's say, I'd like to put it either top-right or bottom-left. Any help will be very appreciable.

ClearAll
\[Sigma] = 5.67 10^-8; "Stefan-Boltzmann Constant";
\[Epsilon] = 1; "Emissivity";
\[Alpha] = 1; "Absorbtivity";
\[Tau] = 1; "Transmittance";
g = 1 10^3; "Solar radiation 1Kw/m^2";
c = Range[10, 50, 10]; "Concentration";
receff[x_] = \[Alpha] \[Tau] - (\[Sigma] \[Epsilon] (x^4 - 
      293.15^4))/(c g);
Plot[Evaluate[receff[x]], {x, 293.15, 1073.15}, 
 PlotStyle -> (Directive @@ # & /@ 
    Transpose[{Join[ConstantArray[Dashed, 5]], 
      Flatten[ConstantArray[{Black, Red, Blue, Green, Purple}, 1]]}]),
  PlotRange -> {{250, 1000}, {0, 1.05}}, Frame -> True, 
 FrameLabel -> {"Temperature (K)" , "Efficiency (%)"}, 
 PlotLegends -> LineLegend[c, LegendLabel -> "Solar Concentration"], 
 LabelStyle -> Directive[Black, Bold, {16, GrayLevel[0.3]}]]

enter image description here

POSTED BY: Sungwoo Yang
3 Replies
Posted 9 years ago

thank you Priyan...it is work...done!

POSTED BY: Hadi Tokme
Posted 10 years ago

Thank you Friyan. This is what I was looking for. Appreciate your help.

POSTED BY: Sungwoo Yang
Posted 10 years ago
PlotLegends -> 
 Placed[LineLegend[c, 
   LegendLabel -> "Solar Concentration"], {Scaled[{0.5, 0.5}], {0.5, 
    0.5}}]

This might work. You need to change the numbers however.

POSTED BY: Priyan Fernando
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