How do I plot a function with frequency and energy using Mathematica?

  • Thread starter Thread starter TheDestroyer
  • Start date Start date
  • Tags Tags
    Mathematica Plot
AI Thread Summary
To plot a function comparing Planck's, Rayleigh's, and Wien's formulas in Mathematica, the user encountered an issue with labeling the frequency as 10^11 Hz instead of 100000000000 Hz. The solution involves enclosing the label "10^11" in quotation marks within the AxesLabel option. This allows Mathematica to treat it as text rather than a numerical value. The user confirmed that this approach resolved the labeling problem. Proper formatting in Mathematica's plotting functions is crucial for accurate representation.
TheDestroyer
Messages
401
Reaction score
1
Hello guys,

I'm doing a comparison between Planck's, Rayleigh's and Wien's formula, and I'm plotting the following function in mathematica


Plot[{(2 h (v 10^11)^3)/c^2 10^17/(Exp[(h (v 10^11))/(k T)] - 1), (
2 (v 10^11)^2)/c^2 k T 10^17, (2 h (v 10^11)^3)/
c^2 Exp[-((h (v 10^11))/(k T))] 10^17}, {v, 0 10^0,
5}, {PlotRange -> 2 10^0, PlotStyle -> Thick,
AxesLabel -> {Frequency (10^11 Hz),
Energy/surface\[Cross]time (10^-17 J/(m^2 s))}}]

If you plot this, you'll see that the label is written as 100000000000 Hz.

Can anyone tell me please how to write it as 10^11?

I'm tired of trying, please help.

Thanks
 
Physics news on Phys.org
Help guys! please!
 
You can write text as "text" and Mathematica will plot exactly what you wrote (but will no longer interpret it as mathematics). You can find info like this in the Documentation Center built into Mathematica for every command (e.g., AxesLabel).
 
I tried text, but it's still taking it as a number! I don't understand why! :(
 
Hey guys! come on! please help!
 
Are you enclosing 10^11 in quotation marks? Works for me.
 
That's a lot pal :), Problem solved :)
 

Similar threads

Replies
14
Views
3K
Replies
2
Views
2K
Replies
5
Views
2K
Replies
1
Views
410
Replies
3
Views
2K
Back
Top