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

  • Context: Graduate 
  • Thread starter Thread starter TheDestroyer
  • Start date Start date
  • Tags Tags
    Mathematica Plot
Click For Summary

Discussion Overview

The discussion revolves around plotting a function in Mathematica that compares Planck's, Rayleigh's, and Wien's formulas, specifically focusing on how to format the axes labels to display scientific notation (e.g., 10^11) instead of standard numerical representation.

Discussion Character

  • Technical explanation
  • Homework-related

Main Points Raised

  • One participant shares a Mathematica code snippet for plotting a function and expresses frustration over the axis label formatting.
  • Another participant suggests using quotation marks around the text in the AxesLabel to display it correctly.
  • A later reply confirms that enclosing the scientific notation in quotation marks works for formatting the label as desired.
  • Some participants express urgency for assistance, indicating a collaborative atmosphere.

Areas of Agreement / Disagreement

Participants generally agree on the method of using quotation marks for formatting, but there is some initial confusion regarding its implementation.

Contextual Notes

There may be limitations related to the specific version of Mathematica being used or the exact command syntax, which are not fully explored in the discussion.

Who May Find This Useful

This discussion may be useful for Mathematica users working on similar plotting tasks, particularly in the context of physics and engineering applications.

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 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
9
Views
2K