Group Abstract Group Abstract

Message Boards Message Boards

0
|
6.1K Views
|
5 Replies
|
2 Total Likes
View groups...
Share
Share this post:

LogLogPlot for negative values

Posted 6 years ago

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

Attachments:
POSTED BY: Omar Alsuhaimi
5 Replies

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?

POSTED BY: Hans Dolhaine
Posted 6 years ago

Thanks a lot, Rohit.

Kind regards Omar

POSTED BY: Omar Alsuhaimi
Posted 6 years ago

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

POSTED BY: Omar Alsuhaimi
Posted 6 years ago

Hi Omar,

In addition to Hans's answer, take a look at ReImPlot and AbsArgPlot which were introduced in version 12.

POSTED BY: Rohit Namjoshi

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]
POSTED BY: Hans Dolhaine
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard