Skip to main content
edited tags
Link
kglr
  • 400.5k
  • 18
  • 488
  • 929
Tweeted twitter.com/#!/StackMma/status/523970852224643072
Source Link

Problem with Style in a Plot

I would like to simply plot a density function $f_1$ and I would like to put a legend but I cannot do it as I wish. The problem is simple but I spent alot of time and couldnt solve it. I will be happy for your help. Thanks in advance. Here is my code:

f1[y_] := (PDF[NormalDistribution[1, 1], y]); 

Plot[{f1[y]}, {y, -5, 5}, PerformanceGoal -> "Quality", PlotLegends -> Placed[LineLegend[{Style[Subscript[OverHat[g], 1] (\[Alpha] = 100), FontSize -> 21]}, LegendFunction -> (Framed[#, RoundingRadius -> 2, FrameStyle -> LightGray] &), BaseStyle -> 18], {Right, Top}], PlotStyle -> {Blue}, PlotRange -> Automatic, AxesLabel -> {Style[y, FontSize -> 21], Style[Subscript[OverHat[g], 1], FontSize -> 21]}, BaseStyle -> 18, AxesStyle -> Arrowheads[0.03]]

The probem is at this point

Style[Subscript[OverHat[g], 1] (\[Alpha] = 100),

First I dont see any $\alpha$ and second the term ([Alpha] = 100) is coming in front of Subscript[OverHat[g], 1], which is annoying me alot.