Message Boards Message Boards

Trouble using ListPlot and ListLogLogPlot and curve fitting in W.Alpha

Posted 10 years ago

I have a csv file in the form:

x_axes_name,y_axes_name
100,890
100,901
...
10000,89

I imported the file into Wolfram alpha. I'm having a heck of a time trying to build a "best fit" graph showing the axes names and a listloglogplot graph with the axes names. Anyone know how to reference the filename in a ListPlot and ListLogLogPlot and have the axes names shown? Could you send me a sample command? Do I need to change how my csv file looks?

Thanks Daniel

Attachments:
POSTED BY: Daniel Loughlin
8 Replies
Posted 10 years ago

Thank you so much for your help.

POSTED BY: Daniel Loughlin
Posted 10 years ago

Hi Daniel, Mathematica has very strong curve fitting capabilities. The straight line in the Log-Log plot implies Log y = m Log x+b is a reasonable model. Which can be written as y = b x^m. The attached notebook uses NonlinearModelFit to fit that model to the data.

If you like Mathematica, you should note that there are home and student licenses at very reasonable prices, with of course a non-professional use provision.. (No -- I don't work for Wolfram, but I love Mathematica.)

Kind regards, David

Attachments:
POSTED BY: David Keith
Posted 10 years ago

No worrries. I downloaded a trial of mathematica. I opened the nb file. I see the listplot and listloglogplot. Is there a way to draw a best fit line/curve through the points? Thanks!!!!

POSTED BY: Daniel Loughlin
Posted 10 years ago

Sorry, Daniel -- I'm so Mathematica-centered I missed the Wolfram Alpha in your post. I don't use Alpha much. Maybe someone else can respond????

POSTED BY: David Keith
Posted 10 years ago

Thanks!! How do I reference this in a ListPlot or ListLogLogPlot command in wolfram alpha?

POSTED BY: Daniel Loughlin
Posted 10 years ago

Hi Daniel, Please see the attached notebook. Note that it is assumed the csv file is in the same directory as the notebook.

Best, David

Attachments:
POSTED BY: David Keith
Posted 10 years ago

Ugh my example got mangled by this forum.... I attached a CSV file with how the data looks.

POSTED BY: Daniel Loughlin

http://community.wolfram.com/groups/-/m/t/270507
has the incantations for nice formatting.

POSTED BY: Bruce Miller
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract