Hi everyone,
I have tried to plot a function with negative values using LogLogPlot but I could not.
Please, could you help me with this problem?
Please see my attempt attached.
Kind regards
Omar
LogLogPlot.nb (46.2 KB)
Hi everyone,
I have tried to plot a function with negative values using LogLogPlot but I could not.
Please, could you help me with this problem?
Please see my attempt attached.
Kind regards
Omar
LogLogPlot.nb (46.2 KB)
If a is negative and real, then Log [ a ] = I Pi + Log[ Abs[a] ]. ( I^2 = -1 )
This is a complex number with constant imaginary part. So you might want to consider
LogPlot[Abs[\[Omega]1] /. qx -> 1000, {El, 10^-6, 2.52 10^9},
Frame -> True, FrameLabel -> {"\!\(\*
StyleBox[\"E\",\nFontSlant->\"Italic\",\nFontColor->GrayLevel[0]]\)",
"\!\(\*
StyleBox[SubscriptBox[\"\[Omega]\", \"+\"],\nFontSize->14,\n\
FontWeight->\"Bold\"]\)"},
PlotStyle -> Black, FrameTicksStyle -> Directive[Black, 9],
PlotRange -> Full, ImageSize -> 650]
or, perhaps better
Plot[Log[Abs[\[Omega]1]] /. qx -> 1000, {El, 10^-6, 2.52 10^9},
Frame -> True, FrameLabel -> {"\!\(\*
StyleBox[\"E\",\nFontSlant->\"Italic\",\nFontColor->GrayLevel[0]]\)",
"\!\(\*
StyleBox[SubscriptBox[\"\[Omega]\", \"+\"],\nFontSize->14,\n\
FontWeight->\"Bold\"]\)"},
PlotStyle -> Black, FrameTicksStyle -> Directive[Black, 9],
PlotRange -> Full, ImageSize -> 650]
Hi Omar,
In addition to Hansβs answer, take a look at ReImPlot and AbsArgPlot which were introduced in version 12.
Thanks Hans for your for your help.
Should I use this code which is similar to the original one?
Plot[-Log[Abs[[Omega]1]] /. qx β 1000, {El, 10^-6, 2.52 10^9},
Frame β True, FrameLabel β {β!(*
StyleBox["E",\nFontSlant->"Italic",\nFontColor->GrayLevel[0]])β,
β!(*
StyleBox[SubscriptBox["[Omega]", "+"],\nFontSize->14,\n
FontWeight->"Bold"])β},
PlotStyle β Black, FrameTicksStyle β Directive[Black, 9],
PlotRange β Full, ImageSize β 650]
Kind regards
Omar
Thanks a lot, Rohit.
Kind regards
Omar
Well, Omar, frankly spoken I donβt know.
What do you want to achieve with this plot?
Show what?
Do you want to have this plot for a publication?
If so, what is your reasoning with regard to the plot?