Plotting Functions in Mathematica: A Simple Guide

  • Context: Mathematica 
  • Thread starter Thread starter clanijos
  • Start date Start date
  • Tags Tags
    Mathematica
Click For Summary

Discussion Overview

The discussion revolves around plotting functions in Mathematica, specifically focusing on how to plot functions like x^2 or sqrt(x) and exploring the possibility of modifying the x-axis scale using another function. The scope includes technical explanations and user inquiries related to software functionality.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant asks for guidance on plotting functions such as x^2 and sqrt(x) in Mathematica.
  • Another participant provides a specific command for plotting x^2 and references documentation for further assistance.
  • A later reply expresses that the original poster is already familiar with basic plotting but seeks a method similar to LogPlot that allows for changing the x-axis scale to another function.
  • Another participant questions the rationale behind wanting to compress the x-axis scale non-logarithmically and suggests that manual compression and re-labeling may be necessary.

Areas of Agreement / Disagreement

Participants generally agree on the basic functionality of plotting in Mathematica, but there is uncertainty regarding the specific request for modifying the x-axis scale, leading to differing views on how to achieve this.

Contextual Notes

Participants mention the importance of syntax in Mathematica, indicating that errors in notation can lead to significant confusion, but do not elaborate on specific limitations or unresolved steps in the plotting process.

Who May Find This Useful

Users interested in Mathematica plotting techniques, particularly those looking to customize function plots and axis scales.

clanijos
Messages
27
Reaction score
0
Could someone tell me how I would go about plotting a function in Mathematica over say, x^2? or sqrt(x)?

Thanks!
 
Physics news on Phys.org
clanijos said:
Could someone tell me how I would go about plotting a function in Mathematica over say, x^2? or sqrt(x)?

Perhaps more appropriate posted here:

https://www.physicsforums.com/forumdisplay.php?f=189

To do this use

Plot[x^2,{x,-3,3}]

which is documented here

http://reference.wolfram.com/mathematica/ref/Plot.html

or when you are running the software hit <f1> and when the help browser pops up type in Plot or any other likely keyword you want documentation on.

Mathematica is fanatic about exact use of {} versus [] versus (), := versus = versus == versus even === and correct capitalization. Make an error in anyone of those and you will get possibly incomprehensible error messages.
 
Thanks!

Edit: Gah, replied before I really looked over what you said! Yeah, I know how I should go about plotting a function like that. What I am looking for is something similar to LogPlot, but where the scale of the x-axis can be changed to another function.
 
Last edited:
clanijos said:
What I am looking for is something similar to LogPlot, but where the scale of the x-axis can be changed to another function.
You want to compress the scale on the x-axis, but not logarithmically? It's difficult to see why you might want to do that. I think you would have to do the compression yourself and then re-label the axis after the computer has done the plotting.

Exactly what are you wanting to plot?
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K