Skip to main content
edited tags
Link
added 104 characters in body
Source Link
Zero
  • 313
  • 1
  • 10

I am having a problem placing my legend inside a bode plot (magnitude or phase - any would do). I cannot find any command that lets me do so.

My command for bode plot is

BodePlot[TF[2 \[Pi] s], {0.001, 100}, 
PhaseRange -> {-\[Pi], \[Pi]}, 
PlotStyle -> {Thickness[0.01], Thickness[0.008], Thickness[0.005]}, 
GridLines -> Automatic, 
PlotLegends -> {"\!\(\*SubscriptBox[\(\[ScriptCapitalP]\), \(1\)]\)",
"\!\(\*SubscriptBox[\(\[ScriptCapitalP]\), \(2\)]\)", 
"\!\(\*SubscriptBox[\(\[ScriptCapitalP]\), \(3\)]\)"}, 
PlotLabel -> {"Impulse Response Function \!\(\*SubscriptBox[\(\
\[ScriptCapitalP]\), \(i\)]\)(s)", ""}, 
FrameLabel -> {{"Frequency [Hz]", 
"Magnitude [dB]"}, {"Frequency [Hz]", "Phase [deg]"}}, 
BaseStyle -> {FontSize -> 20, FontSize -> 20}, ImageSize -> Large]

Here, TF is a TransferFunctionModel.

I want to put the legends inside the bode plot environment rather than it occurring on the side.

I am having a problem placing my legend inside a bode plot (magnitude or phase - any would do). I cannot find any command that lets me do so.

My command for bode plot is

BodePlot[TF[2 \[Pi] s], {0.001, 100}, 
PhaseRange -> {-\[Pi], \[Pi]}, 
PlotStyle -> {Thickness[0.01], Thickness[0.008], Thickness[0.005]}, 
GridLines -> Automatic, 
PlotLegends -> {"\!\(\*SubscriptBox[\(\[ScriptCapitalP]\), \(1\)]\)",
"\!\(\*SubscriptBox[\(\[ScriptCapitalP]\), \(2\)]\)", 
"\!\(\*SubscriptBox[\(\[ScriptCapitalP]\), \(3\)]\)"}, 
PlotLabel -> {"Impulse Response Function \!\(\*SubscriptBox[\(\
\[ScriptCapitalP]\), \(i\)]\)(s)", ""}, 
FrameLabel -> {{"Frequency [Hz]", 
"Magnitude [dB]"}, {"Frequency [Hz]", "Phase [deg]"}}, 
BaseStyle -> {FontSize -> 20, FontSize -> 20}, ImageSize -> Large]

Here, TF is a TransferFunctionModel.

I am having a problem placing my legend inside a bode plot (magnitude or phase - any would do). I cannot find any command that lets me do so.

My command for bode plot is

BodePlot[TF[2 \[Pi] s], {0.001, 100}, 
PhaseRange -> {-\[Pi], \[Pi]}, 
PlotStyle -> {Thickness[0.01], Thickness[0.008], Thickness[0.005]}, 
GridLines -> Automatic, 
PlotLegends -> {"\!\(\*SubscriptBox[\(\[ScriptCapitalP]\), \(1\)]\)",
"\!\(\*SubscriptBox[\(\[ScriptCapitalP]\), \(2\)]\)", 
"\!\(\*SubscriptBox[\(\[ScriptCapitalP]\), \(3\)]\)"}, 
PlotLabel -> {"Impulse Response Function \!\(\*SubscriptBox[\(\
\[ScriptCapitalP]\), \(i\)]\)(s)", ""}, 
FrameLabel -> {{"Frequency [Hz]", 
"Magnitude [dB]"}, {"Frequency [Hz]", "Phase [deg]"}}, 
BaseStyle -> {FontSize -> 20, FontSize -> 20}, ImageSize -> Large]

Here, TF is a TransferFunctionModel.

I want to put the legends inside the bode plot environment rather than it occurring on the side.

Source Link
Zero
  • 313
  • 1
  • 10

Position Legend for Bode Plots

I am having a problem placing my legend inside a bode plot (magnitude or phase - any would do). I cannot find any command that lets me do so.

My command for bode plot is

BodePlot[TF[2 \[Pi] s], {0.001, 100}, 
PhaseRange -> {-\[Pi], \[Pi]}, 
PlotStyle -> {Thickness[0.01], Thickness[0.008], Thickness[0.005]}, 
GridLines -> Automatic, 
PlotLegends -> {"\!\(\*SubscriptBox[\(\[ScriptCapitalP]\), \(1\)]\)",
"\!\(\*SubscriptBox[\(\[ScriptCapitalP]\), \(2\)]\)", 
"\!\(\*SubscriptBox[\(\[ScriptCapitalP]\), \(3\)]\)"}, 
PlotLabel -> {"Impulse Response Function \!\(\*SubscriptBox[\(\
\[ScriptCapitalP]\), \(i\)]\)(s)", ""}, 
FrameLabel -> {{"Frequency [Hz]", 
"Magnitude [dB]"}, {"Frequency [Hz]", "Phase [deg]"}}, 
BaseStyle -> {FontSize -> 20, FontSize -> 20}, ImageSize -> Large]

Here, TF is a TransferFunctionModel.