1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Plotting Data in Mathematica

  1. Jun 23, 2009 #1
    I am importing data as a .dat file into Mathematica and making a list plot. I need to know: a)How to sort the words out of my data? I used to use AllNumeric but that went away with version 6
    b)How to switch the axis on my graph? My data is coming in as a pair sequence {1#`,2#`} but I need it to be {2#`,1#`} Or I need to know how to rotate my plotting sequence so it will flip.


    This is the code I am using

    data=Import["Test2.dat","Data"];
    b=Drop[data,5]; %This just removes the header from my data file
    ListPlot
     
  2. jcsd
  3. Jun 23, 2009 #2

    diazona

    User Avatar
    Homework Helper

    Try this:
    Code (Text):
    data=Import["Test2.dat","Data"];
    b=Reverse[Drop[data,5],2];
    ListPlot[b]
     
  4. Jun 23, 2009 #3
    Thanks!
     
  5. Jun 23, 2009 #4
    Does you know how to sort words out of data? I have lists of data combined into one sheet and need to remove the column headings out of the data before it is plotted.
     
  6. Jun 23, 2009 #5

    diazona

    User Avatar
    Homework Helper

    Can you post an example in more detail?
     
  7. Jun 23, 2009 #6
    It has two columns of that are combined lists of test data. Every so often there will be titles and headings inserted into the two columns and I need to delete these in order to use the ListPlot command.

    Unfortunately I cannot upload it in a large section so there is just the start of it attached.

    Thank you for all of your help
     

    Attached Files:

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Plotting Data in Mathematica
  1. Mathematica plot (Replies: 0)

Loading...